faster-rcnn.pytorch
faster-rcnn.pytorch copied to clipboard
ImportError: cannot import name ‘_mask’from ‘pycocotools’(home/user/faster-rcnn.pytorch/lib/pycocotools/__init__.py)
ImportError: cannot import name ‘_mask’from ‘pycocotools’(home/user/faster-rcnn.pytorch/lib/pycocotools/init.py)
I met this problem when I use lib/pycocotools on win10. I solved this by install pycocotools through the following code in power shell: pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI and abandoned lib/pycocotools in this project folder.
Just build the setup.py in lib folder of the repository. Run this command: cd faster-RCNN.pytorch/lib && python setup.py build develop
It has worked in my case.
https://blog.csdn.net/cube_suger/article/details/112648721