PolarMask: Single Shot Instance Segmentation with Polar Representation 论文复现笔记

PolarMask: Single Shot Instance Segmentation with Polar Representation 论文复现笔记

官方代码:https://github.com/xieenze/PolarMask
官方论文解读:https://zhuanlan.zhihu.com/p/84890413

创建环境

conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
conda install cython

Install PyTorch stable 
eg:conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch

安装mmcv:
git clone https://github.com/open-mmlab/mmcv.git
cd mmcv
pip install .

git clone https://github.com/xieenze/PolarMask.git
cd PolarMask

python setup.py develop

错误及解决方案

1、AssertionError(‘PyTypeTest on non extension type’), <traceback object at 0x7f66b577fd70>)
报这个错误的原因是因为没有安装pycocotools;
解决方法:pip install pycocotools

train

# 单gpu
python tools/train.py configs/polarmask/4gpu/polar_768_1x_r50.py

#多gpu
./tools/dist_train.sh configs/polarmask/4gpu/polar_768_1x_r50.py 4 --launcher pytorch --work_dir ./work_dirs/polar_768_1x_r50_4gpu
#制定个gpu 例:2CUDA_VISIBLE_DEVICES=0,1 python tools/train.py configs/polarmask/4gpu/polar_768_1x_r50.py --gpus 2


错误及解决方案

1、ModuleNotFoundError: No module named ‘imagecorruptions’
训练程序的时候回报各种缺少依赖库的消息,根据提示安装即可
2、ModuleNotFoundError: No module named 'mmcv.cnn.weight_init
报这个错误我觉得可能是MMCV版本过高,把版本降到0.5.9错误解决。很迷!
pip install mmcv==0.5.9

test

python ./tools/test.py ./configs/polarmask/4gpu/polar_768_1x_r50.py ./work_dirs/latest.pth --out=result.pkl

eval

python ./tools/coco_eval.py result.pkl ./configs/polarmask/4gpu/polar_768_1x_r50.py

参考:https://blog.csdn.net/NOSYPIPA/article/details/100761963
参考:https://blog.csdn.net/qq_36530992/article/details/104672750

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值