# Yolov5+SlowFast: Realtime Action Detection
### A realtime action detection frame work based on PytorchVideo.
#### Here are some details about our modification:
- we choose yolov5 as an object detector instead of Faster R-CNN, it is faster and more convenient
- we use a tracker(deepsort) to allocate action labels to all objects(with same ids) in different frames
- our processing speed reached 24.2 FPS at 30 inference batch size (on a single RTX 2080Ti GPU)
> Relevant infomation: [FAIR/PytorchVideo](https://github.com/facebookresearch/pytorchvideo); [Ultralytics/Yolov5](https://github.com/ultralytics/yolov5)
#### Demo comparison between original(<-left) and ours(->right).
<img src="./demo/ava_slowfast.gif" width="400" /><img src="./demo/yolov5+slowfast.gif" width="400" />
#### Update Log:
- 2022.01.24 optimize pre-process method(no need to extract video to image before processing), faster and cleaner.
## Installation
1. clone this repo:
```
git clone https://github.com/wufan-tb/yolo_slowfast
cd yolo_slowfast
```
2. create a new python environment (optional):
```
conda create -n {your_env_name} python=3.7.11
conda activate {your_env_name}
```
3. install requiments:
```
pip install -r requirements.txt
```
4. download weights file(ckpt.t7) from [[deepsort]](https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6) to this folder:
```
./deep_sort/deep_sort/deep/checkpoint/
```
5. test on your video:
```
python yolo_slowfast.py --input {path to your video}
```
The first time execute this command may take some times to download the yolov5 code and it's weights file from torch.hub, keep your network connection.
## References
Thanks for these great works:
[1] [Ultralytics/Yolov5](https://github.com/ultralytics/yolov5)
[2] [ZQPei/deepsort](https://github.com/ZQPei/deep_sort_pytorch)
[3] [FAIR/PytorchVideo](https://github.com/facebookresearch/pytorchvideo)
[4] AVA: A Video Dataset of Spatio-temporally Localized Atomic Visual Actions. [paper](https://arxiv.org/pdf/1705.08421.pdf)
[5] SlowFast Networks for Video Recognition. [paper](https://arxiv.org/pdf/1812.03982.pdf)
## Citation
If you find our work useful, please cite as follow:
```
{ yolo_slowfast,
author = {Wu Fan},
title = { A realtime action detection frame work based on PytorchVideo},
year = {2021},
url = {\url{https://github.com/wufan-tb/yolo_slowfast}}
}
```
### Stargazers over time
[![Stargazers over time](https://starchart.cc/wufan-tb/yolo_slowfast.svg)](https://starchart.cc/wufan-tb/yolo_slowfast)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
yolo_slowfast-master.zip (31个子文件)
yolo_slowfast-master
yolo_slowfast.py 7KB
readme.md 3KB
demo
yolov5+slowfast.gif 3.87MB
ava_slowfast.gif 3.3MB
selfutils
temp.pbtxt 3KB
coco_names.txt 625B
visualization.py 28KB
ava_action_list.pbtxt 3KB
slowfast_detection.py 8KB
requirements.txt 64B
deep_sort
configs
deep_sort.yaml 200B
parser.py 849B
deep_sort
__init__.py 500B
sort
track.py 5KB
kalman_filter.py 8KB
__init__.py 0B
detection.py 1KB
tracker.py 5KB
iou_matching.py 4KB
preprocessing.py 2KB
nn_matching.py 5KB
linear_assignment.py 8KB
deep_sort.py 4KB
deep
__init__.py 0B
evaluate.py 293B
feature_extractor.py 2KB
model.py 3KB
original_model.py 3KB
train.py 6KB
test.py 2KB
.gitignore 96B
共 31 条
- 1
资源评论
- 烟雨柳成烟2024-03-26资源是宝藏资源,实用也是真的实用,感谢大佬分享~
十小大
- 粉丝: 9946
- 资源: 2555
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功