Giter VIP home page Giter VIP logo

yolov4_deepsocial's Introduction

DeepSOCIAL: Social Distancing Monitoring and Infection Risk Assessment in COVID-19 Pandemic

Open access paper: https://www.mdpi.com/2076-3417/10/21/7514 & https://doi.org/10.3390/app10217514

1 克隆代码和编译测试环境

1.1 克隆仓库代码

git clone

1.2 编译darknet

1、先进入编译目录

cd DeepSocial/darknet

2、根据自己是否有GPU修改Makefile文件

vim Makefile

我修改后内容为如下:

GPU=1
CUDNN=1
CUDNN_HALF=1
OPENCV=1
AVX=1
OPENMP=1
LIBSO=1
ZED_CAMERA=0
ZED_CAMERA_v2_8=0

3、开始编译

因为是我在自己本地是编译过得,因重新编译之前,先执行一下sudo make clean,删除之前编译生成的文件!

sudo make clean sudo make

注意:

如果编译报错:/bin/sh:nvcc not found

解决方式(参考):

1)查看nvcc可执行文件的路径

which nvcc

2)修改Makefile文件中的NVCC=nvcc,把nvcc替换为上面查询到的nvcc可执行文件的路径

NVCC=/usr/local/cuda/bin/nvcc

nvcc error

4、验证环境

验证环境有两种方式:

  • 使用编译的darknet可执行文件
  • 使用darknet接口API

使用编译的darknet可执行文件

./darknet detector test ./cfg/coco.data ./cfg/yolov4.cfg ../weights/DeepSocial.weights data/dog.jpg -i 0 -thresh 0.25

  • 使用darknet接口API

python image_yolov4.py

环境如果没有问题,你会看如如下如的预测结果:

predictions

2 程序运行

1、下载测试视频,测试视频放到DeepSocial/Images目录下

用到的测试数据是牛津市中心(Oxford Town Center)采集的一段视频,5分钟的长度

2、下载预训练的模型,下载模型放到weights目录下

3、运行测试程序

python Yolov4_DeepSocial.py

测试效果如下:

输出gif动图:

ffmpeg -i OxfordTownCentreDataset.avi -ss 00:00:05.0 -t 00:00:15.0 -s 800*450 -r 15 OxfordTownCentreDataset.gif

yolov4_deepsocial's People

Contributors

shliang0603 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yolov4_deepsocial's Issues

Pytorch

Thanks for your awesome works!And,can you implement by pytorch?

视频测试速度慢

为什么我的yolo4_deepsocial测试视频都是一帧一帧来的,而且一帧需要10秒左右,是没有调用GPU吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.