torrvision / crfasrnn

This repository contains the source code for the semantic image segmentation method described in the ICCV 2015 paper: Conditional Random Fields as Recurrent Neural Networks. http://crfasrnn.torr.vision/
Other
1.34k stars 462 forks source link

Training #127

Open luciaL opened 7 years ago

luciaL commented 7 years ago

I trained my own data using TVG_new_traintest.prototxt. I changed the number of output and the name of the deconvolution layer as well as initialize the weights of all layers.But the output is still all black.Then I visualized feature of every layer.I found that the feature become all black after the first deconvolution layer.Do you know where the problem lie???

bittnt commented 7 years ago

This is because you did not successfully initialize the deconv layer.

Sam813 commented 6 years ago

@luciaL I have the same issue, may I know how did you solve it?

below is the way that I did it, since My images consist of two class of background and tumors I changed the 21 to 2, and also renamed it to xxx_new

layer { name: "score2-new" type: "Deconvolution" bottom: "score" top: "score2-new" param { lr_mult: 1 } convolution_param { num_output: 2 #21 kernel_size: 4 stride: 2 weight_filler: { type: "xavier" std: 0.1 } bias_filler { type: "constant" value: 0.2 } } } So as you see, i changed the number of outputs to 2 and initialize the weights by xavier method.

I have included my train prototext in case it can help.

Train_prototext.txt

luciaL commented 6 years ago

Thank you so much @Sam813 . I have finished this work already. Good luck.