源码地址:https://github.com/bubbliiiing/ssd-pytorch
二、环境配置
1、创建环境
使用anaconda进行环境配置,创建一个ssd的环境:
conda create -n ssd python=3.8 -y
2、进入环境
激活anaconda环境:
conda activate ssd
3、torch安装
安装torch和torchvision,我所使用的torch版本为1.9.1+cu111,对应的torchvision版本为0.10.1+cu111:
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.html
4、其他依赖包安装
由于SSD开发时间较早,很多依赖包版本已经过时,建议不要通过requirements.txt安装,自己一个一个安装包,下方就是SSD所需要的所有依赖包:
scipy
matplotlib
opencv_python
tqdm
Pillow==9.5.0
h5py
tensorboard
四、训练
部署参考博客:https://blog.csdn.net/Yayisheng/article/details/137888258?ops_request_misc=&request_id=&biz_id=102&utm_term=SSD%20%E9%83%A8%E7%BD%B2&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-3-137888258.142v100control&spm=1018.2226.3001.4187
训练参考博客:https://blog.csdn.net/weixin_44791964/article/details/104981486
五、报错
AttributeError: module ‘distutils‘ has no attribute ‘version‘
参考博客:https://blog.csdn.net/weixin_49183141/article/details/134518321?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522171526361316800226519265%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=171526361316800226519265&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-1-134518321-null-null.142v100control&utm_term=n%20AttributeError%3A%20module%20distutils%20has%20no%20attribute%20version&spm=1018.2226.3001.4187
解决方法 三