安装pytorch
pip3 install torch
pip3 install --no-deps torchvision
安装visdom
pip3 install visdom
python3 -m visdom.server
下载代码
git clone https://github.com/ZhongyuanW/SSD_mobilenetv2-with-Focal-loss
下载数据集
cd SSD_mobilenetv2-with-Focal-loss/data/scripts
./VOC2007.sh ~ (将数据集下载到用户根目录,如果下载慢,可以用迅雷)
./VOC2012.sh ~
下载预训练模型
1.百度网盘: https://pan.baidu.com/s/1RmOPF4jQYpYlE_8E4DifeQ 提取码: f53n
2.下载mobilenetv2.pth.tar,放到SSD_mobilenetv2-with-Focal-loss\weights下
修改显卡索引
train.py中修改为os.environ["CUDA_VISIBLE_DEVICES"] = "0"