deeplabv3+的github代码:https://github.com/VainF/DeepLabV3Plus-Pytorch
1.我的环境配置
conda安装cud11.0+高版本8.0的cudnn
scipy==1.7.1 numpy==1.21.2 matplotlib==3.4.3 opencv-python==4.5.3.56 torch==1.7.1 torchvision==0.8.2 tqdm==4.62.2 Pillow==8.2.0 h5py==2.10.0 visdom
2.预训练权重下载
腾讯微云:https://share.weiyun.com/qqx78Pv5
讲文件放在新建的文件夹checkpoints下
3.预测图片
首先进入新建的环境
conda activate py1.7
预测结果保存在新建文件夹test_results下
单张图片预测
python predict.py --input 1.png --dataset voc --model deeplabv3plus_mobilenet --ckpt checkpoints/best_deeplabv3plus_mobilenet_voc_os16.pth --save_val_results_to test_results
文件夹下所有图片预测
python predict.py --input samples --dataset voc --model deeplabv3plus_mobilenet --ckpt checkpoints/best_deeplabv3plus_mobilenet_voc_os16.pth --save_val_results_to test_results
参考:https://blog.csdn.net/weixin_46118817/article/details/125121751



