参照YOLO v7 + 各种tracker实现多目标跟踪配置环境
1、配置要求
- python=3.7.0 pytorch=1.7.0 torchvision=0.8.0 cudatoolkit=11.0
- py-motmetrics (pip install motmetrics)
- cython-bbox (pip install cython_bbox)
- opencv
2、配置过程
创建py37虚拟环境
conda create -n uavMOT python=3.7.0
进入虚拟环境uavMOT
conda activate uavMOT
参考Ubuntu20.04安装 Pytorch1.7.0 GPU版 torchvision=0.8.1 (已装好CUDA和CUDNN),下载链接在https://download.pytorch.org/whl/cu101/torch/
中,对应找到即可。将下方中的cp38改为cp37
pip install torch-1.7.0+cu101-cp37-cp37m-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple/
下方指令完全参照Ubuntu20.04安装 Pytorch1.7.0 GPU版 torchvision=0.8.1 (已装好CUDA和CUDNN)来执行
pip install torch==1.7.0+cu101 torchvision==0.8.0+cu101 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
torchvision和cuda版本有调整,其检测过程如下:
>>> import torch
>>> print(torch.__version__)
1.7.0+cu101
>>> import torchvision
>>> print(torchvision.__version__)
0.8.1+cu101
>>> print(torch.version.cuda)
10.1
>>> from torch.backends import cudnn
>>> print(cudnn.is_available())
True
>>> print(torch.cuda.is_available())
True
下方指令需要执行很久
pip install motmetrics
执行下方指令时报错ModuleNotFoundError: No module named 'Cython'
,使用pip install Cython
安装cython时报错ERROR: Could not find a version that satisfies the requirement Cython (from versions: none) ERROR: No matching distribution found for Cython
,参考链接得以成功安装cython
pip install cython_bbox