当前位置:   article > 正文

Fall-detection_fall detection

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

  1. git clone https://github.com/qiaoguan/Fall-detection
  2. cd Fall-detection
  3. 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命令的时候遇到以下错误:

 

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

解决办法见这里

 

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

  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
  2. /bin/sh: 1: nvcc: not found
  3. Makefile:88: recipe for target 'obj/convolutional_kernels.o' failed
  4. make: *** [obj/convolutional_kernels.o] Error 127

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

 

 

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

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

只需要修改下:

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

即可成功执行。

 

 

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/276509
推荐阅读
相关标签
  

闽ICP备14008679号