[](https://colab.research.google.com/drive/1LF_LTIt878PgqgffdQ2xP1aLcL5oU81_?usp=sharing)
# YOLOv10_DeepSORT
This repository contains code for object detection and tracking in videos using the YOLOv10 object detection model and the DeepSORT algorithm.
## Demo
<p align="center">
<img src="data/helper/test.gif" alt="demo" width="80%">
</p>
## Installation
1. Clone this repository:
```
git clone https://github.com/sujanshresstha/YOLOv10_DeepSORT.git
cd YOLOv10_DeepSORT
```
2. Create new environment
- Using Conda
```
conda env create -f conda.yml
conda activate yolov10-deepsort
```
- Using pip
```
python3 -m virtualenv -p python3.11 yolov10-deepsort
source yolov10-deepsort/bin/activate
pip install -r requirements.txt
```
3. Download model weight
```
mkdir -p weights
wget -P weights -q https://github.com/jameslahm/yolov10/releases/download/v1.0/yolov10n.pt
wget -P weights -q https://github.com/jameslahm/yolov10/releases/download/v1.0/yolov10s.pt
wget -P weights -q https://github.com/jameslahm/yolov10/releases/download/v1.0/yolov10m.pt
wget -P weights -q https://github.com/jameslahm/yolov10/releases/download/v1.0/yolov10b.pt
wget -P weights -q https://github.com/jameslahm/yolov10/releases/download/v1.0/yolov10x.pt
wget -P weights -q https://github.com/jameslahm/yolov10/releases/download/v1.0/yolov10l.pt
ls -lh weights
```
## Usage
1. Prepare the video file:
- Place the video file in the desired location.
- Update the `video` flag in the path of the video file or set it to `0` to use the webcam as the input.
2. Download YOLOv10 model:
- Make sure the corresponding model weights are available.(yolov10n/yolov10s/yolov10m/yolov10b/yolov10x/yolov10l)
3. Configure the output video:
- Update `output` flag in the code to specify the path and filename of the output video file.
4. Set the confidence threshold:
- Adjust the `conf` flag in the code to set the confidence threshold for object detection. Objects with confidence below this threshold will be filtered out.
5. If you want to detect and track certain object on video
- Modify the `class_id` flag in the code to specify the class ID for detection. The default value of the flag is set to None. If you wish to detect and track only persons, set it to 0, or refer to the coco.names file for other options.
6. If you want to blur certain object while tracking
- Modify the `bulr_id` flag in the code to specify the class ID for detection. The default value of the flag is set to None.
7. Run the code:
```
# Run object tracking
python object_tracking.py --video ./data/test.mp4 --output ./output/output.mp4
# Run object tracking on webcam (set video flag to 0)
python object_tracking.py --video 0 --output ./output/webcam.mp4
# Run person tracking (set class_id flag to 0 for person)
python object_tracking.py --video ./data/test.mp4 --output ./output/output.mp4 --class_id 0
# Run tracking on a video with burring certain objects (set blur_id flag to 0 for person)
python object_tracking.py --video ./data/test.mp4 --output ./output/output.mp4 --blur_id 0
```
## Acknowledgements
- This code is built upon the YOLOv10 model and the DeepSort algorithm.
- Credits to the authors and contributors of the respective repositories used in this project.
## References
- [YOLOv10: Real-Time End-to-End Object Detection](https://github.com/THU-MIG/yolov10)
- [Simple Online and Realtime Tracking with a Deep Association Metric](https://arxiv.org/abs/1703.07402)

徐浪老师
- 粉丝: 8731
- 资源: 1万+
最新资源
- sqlserver jtds 驱动
- 微电网逆变器控制策略与并网仿真研究:下垂控制仿真模型及其参考资料综述,微电网逆变器控制策略与并网仿真研究:下垂控制仿真模型及其应用探讨,微电网逆变器控制、并网仿真、下垂控制等仿真模型以及一些参考资料
- DeepSeek清华大学全套学习资料1-5
- 【毕业设计】Python的Django-html深度学习的安全帽佩戴检测系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】Python的Django-html深度学习的聊天机器人设计源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 【毕业设计】Python的Django-html搜索的目标站点内容监测系统源码(完整前后端+mysql+说明文档+LW+PPT).zip
- 蒙特卡洛思想下的充电汽车负荷曲线生成研究报告:探索1万台汽车的充电负荷曲线模拟,基于蒙特卡洛思想的充电汽车充电负荷曲线生成研究报告-涵盖负荷曲线的精细分析与实际应用解析,基于蒙特卡洛思想生成1000
- DeepSeek 保姆级新手教程
- MATLAB下电转气协同与碳捕集垃圾焚烧虚拟电厂优化调度复现程序及仿真结果展示,基于MATLAB和CPLEX的碳捕集与垃圾焚烧虚拟电厂电转气协同优化调度算法研究,MATLAB代码:计及电转气协同的含碳
- 基于直齿行星齿轮传动系统的ode45求解方法及自由度收敛研究,基于直齿行星齿轮传动系统的ODE45求解及其自由度全收敛分析研究,直齿行星齿轮传动系统ode45求解,自由度全部收敛 本人主攻齿轮动力学
- 洪泽湖流域1951-2008年面雨量变化特征与趋势分析及其防洪减灾应用
- 基于TMS320F2812的PMSM有传感器矢量控制双闭环程序系统,TMS320F2812 DSP矢量控制实现PMSM传感器转速与电流双闭环控制程序,矢量控制dsp2812 主控为TMS320F281
- blender插件,mmd-tools-v2.10.3
- 黑龙江省近45年积温变化
- SVPWM过调制控制技术:深入解析与实际应用,基于SVPWM技术的过调制控制方法的研究与应用,SVPWM过调制控制方法 ,SVPWM; 过调制; 控制方法; 数字信号处理,SVPWM过调制控制策略
- 基于PI控制器与滑膜控制器的三相永磁同步电机无速度传感器控制策略及其SVPWM-MRAS-PI SMC算法研究与应用,基于PI控制器与滑膜控制器的三相永磁同步电机无速度传感器控制策略研究:SVPWM
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


