sergeyk / selective_search_ijcv_with_python

Simple Python script to compute Selective Search proposals in Matlab.
Other
183 stars 113 forks source link

ImportError: No module named selective_search_ijcv_with_python #1

Closed fengyang0317 closed 10 years ago

fengyang0317 commented 10 years ago

I have add the path of selective_search_ijcv_with_python in to sys.path, but python still cannot find it. What should I do?

fengyang0317 commented 10 years ago

rename the selective_search_ijcv_with_python-master folder to selective_search_ijcv_with_python and add its path to sys.path.

teknosains commented 10 years ago

@fengyang0317 hi, how did you install it ? just download the codes ? do i need to have matlab installed ? thanks

dawin2015 commented 8 years ago

I fixed the problem and I told the details to someone who needed. ImportError: No module named selective_search_ijcv_with_python I rename the file selective_search_ijcv_with_python_master to selective_search_ijcv_with_python and put it under the caffe root. Then added the path to the PYTHONPATH and validate it by import selective_search_ijcv_with_python in python mode.

pauldelmusica commented 7 years ago

I am having the same problem. There is no longer such file as "selective_search_ijcv_with_python_master".

I added C:\projects\caffe\examples\selective_search_ijcv_with_python to PYTHONPATH as instructed and did a test to show it works.

import selective_search_ijcv_with_python as selective_search

In addition, the following test also show the path is added properly:

import sys print(sys.path) ['', 'C:\projects\caffe\examples\selective_search_ijcv_with_python', .... <- OK

However, when I ran detect.py on the command line, it gives me the error "ImportError: No module named selective_search_ijcv_with_python". I traced the line in detector.py that did the import and added the following two lines right before the actual import command, still no luck:

    import sys
    sys.path.append('C:\projects\caffe\examples\selective_search_ijcv_with_python')
    import selective_search_ijcv_with_python as selective_search  # <-  the troubled import line 

Here is the detailed message:

c:\projects\caffe\examples>python ..\python\detect.py --crop_mode=selective_search --pretrained_model=..\models\bvlc_reference_rcnn_ilsvrc13\bvlc_reference_rcnn_ilsvrc13.caffemodel --model_def=..\models\bvlc_reference_rcnn_ilsvrc13\deploy.prototxt --gpu --raw_scale=255 _temp\det_input.txt _temp\det_output.h5 Traceback (most recent call last): File "..\python\detect.py", line 28, in import caffe File "c:\projects\caffe\python\caffe__init__.py", line 6, in from .detector import Detector File "c:\projects\caffe\python\caffe\detector.py", line 23, in import selective_search_ijcv_with_python as selective_search ImportError: No module named selective_search_ijcv_with_python