ignaciorlando / red-lesion-detection

This code implements a red lesion detection method based on a combination of hand-crafted features and CNN based descriptors. Our paper is under revision now, so please do not use this repository until we release the paper.
47 stars 14 forks source link

Error with vl_nnconv #3

Closed Seraphina1 closed 7 years ago

Seraphina1 commented 7 years ago

Hi ignaciorlando, I'm also trying to automatically detect microaneurysms, and I've stumbled upon your code. I've done everything like you suggested, but when I try to run script_train_cnn.m I get an error

Error using vl_nnconv
An input is not a numeric array (or GPU support not compiled).

Error in vl_simplenn (line 306)
      res(i+1).x = vl_nnconv(res(i).x, l.weights{1}, l.weights{2}, ...

Error in cnn_red_lesions_train>process_epoch (line 425)
        res = vl_simplenn(net, im, dzdy, res, ...

Error in cnn_red_lesions_train (line 151)
    [net,stats.train(epoch),prof] = process_epoch(net, state, opts, 'train') ;

Error in cnn_red_lesion_detection>train_cnn_from_scratch (line 93)
    [net, info] = cnn_red_lesions_train(net, imdb, getBatch(opts), ...

Error in cnn_red_lesion_detection (line 26)
    [net, info] = train_cnn_from_scratch(opts) ;

Error in script_train_cnn (line 12)
[detector.net, info] = cnn_red_lesion_detection( ...

I get that it's a problem with the GPU and I have no idea how to solve it. Is there a way to run this with only the CPU?

ignaciorlando commented 7 years ago

Hello @Seraphina1,

Thank you for your interest in our code. I think that the main problem can be related with the fact that, by default, the code is compiled to work with GPU, and there might be an issue with your card.

I suggest you to delete the content of the folder "external/matconvnet-master/matlab/mex" and re-run dr_setup.

Let me know if it succeed!

Cheers,

Nacho