houqb / DSS

code for "Deeply supervised salient object detection with short connections" published in CVPR 2017
MIT License
240 stars 79 forks source link

Error when trying to run the demo #1

Closed danielzuegner closed 7 years ago

danielzuegner commented 7 years ago

When I try to run cell #3 of the DSS tutorial notebook, I get the following error:

I0529 12:11:43.640518 15105 layer_factory.hpp:77] Creating layer crop
I0529 12:11:43.640524 15105 net.cpp:91] Creating Layer crop
I0529 12:11:43.640528 15105 net.cpp:425] crop <- score-dsn6-up
I0529 12:11:43.640532 15105 net.cpp:425] crop <- data_input_0_split_1
I0529 12:11:43.640537 15105 net.cpp:399] crop -> upscore-dsn6
F0529 12:11:43.640548 15105 crop_layer.cpp:68] Check failed: bottom[0]->shape(i) - crop_offset >= bottom[1]->shape(i) (1 vs. 3) invalid crop parameters in dimension: 1
*** Check failure stack trace: ***

I'm using caffe release 1.0. How can I get the code to run?

Thank you very much in advance.

houqb commented 7 years ago

Maybe you need to update your crop layer. This is because your crop layer takes the second dimension into account. Specifically, the first bottom is with 1 channel but the second one has 3 because you set it to the input image.