运行faster-rcnn/pytorch/jwyang版本出现的错误

参考:

1. github https://github.com/jwyang/faster-rcnn.pytorch/tree/pytorch-1.0

2. 运行方法 https://www.cnblogs.com/wind-chaser/p/11359521.html 作者 wind-chaser (如版权声明形式不规范我会及时更改的!!)

 

问题:

Q1: torch.utils.ffi is deprecated. Please use cpp extensions instead.

着实忘了具体看的哪一篇issue……
类似链接:https://github.com/pytorch/pytorch/issues/15645#issuecomment-466984786

在faster-rcnn pytorch-1.0分支下不需编译make.sh文件

Q2:importError: cannot import name '_mask'?Executed python setup.py build develop 

运行CUDA_VISIBLE_DEVICES=$GPU_ID python trainval_net.py \
>                    --dataset pascal_voc --net vgg16 \
>                    --bs $BATCH_SIZE --nw $WORKER_NUMBER \
>                    --lr $LEARNING_RATE --lr_decay_step $DECAY_STEP \
>                    --cuda

出现error:
Traceback (most recent call last):
  File "trainval_net.py", line 27, in 
    from roi_data_layer.roidb import combined_roidb
  File "/data/jxt/faster-rcnn.pytorch/lib/roi_data_layer/roidb.py", line 9, in 
    from datasets.factory import get_imdb
  File "/data/jxt/faster-rcnn.pytorch/lib/datasets/factory.py", line 15, in 
    from datasets.coco import coco
  File "/data/jxt/faster-rcnn.pytorch/lib/datasets/coco.py", line 23, in 
    from pycocotools.coco import COCO
  File "/data/jxt/faster-rcnn.pytorch/lib/pycocotools/coco.py", line 60, in 
    from . import mask
  File "/data/jxt/faster-rcnn.pytorch/lib/pycocotools/mask.py", line 3, in 
    from . import _mask
ImportError: cannot import name '_mask' from 'pycocotools' (/data/jxt/faster-rcnn.pytorch/lib/pycocotools/__init__.py)

解决方案:
reinstall coco api
link:https://github.com/cocodataset/cocoapi
issue from :https://github.com/jwyang/faster-rcnn.pytorch/issues/410
cd data

git clone https://github.com/pdollar/coco.git 

cd coco/PythonAPI

make

cd ../../..

Q3: cannot import name 'imread' from 'scipy.misc' 

切换scipy版本到1.2.

 

你可能感兴趣的:(DL)