Fall-detection

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 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!

 

编译说明

Fall-detection_第1张图片

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

Fall-detection_第2张图片

 

/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 
    net = dn.load_net("cfg/yolo.cfg", "yolo.weights", 0)
ctypes.ArgumentError: argument 1: : 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 的人体 动作识别

你可能感兴趣的:(Action,Detection,跌倒检测)