sergeyk / selective_search_ijcv_with_python

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

Problem with miobase.py on Windows #8

Open geriby opened 9 years ago

geriby commented 9 years ago

I'm traing to run your program on windows. I Have installed anaconda for numpy and scipy and

changed input source: /dev/null' ---> 'NUL' shlex.split(mc), stdout=open('NUL', 'w'), cwd=script_dirname)

But currently when I run this a have following error:

C:\Anaconda\python.exe D:/gitRepo/selective_search_ijcv_with_python-master/selective_search_ijcv_with_python-master/selective_search.py selective_search({'D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/000015.jpg','D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/cat.jpg','D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/000015.jpg','D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/cat.jpg','D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/000015.jpg','D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/cat.jpg','D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/000015.jpg','D:\gitRepo\selective_search_ijcv_with_python-master\selective_search_ijcv_with_python-master/cat.jpg'}, 'c:\users\opuk\appdata\local\temp\tmphtivfm.mat') Traceback (most recent call last): File "D:/gitRepo/selective_search_ijcv_with_python-master/selective_search_ijcv_with_python-master/selective_search.py", line 64, in boxes = get_windows(image_filenames) File "D:/gitRepo/selective_search_ijcv_with_python-master/selective_search_ijcv_with_python-master/selective_search.py", line 42, in get_windows all_boxes = list(scipy.io.loadmat(output_filename)['all_boxes'][0]) File "C:\Anaconda\lib\site-packages\scipy\io\matlab\mio.py", line 131, in loadmat MR = mat_reader_factory(file_name, appendmat, **kwargs) File "C:\Anaconda\lib\site-packages\scipy\io\matlab\mio.py", line 55, in mat_reader_factory mjv, mnv = get_matfile_version(byte_stream) File "C:\Anaconda\lib\site-packages\scipy\io\matlab\miobase.py", line 218, in get_matfile_version buffer = fileobj.read(4)) TypeError: buffer is too small for requested array

Could you help me find solution?

Best regards.

mtrth commented 9 years ago

Hi I am trying to use selective search on a 8-channel image, and I am facing similar error

selective_search_rcnn({'/home/revathy/caffe-master/images/image0001.tif'}, '/tmp/tmpaHq356.mat') Traceback (most recent call last): File "./python/detect.py", line 173, in main(sys.argv) File "./python/detect.py", line 144, in main detections = detector.detect_selective_search(inputs) File "/home/revathy/caffe-master/python/caffe/detector.py", line 122, in detect_selective_search cmd='selective_search_rcnn' File "/home/revathy/caffe-master/selective_search_ijcv_with_python/selective_search.py", line 42, in get_windows all_boxes = list(scipy.io.loadmat(output_filename)['all_boxes'][0]) File "/usr/lib/python2.7/dist-packages/scipy/io/matlab/mio.py", line 125, in loadmat MR = mat_reader_factory(file_name, appendmat, **kwargs) File "/usr/lib/python2.7/dist-packages/scipy/io/matlab/mio.py", line 55, in mat_reader_factory mjv, mnv = get_matfile_version(byte_stream) File "/usr/lib/python2.7/dist-packages/scipy/io/matlab/miobase.py", line 217, in get_matfile_version buffer = fileobj.read(4)) TypeError: buffer is too small for requested array

Did you find a fix for it ?

dawin2015 commented 8 years ago

I fixed the problem by that redefined the path in the "def_input.txt": /path/to/caffe/examples/images/fish-bike.jpg.