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

eltwise_layer.cpp:34] Check failed: bottom[0]->shape() == bottom[i]->shape() bottom[0]: 1 21 333 500 (3496500), bottom[1]: 1 21 375 500 (3937500) #159

Open Hesansan opened 5 years ago

Hesansan commented 5 years ago

I combin CRNasRNN to FCN,but this error that i can not deal with it, the title is information of error

Hesansan commented 5 years ago

layer { name: "fuse_pool3" type: "Eltwise" bottom: "score4" bottom: "score-pool3c" top: "score-final" eltwise_param { operation: SUM } } layer { name: "upsample" type: "Deconvolution" bottom: "score-final" top: "bigscore" param { lr_mult: 0 } convolution_param { num_output: 21 bias_term: false kernel_size: 16 stride: 8 weight_filler: { type: "bilinear" } } } layer { type: 'Crop' name: 'crop' bottom: 'bigscore' bottom: 'data' top: 'coarse' crop_param { axis: 2 offset: 31 } }

layer { type: 'Split' name: 'splitting' bottom: 'coarse' top: 'unary' top: 'Q0' }

layer { name: "inference1"#if you set name "inference1", code will load parameters from caffemodel. type: "MultiStageMeanfield" bottom: "unary" bottom: "Q0" bottom: "data" top: "pred" param { lr_mult: 10000#learning rate for W_G } param { lr_mult: 10000#learning rate for W_B } param { lr_mult: 1000 #learning rate for compatiblity transform matrix } multi_stage_meanfield_param { num_iterations: 10 compatibility_mode: POTTS#Initialize the compatilibity transform matrix with a matrix whose diagonal is -1. threshold: 2 theta_alpha: 160 theta_beta: 3 theta_gamma: 3 spatial_filter_weights_str: "3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3" bilateral_filter_weights_str: "5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5" } } layer { name: "loss" type: "SoftmaxWithLoss" bottom: "pred" bottom: "label" top: "loss" loss_param { ignore_label: 255 normalize: false } }

this is part of my code

bittnt commented 5 years ago

You need to pad the image as we did in the demo inference code. Otherwise, you would see this error.