目录
todo 推荐阅读
视频实时行为检测——基于yolov5+deepsort+slowfast算法-优快云博客
概览
环境配置
slowfast源代码
Installation
SlowFast/INSTALL.md at main · facebookresearch/SlowFast · GitHub
根据Requirements要求,编写对应的requirements.txt文件:
git+https://github.com/facebookresearch/fvcore
git+https://github.com/facebookresearch/fairscale
git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI
https://download.pytorch.org/whl/cu117/torchvision-0.15.2%2Bcu117-cp39-cp39-linux_x86_64.whl
https://download.pytorch.org/whl/cu117/torch-2.0.1%2Bcu117-cp39-cp39-linux_x86_64.whl
simplejson
av
iopath
psutil
opencv-python
tensorboard
moviepy
pytorchvideo
cython
ubuntu依赖:
1 GCC >= 4.9
使用命令:cat /proc/version 查看gcc版本
安装gcc的命令:
sudo apt install g++-4.9
sudo apt install gcc-4.9
拓展学习
cython
Cython 是什么?为什么会有 Cython?-优快云博客
pyav
Py之av:av库的简介、安装、使用方法之详细攻略_python av库-优快云博客
pip install git+
pip install -e
run demo
执行demo的命令
python tools/run_net.py --cfg demo/AVA/SLOWFAST_32x2_R101_50_50.yaml
必要的代码:上一步Installation中下载的 detectron2_repo SlowFast-main
yaml配置改动
DEMO:
ENABLE: True
LABEL_FILE_PATH: /home/wengyang/codes/learn-slowfast/SlowFast-main/demo/AVA/class80_new.json # Add local label file path here.
INPUT_VIDEO: /home/wengyang/codes/learn-slowfast/input/lancer.mp4
OUTPUT_FILE: /home/wengyang/codes/learn-slowfast/output/lancer.mp4
# WEBCAM: 0
DETECTRON2_CFG: "COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml"
DETECTRON