Hi,
the execution of the following program works fine and successfully generates det_output.h5 file:
./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
As I would like to automate some procedure, I have created own python script which is supposed to automate the whole procedure described in the example (first execute the above command and then observe the results in python). In order to do that, I have tried to add the following subprocess call into custom python script:
cmdShell = './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 %s/det_input.txt %s/det_output.h5' % (dataFolder, dataFolder)
return_code = subprocess.call(cmdShell, shell=True)
The execution unfortunately fails with the following error:
ImportError: No module named selective_search_ijcv_with_python
The execution fails at detector.py, line 113:
import selective_search_ijcv_with_python as selective_search
I have added the following line to ~/.bashrc:
export PYTHONPATH=$PYTHONPATH:/usr/local/caffe/selective_search_ijcv_with_python/
Does anyone know why the module cannot be imported when the command is executed from other python script whereas it can successfully be executed from console?
I would appreciate if anyone could help to solve this issue.
Thank you and best regards,
Niko