收集的大家踩的坑
https://blog.csdn.net/wolfhunterhu/article/details/91489601
https://blog.csdn.net/u010826850/article/details/103666308
自己遇到的一些问题
1、ImportError: cannot import name imread
将scipy降级
pip install scipy==1.2.1
2、ValueError: object __array__ method not producing an array
解决:https://github.com/chenyuntc/simple-faster-rcnn-pytorch/issues/72
3、RuntimeError: DataLoader worker (pid 22960) is killed by signal: Killed.
Docker中运行Pytorch,并且DataLoader采用了多进程(num_workers>0),当内存不足时报错。
https://blog.csdn.net/songyu0120/article/details/89170030
这个问题就是,数据在加载过程中耗尽了内存
解决:https://blog.csdn.net/zhangyunpeng0922/article/details/86524250
4、undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE
删除lib\build中的内容,并重新在lib目录下运行
python setup.py build develop
类似问题还可参考:
https://github.com/jwyang/faster-rcnn.pytorch/issues/503
5、ImportError: cannot import name '_mask'
或者ModuleNotFoundError: no module named'pycocotools_mask'
运行
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
make
make install
然后将/data/cocoapi/PythonAPI/pycocotools整个文件夹复制覆盖lib/pycocotools文件夹