bytetrack-demo

Ubuntu
python3.6
cuda=10.1

conda create -n bytetrack python=3.6
conda activate bytetrack

装好torch和torchvision
torch=1.7.0
torchvision=0.8.1
将作者给的代码克隆到本地后,把requirements.txt中torch和torchvision删去

cd ByteTrack
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

修改setup.py中的代码:

with open("README.md", "r") as f:
    long_description = f.read()
修改为:
with open("README.md", "r", encoding='utf-8') as f:
    long_description = f.read()        
python setup.py develop
pip install cython
pip install "git+https://gitee.com/wsyin/cocoapi.git#subdirectory=PythonAPI"
pip install cython_bbox

下载作者训练好的模型文件,以bytetrack_s_mot17.pth.tar为例,下载好后放在根目录下新建的models文件夹内。
运行:

python tools/demo_track.py video -f exps/example/mot/yolox_s_mix_det.py -c ./models/bytetrack_s_mot17.pth.tar --path ./videos/palace.mp4 --fp16 --fuse --save_result

bytetrack-demo_第1张图片
结果保存在yolox_outputs中

你可能感兴趣的:(笔记,深度学习,目标检测,计算机视觉)