I miss the problem Cannot copy param 0 weights from layer 'conv4_3_norm_mbox_loc'; shape mismatch. Source param shape is 16 512 3 3 (73728); target param shape is 12 512 3 3 (55296). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.?
You can rename the mbox layer in network by providing the postfix parameter (already implemented in the function)
@chienyiwang which function ? thank you !
For example, in "ssd_pascal.py" script, the mbox_layers creation:
mbox_layers = CreateMultiBoxHead(net, data_layer='data', from_layers=mbox_source_layers,
use_batchnorm=use_batchnorm, min_sizes=min_sizes, max_sizes=max_sizes,
aspect_ratios=aspect_ratios, normalizations=normalizations,
num_classes=num_classes, share_location=share_location, flip=flip, clip=clip,
prior_variance=prior_variance, kernel_size=3, pad=1)
you can pass in "conf_postfix" and "loc_postfix" in the end to change the name of those layers:
mbox_layers = CreateMultiBoxHead(net, data_layer='data', from_layers=mbox_source_layers,
use_batchnorm=use_batchnorm, min_sizes=min_sizes, max_sizes=max_sizes,
aspect_ratios=aspect_ratios, normalizations=normalizations,
num_classes=num_classes, share_location=share_location, flip=flip, clip=clip,
prior_variance=prior_variance, kernel_size=3, pad=1, conf_postfix='_my_layer', loc_postfix='_my_layer')
Thank you very much !
@chienyiwang I got the same error with him. I modified "video_ssd_pascal.py" script as your solution. But the output is strange, there are so many bounding boxes (labed in 'train' ' person' ‘shape’ ‘cat’ ...VOC_20_class)in the video.I trained the model with own data just for detecting person , so it should have appeared only two classes(person and background) in the output. I didn't modify the train.prototxt and test.prototxt before training the model.
@yanxp @chienyiwang
I use this method,but too many bbox appeared, and they are wrong,any suggestions?
@zgplvyou I have the same problems, so, how did you solve this? thank you very much.
https://stackoverflow.com/questions/39811936/using-bvlc-googlenet-as-pretrained-model-in-digits-errors/39837047#39837047
This SO page may help?
When you rename the layer, Caffe doesn't try to copy the weights for that layer and you get randomly initialized weights
Most helpful comment
For example, in "ssd_pascal.py" script, the mbox_layers creation:
mbox_layers = CreateMultiBoxHead(net, data_layer='data', from_layers=mbox_source_layers,
use_batchnorm=use_batchnorm, min_sizes=min_sizes, max_sizes=max_sizes,
aspect_ratios=aspect_ratios, normalizations=normalizations,
num_classes=num_classes, share_location=share_location, flip=flip, clip=clip,
prior_variance=prior_variance, kernel_size=3, pad=1)
you can pass in "conf_postfix" and "loc_postfix" in the end to change the name of those layers:
mbox_layers = CreateMultiBoxHead(net, data_layer='data', from_layers=mbox_source_layers,
use_batchnorm=use_batchnorm, min_sizes=min_sizes, max_sizes=max_sizes,
aspect_ratios=aspect_ratios, normalizations=normalizations,
num_classes=num_classes, share_location=share_location, flip=flip, clip=clip,
prior_variance=prior_variance, kernel_size=3, pad=1, conf_postfix='_my_layer', loc_postfix='_my_layer')