Fall-detection

该项目使用YOLO2实现室内摔倒检测,通过检测房间中的人并判断是否跌倒。基于darknet框架,适用于Linux环境,需Python和OpenCV支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

a very simple Fall-detection(摔倒/跌倒检测)using yolo2

项目地址:https://github.com/qiaoguan/Fall-detection

Fall-detection(摔倒/跌倒检测)

Fall-detection(摔倒/跌倒检测)in the room

this fall-detection is based on darknet.

Examples

  we first detect humans in the room, then we use some simple ways to judge whether he or she is falling down. fall detection example

fall-detection algorithms

  • detect human
  • classify whether fall down or not(still on the way)/custom rules

Installation

Requirements

  • Python and opencv,
  • Linux (Windows and Mac os are not officially supported, but should work)

Installation Options:

Install on Linux

First, make sure you have install python and opencv environment(p.s. if you do not have GPU support, change the first line and second line of Makefile value from 1 to 0)

Then, install this module :

git clone https://github.com/qiaoguan/Fall-detection
cd Fall-detection
sudo make

If you are having trouble with installation, you can Issue me!

run the demo

First, download yolo.weights, the password is: bp6c. Then, install this module :

python gq.py

for opencv3 users, you can refer to this code

the speed is about 12fps using GPU(GTX 1080)

Thanks

  • Many, many thanks to pjreddie for his Great work!

p.s. If libdarknet.so Error happened, you can alter the relative path for libdarknet.so in python/darknet.py to absolute path, if you have any questions,you can open an issue!

 

编译说明

执行make命令的时候遇到以下错误:

 

/usr/local/include/opencv2/core/cvdef.h:485:1: error: unknown type name ‘namespace’
 namespace cv {
 ^
compilation terminated due to -Wfatal-errors.
Makefile:85: recipe for target 'obj/gemm.o' failed
make: *** [obj/gemm.o] Error 1

解决办法见这里

 

按上述解决后,又出现新的错误,如下:

nvcc  -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] -Iinclude/ -Isrc/ -DOPENCV `pkg-config --cflags opencv`  -DGPU -I/usr/local/cuda/include/ -DCUDNN  --compiler-options "-Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -DGPU -DCUDNN" -c ./src/convolutional_kernels.cu -o obj/convolutional_kernels.o
/bin/sh: 1: nvcc: not found
Makefile:88: recipe for target 'obj/convolutional_kernels.o' failed
make: *** [obj/convolutional_kernels.o] Error 127

这个时候只要执行下make clean就好了

 

 

执行python文件的时候,出现以下:

Traceback (most recent call last):
  File "fall_detection.py", line 59, in <module>
    net = dn.load_net("cfg/yolo.cfg", "yolo.weights", 0)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type

只需要修改下:

# load network and weights
net = dn.load_net("cfg/yolo.cfg".encode('utf-8'), "yolo.weights".encode('utf-8'), 0)
meta = dn.load_meta("cfg/coco.data".encode('utf-8'))

即可成功执行。

 

 

附加:基于kinect 的人体 动作识别

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值