Open sailes437 opened 10 years ago
I had the same problem.:(
This usually means that the Matlab code is actually not outputting anything meaningful. Look at the temporary file that selective search outputs -- it's probably 0 bytes.
On Fri, Oct 31, 2014 at 4:26 AM, cmxnono notifications@github.com wrote:
I had the same problem.:(
— Reply to this email directly or view it on GitHub https://github.com/sergeyk/selective_search_ijcv_with_python/issues/6#issuecomment-61247798 .
@sergeyk I think all of us are following the guidelines from the webpage below. http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/detection.ipynb So do you have any advice when facing TypeError: buffer is too small for requested array?
Thank you!
Find the file that python is trying to load and confirm that it actually has contents (matlab can open it). If it doesn't, the matlab code isn't being called correctly or isn't doing what it's supposed to -- there's a number of possible reasons for that, and you'll have to figure it out.
On Wed, Nov 5, 2014 at 9:02 AM, viczong notifications@github.com wrote:
@sergeyk https://github.com/sergeyk I think all of us are following the guidelines from the webpage below.
http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/detection.ipynb So do you have any advice when facing TypeError: buffer is too small for requested array?
Thank you!
— Reply to this email directly or view it on GitHub https://github.com/sergeyk/selective_search_ijcv_with_python/issues/6#issuecomment-61842912 .
@sergeyk I get to know the problem just now, thank you for your quick reply!
To all that may face this problem:
If you follow the instruction from http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/detection.ipynb and face the above problem, you should check _temp folder and to see whether the path mentioned in det_input.txt is right.
The problem was because the path to the image was not correct. So the .mat file was not created correctly. Thanks for all your help :)
If others are having this same problem even after fixing the image path, here's how I solved this problem: the matlab scripts in this project require the Image Processing toolkit add-on to be installed, so it's not enough to have a standalone student version of Matlab. After I installed the Image Processing add-on, this error went away and the module worked as expected.
Hi I am trying to use selective search on a 8-channel image, and I am facing similar error
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
But if I follow the instruction from http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/detection.ipynb and test it on a (3channel) RGB image it works fine. Is it because selective search cannot work on a k-channel image ?
Thank you so much !!!
@sergeyk when i write python selective_search.py . and it say: scipy.io.matlab.miobase.MatReadError: Mat file appears to be empty. my platform is windows.and i change"\dev\null" to "NUL".
@Lvhhhh I have the same problem did you solve it yet?
i changed '/dev/null' to os.devnull
I am trying to run a detection program on caffe (https://github.com/BVLC/caffe) the file detect.py uses selective search. I have downloaded the selective_search_ijcv_with_python. The demo.m file runs fine with MATLAB and works. Also the selective_search.py file executes fine and gives result. But when i try to run detect.py file (that uses selective search) it schows error. 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 I have found some forum talks saying that it has something to do with scipy, numpy but i dont understand what. Thanks in advance.