sanghoon / pva-faster-rcnn

Demo code for PVANet
https://arxiv.org/abs/1611.08588
Other
650 stars 241 forks source link

check failed: target_blobs.size() == source_layer.blobs_size() (1 vs. 0). Incompatible number of blobs for layer conv1_1/conv #69

Open lixiang-ucas opened 7 years ago

lixiang-ucas commented 7 years ago

i'm using pva-faster-rcnn on windows+cuda8.0. I'm trying to training my own data (1 object class and background) with the following code:

python tools/train_net.py --gpu 0 --solver models/pvanet/example_train/solver.prototxt --weights models/pvanet/pva9.1/PVA9.1_ImgNet_COCO_VOC0712.caffemodel --iters 10 --cfg models/pvanet/cfgs/train.yml --imdb voc_2007_trainval

besides, i changed some layer names in train.prototxt. layer { name: "cls_score-lx" type: "InnerProduct" bottom: "fc7" top: "cls_score" param { lr_mult: 1.0 } param { lr_mult: 2.0 } inner_product_param { num_output: 2 weight_filler { type: "gaussian" std: 0.01 } bias_filler { type: "constant" value: 0 } } } layer { name: "bbox_pred-lx" type: "InnerProduct" bottom: "fc7" top: "bbox_pred" param { lr_mult: 1.0 } param { lr_mult: 2.0 } inner_product_param { num_output: 8 weight_filler { type: "gaussian" std: 0.001 } bias_filler { type: "constant" value: 0 } } } layer { name: "loss_cls-lx" type: "SoftmaxWithLoss" bottom: "cls_score" bottom: "labels" propagate_down: 1 propagate_down: 0 top: "loss_cls" include { phase: TRAIN } loss_weight: 1 loss_param { ignore_label: -1 normalize: true } } layer { name: "loss_bbox-lx" type: "SmoothL1Loss" bottom: "bbox_pred" bottom: "bbox_targets" bottom: "bbox_inside_weights" bottom: "bbox_outside_weights" top: "loss_bbox" include { phase: TRAIN } loss_weight: 1 } layer { name: "cls_prob-lx" type: "Softmax" bottom: "cls_score" top: "cls_prob" include { phase: TEST } loss_param { ignore_label: -1 normalize: true } }

sjtuGC commented 7 years ago

Have you solved this problem?

yzhang123 commented 7 years ago

if you specify --imdb voc_2007_trainval you are training on voc 2007 (that means you try to use the voc data with 21 classes but with a different net topology, they dont match)!! you have to specify your own data. and I believe your parameters are wrong as well. if you want to adapt the # output classes, you need to change the lines 17, 6532, 6713, -> change to #your_classes 6726, ->change to #your_classes * 4

lixiang-ucas commented 7 years ago

@yzhang123 i have already changed the configuration you specified before i met the above problem. I'm wondering the “PVA9.1_ImgNet_COCO_VOC0712.caffemodel” doesn't have a layer named "conv1_1/conv". But how?

FzuLJ commented 6 years ago

@lixiang-ucas Hi, I met same problem like yours. Did you solve the problem?