nightrome / matconvnet-calvin

Code for several state-of-the-art papers in object detection and semantic segmentation.
http://calvin.inf.ed.ac.uk/
Other
86 stars 72 forks source link

SelectiveSearch demo error (SelectiveSearchCodeIJCV) #18

Closed Dmitrivm closed 7 years ago

Dmitrivm commented 7 years ago

Hi! I've got this error when I tried to run demo from SelectiveSearchCodeIJCV package. Could you please help me with this issue? I've tried to switch between two different versions of SelectiveSearchCodeIJCV (old and new one) but I have the same error.

Thanks in advance!

`Error using CountVisualWordsIndex (line 21) First two input arguments should have the same 2D dimension

Error in BlobStructColourHist

Error in Image2HierarchicalGrouping (line 42) [colourHist blobSizes] = BlobStructColourHist(blobIndIm, colourIm);

Error in demo (line 61) [boxes blobIndIm blobBoxes hierarchy] = Image2HierarchicalGrouping(im, sigma, k, minSize, colorType, simFunctionHandles);`

nightrome commented 7 years ago

Hi, are you also using Mac OS X like #9 ? Because on Ubuntu Selective Search would be installed all by itself and you don't have to do anything. And why did you switch the Selective Search version? The two versions are not compatible and therefore I cannot guarantee that the older version (the non IJCV version) will work.

Dmitrivm commented 7 years ago

Yes, I am. I have EL Capitan OS X 10.11.3.

But OSX version doesn't matter I think. Maybe this information about my configuration is more important: Matlab R2017a Xcode 7.2 with clang 7.0.2 (installed specially for CUDA 8 installation) CUDA 8.0 cuDNN 5.1 (because I couldn't build MatConvNet with cuDNN 6) MatConvNet 1.0-beta24

I switched to the other version of SelectiveSearch because I got this error and I hoped that maybe new version solve this issue, but there is no difference. Excluding that that one of the dependency libraries was not built by default. After building it I got the same error again. So I switched back to the version you recommend to download and you in your README.

By the way, where can I get SelectiveSearchCodeIJCV that work correctly on your side? I'll check it. Maybe there some modifications.

nightrome commented 7 years ago

The script that downloads Selective Search is https://github.com/nightrome/matconvnet-calvin/blob/master/matconvnet-calvin/matlab/setup/downloadSelectiveSearch.m. There you can see that it downloads the code from http://koen.me/research/downloads/SelectiveSearchCodeIJCV.zip.

Dmitrivm commented 7 years ago

Thanks for quick answer! I've got SelectiveSearchCodeIJCV.zip and unpack using your script but I still have the same error. Can you give me some ideas? I can debug it but what should I check?

If it is possible can you tell me the indexIm and wordIm objects shape if you stop at breakpoint on the line 20 in CountVisualWordsIndex.m? I have different dimensions for the second axis (0 and 500) and it leads to error. I don't know what it means and what is the root reason of this error because I don't understand this code logic enough by now.

K>> size(indexIm) ans = 375 0 K>> size(wordIm) ans = 375 500 3

Dmitrivm commented 7 years ago

I've checked result os these lines of code:

[blobIndIm blobBoxes neighbours] = mexFelzenSegmentIndex(imageToSegment, sigma, k, minSize);
numBlobs = size(blobBoxes,1);

numBlobs is zero.

Does it mean that mexFelzenSegmentIndex doesn't work correctly of something wrong with source image? I've checked image data with Imshow - quite nice bicycle.

nightrome commented 7 years ago

Hi, I am sorry, but I don't currently have a working environment where I could debug the code. Unless someone else can help you, you might want to switch to Ubuntu or another semantic segmentation method.

Dmitrivm commented 7 years ago

By the end of the day I've managed to run MatConvNet on Mac OS X. Some later I'll make some notes about how to solve this issue.

syeda27 commented 7 years ago

Dmitrivm how did you solve this issue.I am using windows 10 with matlab 2017 and getting same errors as yours?.

Dmitrivm commented 6 years ago

Sorry! I've missed your message.

  1. You have to edit string 149 (int* dims = (int*) mxGetDimensions(input[0]);) because size of int type is compiler dependent and it has less bytes in Xcode cpp compiler than in gcc. So you should your use special mwSize type for unpacking values. Correct code is: mwSize* dims = (mwSize*) mxGetDimensions(input[0]);

  2. Probably you have to correct QPBO instances.inc file to align with current C++ standard by adding three string to the end of file:

template class QPBO<int>; template class QPBO<float>; template class QPBO<double>;

Hope it will be helpful.

Ten000hours commented 6 years ago

I met the same problem when i used the matlab version of RCNN with Ubuntu16.04,CUDA 8.0,cudnn5.1,matlab R2014b.can you help me to solve this question?thanks a lot

PoLun-Wang commented 5 years ago

The IJCV version works perfectly on Ubuntu 18.10 LTS with Matlab R2018b.

jayChung0302 commented 5 years ago

The IJCV version works perfectly on Ubuntu 18.10 LTS with Matlab R2018b.

I met the problem with Matlab R2018b..(I'm using window10) Did you fix any single code? or install other packages?