<h1 align='center'>Tracklite</h1>
## Introduction
This repo using TensorRT to speed up yolov3 backbone and work with [deep_sort torch](https://github.com/ZQPei/deep_sort_pytorch). mainly run on **Nvidia Jetson Nano** but x64 may also works. haven't tried yet. note that it is a inference pipeline not for training model.
Thanks for [ZQPei](https://github.com/ZQPei)'s great work. and also thanks to [jkjung-avt](https://github.com/jkjung-avt) for his [tensorrt_demos](https://github.com/jkjung-avt/tensorrt_demos), which give me a a lot to learn.
------
## Update
2020.4.12
> Release yolov3-tiny416 inference
2020.4.11
> first upload the project
------
## Speed
Whole process time from read image to finished deepsort (include every img preprocess and postprocess)
| Backbone | before TensorRT | TensorRT(detection + tracking) | FPS(detection + tracking) |
| :-------------- | --------------- | ------------------------------ | ------------------------- |
| Yolov3_416 | 750ms | 450ms | 1.5 ~ 2 |
| Yolov3-tiny-416 | N/A | 100-150ms | 8 ~ 9 |
------
## Install
#### Environment
- Jetson nano with TensorRT 5.1.6.1
- Onnx 1.4.0 (or onnx 1.4.1, cannot be higher or lower)
follow my step to set up everything
1. clone this repo
```
git clone xxxx
```
2. Download YOLOv3 parameters
```
cd detector/YOLOv3/weight/
wget https://pjreddie.com/media/files/yolov3.weights
```
3. Download deepsort parameters ckpt.t7
```
cd deep_sort/deep/checkpoint
# download ckpt.t7 from
https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6 to this folder
```
4. Compile nms
```
cd detector/YOLOv3/nms
sh build.sh
```
------
## Convert yolov3 weights to onnx to tensorrt
1. firstly check the yolo weights under **weights directory** and just simply command like below to convert yolov3.weights file to onnx, and onnx will be yielded at the same dir ( ./weights/yolov3_416.onnx )
```shell
#if yolov3
python3 yolov3_to_onnx.py
#else yolov3_tiny
python3 yolov3_tiny_to_onnx.py
```
2. convert yolov3_416.onnx to tensorrt engine
```shell
#if yolov3
python3 onnx_to_tensorrt --onnx /path/to/yolov3_416.onnx --output_engine /path/to/yolov3_416.engine
#else yolov3_tiny
python3 onnx_to_tensorrt_tiny --onnx /path/to/yolov3_tiny_416.onnx --output_engine /path/to/yolov3_tiny_416.engine
```
**Note**: In `onnx_to_tensorrt.py` , you can set `max_workspace_size` = 1 << 30 in `get_engine` function and delete ` builder.fp16_mode = True` if you are using x86 arch for better performance (both mAP and frames per second)
------
## Demo
support video and webcam demo for now
1. Make sure everything is settled down
- Yolov3_416 engine file
- demo video you want to test on
2. Let's do demo !
support
1. onboard camera webcam / usb camera.
2. Video track
- Webcam demo - onboard camera, csi camera
```shell
#yolov3
python3 run_tracker.py
#yolov3 tiny
python3 run_tracker_tiny.py
```
- Webcam demo - usb camera
```shell
#yolov3
python3 run_tracker.py --usb
#yolov3 tiny
python3 run_tracker_tiny.py --usb
```
- Video demo
```shell
#yolov3
python3 run_tracker.py --file --filename your_test.mp4 --output_file ./output.mp4
#yolov3 tiny
python3 run_tracker_tiny.py --file --filename your_test.mp4 --output_file ./output.mp4
```
![walking.gif](https://img-blog.csdnimg.cn/20200412151326127.gif)
![twice.gif](https://github.com/Stephenfang51/tracklite/blob/master/example/twice.gif)
------
## Issue
I had a hard time on saving video, now the VideoWriter works for me, but it might not work for you, issue me if you have any problem.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
该项目是基于yolov3和deepsort算法实现的人体的识别与跟踪,在NX上实测可以达到20-30FPS,博主是在github开源项目(https://github.com/Stephenfang51/tracklite)的基础上进行修改而来。 算法的基本原理如下: (1)YOLO是使用整张图像作为输入,经过一个CNN网络模型,再通过非极大值抑制算法实现end-to-end的目标检测。它将目标检测问题处理成一个位置回归和类别分类问题,算法简洁高效。 (2)DeepSort跟踪算法通过卡尔曼滤波器得到物体下一帧位置的最优估计,再利用匈牙利算法匹配得到相邻帧的对应ID。 资源包括:原github代码和修改后的稳定版代码。 最后欢迎大家积极点赞和评论,博主会定期回复!
资源推荐
资源详情
资源评论
收起资源包目录
计算机视觉:人体识别与跟踪(People Recognition and Tracking) (259个子文件)
033953c48111d4953377de88ba5beb2f262edb 470B
03d6f5142d57067541cd5ce3ae3879388a09f1 2KB
0ca35c1ea7c06b95d4ea051371c31738400fa7 327B
0fced02c177d20fc17e7b6bc6bcf7cd538a04d 207B
115a622b4f3bbe4ac3e33f87dc9aff31820263 133B
135a01fc050089acd8aacab1b4f8e269f6b077 161B
14f2fc1837fd2f7c461ee889517b84d3d1f9e8 83B
1e930da7bcfb2c380d2592be5c0444e8b6152f 1KB
1e9af0d7724923cc753d86822368e3ce2f29fe 179B
200744337203f43f581d136e7dcd24e2669aba 5KB
21657962b3faab2b6a71d303671116194c97aa 53B
22290c9b3a0ccc07fcf54d2e4eb980b85a4ad7 2KB
22e371b35383ac2fefb323580e33bf78203f12 2KB
2431e3ffe4bfa0a620fd4407166e6e4f03d9b5 90B
2727c391cae931cd4f1dcf673f088459bee9c0 1KB
298e40c6fe8349aaa6a346c16159494396cfc9 1KB
2f341cbb6350e0689e7c4515e13265771196c3 227B
2fed4a7cb7c1bc6c2345b5e5d678cc6c1a7141 419B
315f2becec9705017bfaf1b9fb81ca2a83c0b0 386B
31eeae68a41838d3e4779ea6592a97f64f8319 863B
347c825e9293dcc8accfef83ccc9c6b5ac060d 155B
35a614738828b880aa862bc52423848ac8e472 50KB
363b2cec196eae4d276edc089a25a5192c52b9 2KB
3c2fc9f958a3578f148cfe0f9d2424fb3896b8 163B
3f93ca0c8ee1849997eb3bc3777dd38c359fff 972B
4669b9648b85de7837b2a9e936786100df3b3f 7.71MB
48497bf51bb34a4c28f8de016ad4d80ec592c7 1017B
4a2db86fbefdae24a38a66e7e415cb0a0de76c 540B
4a5b2c858c58588aa04a639af7f2a265aae735 2KB
4ab21beb5bc390a35be24d6a376495010d7f70 155B
4c8695bc2e7584b62f95fed03d1b3e239aeaf8 768B
4e6ce4ba139bef39e596ad78b15da78576f8e2 384B
52694d103b947f0415bb22778d8bc87ba6280d 517B
529ad78420c37f13f341ab43411cf0e6dd778a 175B
53aae653c8b9d31d924a47dca3e5ebabc52df6 41.05MB
56346527c9b7859b9686c3b891505ac9887d0f 470B
5e67f1a0612333192d87d1b89044f9a6044111 168B
5e8548124b851e01397181ca9f94d847091707 83B
6076f203935739d4ae01eb6f62c4cd619b7bba 320B
613bce134d16c9c2cc35363bac6267f2163a32 168B
6603f676b0170fc747670b46568e9bf6f81efa 1KB
66da54597f70a1675e453bc4e4157cbb5e799b 523B
66dd64f35dca87128c5a882978f4f036a04c14 1KB
67c7b222bedcf08a5ac5923c90c0a2209b325d 384B
6834d32258dbb409c891ac44ea3a683276e0ec 160B
6b77bd41e3f57b27d1c6119fed106f40696c0d 182B
766a2e20f8b63b267c1d18c28d22fcfac7fdc4 58B
76a94218d857f4dd31b0f04ab948e0e15130a5 70B
76c55a7df0110f1d394effee3b88dc702f1561 384B
7970a7c0b302ac5514b3b0aceb4ba0fd937079 88B
7b97236db98c3dafe23d6a0bdb7e2b3eb3f6e6 384B
7d253e979e5cd1320f1abe924669943a6f7390 2KB
7ff727378b953d910344c147f3dc6e7be02aa4 55B
8027aedc1ab356570702cbd07e0701039bfd2c 2KB
81c8040066422bebd3f9002d68a2dc18d6d608 800B
87cdc036aa1ebff535c50170977c4f6aff47ac 320B
8a4ba23e7b849f0de540ecf6902a5572a18e49 783B
92106d9d602c7a2e5f44268f47c5d382647a03 1019B
92a424f0c1f6e9e94c248601d00190e14637f1 169B
9368ee88c9463752d60b2a346977ce916b4b64 10KB
973bcf10fceda31ac7280e5f4f6a2b5cba8ae6 609B
983dd5d96bfa9133ae1b9abc3d650086e0e802 8KB
9c9b3ea08691210046fbb9184bf8e44e88f29e 75B
9de29bb2d1d6434b8b29ae775ad8c2e48c5391 15B
a2fb25fb4fb53b2aba77ef07bc9e8356ff8c7c 588B
a70072383f47dd0190ff3831a4d946952de55d 41B
a78518fb4d8dabe9d5281c4154bed17887d16d 1KB
a9f23b7969fcf4a5cef4605c2bc61ba9dfbaee 180B
ac0ad5c4159cec70566da4daba9040ae02971a 961B
ad685b56fa57e9da33ae7a6e17599464ed3d8b 384B
b452510d8404d63bb9580fa1f76149b19c9b6f 2KB
b5657817861b9667f3ac5eca9739ac4e6d7dc0 2KB
b69d487c054ab87469b24b239e9494062eac15 423B
bd90778664373426fcec2c0f56d1f670c2a942 165B
beb741ff31d194f29bfb1bcaff43de03882624 53B
bf66c180481d2e9c4451651e3c6d9bbcbb6f70 85B
c1751f2e7f6b2811d245f6103a001d257d9df9 55B
c5a5e44aaeff485a98ba45b320cc039a63b16a 1KB
c6618bf93911b8941ef7819e8947414bb013a0 53B
c78bbd28b5e403d1c115ab843a6666886f4b9c 2KB
cd72e65c082c48ef45ec8e36881b9b59ac12db 471B
yolov3.cfg 8KB
yolov3.cfg 8KB
yolov3-tiny.cfg 2KB
config 291B
nms_cpu.cpp 2KB
nms_cpu.cpp 2KB
vision.cpp 186B
vision.cpp 186B
nms.cu 5KB
nms.cu 5KB
d14f6abbf40ba27422b1bab22b12ab3628b427 2KB
d5819bb67c84a49387ebfaa36280302844352b 180B
d6dc1da2eef8f93e1ee975a1ac8616777874b0 470B
dbda13a0ae51904e8c8bf5a5b5b97e137c15d0 2KB
dec1e1236e79bf2cf27f01dd36e497e65b7521 157B
description 73B
.DS_Store 6KB
.DS_Store 6KB
e4b781077bf410c5389df2ecc4caa4c76f4b2a 1KB
共 259 条
- 1
- 2
- 3
资源评论
AIPlayer
- 粉丝: 6204
- 资源: 20
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功