目录
一、pytorch环境配置
vim ~/.condarc
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
show_channel_urls: true
conda create -n pytorch
source activate pytorch
conda install python
pip install --upgrade pip
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
# pip install -r requirements.txt
# base ----------------------------------------
Cython
matplotlib>=3.2.2
numpy>=1.18.5
opencv-python>=4.1.2
pillow
PyYAML>=5.3
scipy>=1.4.1
tensorboard>=2.2
torch>=1.6.0
torchvision>=0.7.0
tqdm>=4.41.0
# coco ----------------------------------------
# pycocotools>=2.0
# export --------------------------------------
# packaging # for coremltools
# coremltools==4.0
# onnx>=1.7.0
# scikit-learn==0.19.2 # for coreml quantization
# extras --------------------------------------
# thop # FLOPS computation
# seaborn # plotting
二、下载权重
bash download_weights.sh
三、运行detect.py
原图一:
原图一检测结果:
原图二:
原图二检测结果:
四、运行test.py
真实标注框:
yolo5预测结果:
PR曲线图:
git:https://github.com/lvxiaojie111/yolov5.git