One-Shot-Object-Detection
One-Shot-Object-Detection copied to clipboard
ImportError: cannot import name '_mask' from 'pycocotools'
Hi, thanks for your work at first.
But when I reimplement your results, I faced some errors.
After I clone the repo, I run the command :
python setup.py build develop
My envirionment is python3.7 and PyTorch1.1.
Then, when I run the code, there is some errors:
ImportError: cannot import name '_mask' from 'pycocotools' (/home/xyang/Code/practical/Few-shot/One-Shot-Object-Detection/lib/pycocotools/__init__.py)
I don't know if I need to run the setup.py with py2?
Hey! I met this issue too. I get new cocoapi files here and install it following the instruction separately ,then the test.py works well.(Not sure about train ,i diden't try it :))
P.S. take care the pathes of those files
P.S.. not native speaker ,hope you can understand :)
P.S... python3.6 pytorch 1.0
Another thing that worked for me was installing pycocotools from : https://github.com/philferriere/cocoapi - the installation was pretty straightforward.
Make sure to delete lib/pycocotools so that the imports point at the pip version and not the local version.
After the installation - You might need to convert the np.round(...) to integer in cocoeval.py -> Params.setDetParams and Params.getKpParams, wherever you installed it with pip.