da-faster-rcnn-PyTorch icon indicating copy to clipboard operation
da-faster-rcnn-PyTorch copied to clipboard

ImportError: No module named '_init_paths' when evaluating

Open viniciusarruda opened this issue 5 years ago • 1 comments

The error:

ImportError: No module named '_init_paths'

is occurring when evaluating a trained model because the eval/test.py cannot see the _init_paths module which is in the parent directory.

viniciusarruda avatar Feb 27 '19 19:02 viniciusarruda

It may happen sometimes in different env , It is not a bug but the path problem. You can try sys.path.insert(0,os.path.abspath(os.path.dirname(__file__)+os.path.sep+'..')) in the eval/test.py. or move the test into the root path directly.

tiancity-NJU avatar Mar 28 '19 03:03 tiancity-NJU