Hi
I have followed the instructions to install this package. However, when I run the notebook demo under './demo', it gives an error:
ImportError: No module named maskrcnn_benchmark.config.
Use python 3.x.
@Kongsea
I've got the same ERROR message, but I'm using python 3.6.6
$ python --version
Python 3.6.6
Any other suggestions?
@jiapei100 I found the solution. You need to create an empty __init__.py under the folder "maskrcnn_benchmark".
Traceback (most recent call last):
File "webcam.py", line 6, in
from predictor import COCODemo
File "/data/Data/HeiRen/code/maskrcnn-benchmark/demo/predictor.py", line 7, in
from maskrcnn_benchmark.utils.checkpoint import DetectronCheckpointer
File "/data/Data/HeiRen/code/maskrcnn-benchmark/maskrcnn_benchmark/utils/checkpoint.py", line 7, in
from maskrcnn_benchmark.utils.model_serialization import load_state_dict
File "/data/Data/HeiRen/code/maskrcnn-benchmark/maskrcnn_benchmark/utils/model_serialization.py", line 7, in
from maskrcnn_benchmark.utils.imports import import_file
File "/data/Data/HeiRen/code/maskrcnn-benchmark/maskrcnn_benchmark/utils/imports.py", line 3, in
import importlib.util
ImportError: No module named util
I am adding support for Python 2 in https://github.com/facebookresearch/maskrcnn-benchmark/pull/11 and it should fix the errors you are seeing.
I'll verify that the training that I launched yesterday matches the excepted accuracies and I'll merge it
For info, I've just merged https://github.com/facebookresearch/maskrcnn-benchmark/pull/11 , so the codebase should work with Python 2 as well.
Let me know if you still face problems after pulling from latest version of maskrcnn-benchmark
this is caused by not using conda. after creating new conda name you need to always use source activate name_u_gave to not get this error.
conda create --name maskrcnn_benchmark
source activate maskrcnn_benchmark
yes, I've improved the documentation to add the source activate maskrcnn_benchmark after creating the environemnt
@fmassa
Nope... I didn't use conda at all....
@yaoliUoA
I've added __init__.py under the folder maskrcnn_benchmark, but the ERROR continues....
Make sure that the installation wmis done properly
Also, pull from latest master, I've fixed the missing __init__.py files
As a note, having conda is a very easy and simple way of managing several python environments, and I'd highly recommend it.
when i use 3.x python with conda, every thing is all right.
@moyans me too.
We now support python2 as well, so if it wasn't working before with Python 2, now it should be.
I had the same issue, trying this link helped: https://github.com/jupyter/notebook/issues/1524
Most helpful comment
Use python 3.x.