基于YOLOv5行人车辆跟踪检测识别计数系统源码+数据集,实现出/入分别计数

yolov5 deepsort 行人 车辆 跟踪 检测 计数

下载地址:基于YOLOv5行人车辆跟踪检测识别计数系统源码+数据集

  • 实现了 出/入 分别计数。
  • 默认是 南/北 方向检测,若要检测不同位置和方向,可在 main.py 文件第13行和21行,修改2个polygon的点。
  • 默认检测类别:小客车、大客车、小货车、中货车、大货车、集装箱车。
  • 检测类别可在 detector.py 文件第60行修改。

运行环境

  • python 3.6+,pip 20+
  • pytorch
  • pip install -r requirements.txt

如何运行

  1. 进入目录

    $ cd unbox_yolov5_deepsort_counting
    
  2. 创建 python 虚拟环境

    $ python3 -m venv venv
    
  3. 激活虚拟环境

    $ source venv/bin/activate
    
  4. 升级pip

    $ python -m pip install --upgrade pip
    
  5. 安装pytorch

    根据你的操作系统、安装工具以及CUDA版本,在 https://pytorch.org/get-started/locally/ 找到对应的安装命令。我的环境是 ubuntu 18.04.5、pip、CUDA 11.0。

    $ pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio===0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
    
  6. 安装软件包

    $ pip install -r requirements.txt
    
  7. 在 main.py 文件中第66行,设置要检测的视频文件路径,默认为 ‘./video/test.mp4’

    140MB的测试视频可以在这里下载:https://pan.baidu.com/s/1geqjht-no0iyzQ88JQopwA 密码: i6cs

    capture = cv2.VideoCapture('./video/test.mp4')
    
  8. 运行程序

    python main.py
    

引用

  • https://github.com/Sharpiless/Yolov5-deepsort-inference
  • https://github.com/ultralytics/yolov5/
  • https://github.com/ZQPei/deep_sort_pytorch
    =======
    下载地址:基于YOLOv5行人车辆跟踪检测识别计数系统源码+数据集
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Python代码大全

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值