Open harora opened 8 years ago
Please show the files you modified, Especially the training proto files.
Hi @harora, did you make any changes to your training prototxt files ?
same quesrion . and I'm mad now
Can you share your training prototxt file? This error is due to dimension mismatch.
The size of "bbox_pred" layer should be 4*"num_classes". Also, make sure that the "cls_score" layer is the same size as "num_classes" layer.
Did you solve it? I have the same quession
I also had a similar problem and realized that I changed the num_classes to 19 instead of adding one background class. Changing num_classes to 20 solved my problem for a dataset of 19 object classes. Don't forget the background class!
@metehandoyran Thank you so much! This was the answer for me too, we forgot to add the background class.
Thank you very much. The key is the background
For me the problem was solved by removing the cached .pkl files from ./data/cache/
I also had a similar problem and realized that I changed the num_classes at /models/imagenet/VGG16/faster_rcnn_end2end/train.prototex instead of /models/pascal_voc/VGG16/faster_rcnn_end2end/train.prototxt
I also had a similar problem and realized that I changed the num_classes to 19 instead of adding one background class. Changing num_classes to 20 solved my problem for a dataset of 19 object classes. Don't forget the background class! @metehandoyran thank you for your suggestion,it helps me a lot . my fault is because of that the key "id" in category in json begins with “zero",the real value should starts with "1".
but I have change the file of pascal_voc ,when I training ,they also give me the Error
I hope i can get your help very much and give you my best wishes ![Uploading QV0J5$OXEM%7NG$H@3NB`OI.png…]()
For me the problem was solved by removing the cached .pkl files from ./data/cache/_train_gt.pkl
I fix the problem by doing the same with you
Hi I was training model on my own dataset. I am facing error ValueError: could not broadcast input array from shape (4) into shape (0) and this occurs after iteration 120 . So its probably a problem because of inappropriate data. Can someone help me on this ? Kindle tell me a way to trace that image so i can remove it from my dataset.
I0825 06:35:20.970911 30024 solver.cpp:245] Train net output #3: rpn_loss_bbox = 0.0442318 (* 1 = 0.0442318 loss) I0825 06:35:20.970918 30024 sgd_solver.cpp:106] Iteration 120, lr = 0.001 Traceback (most recent call last): File "tools/train_net.py", line 112, in
max_iters=args.max_iters)
File "/home/harora/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 160, in train_net
model_paths = sw.train_model(max_iters)
File "/home/harora/py-faster-rcnn/tools/../lib/fast_rcnn/train.py", line 101, in train_model
self.solver.step(1)
File "/home/harora/py-faster-rcnn/tools/../lib/rpn/proposal_target_layer.py", line 66, in forward
rois_per_image, self._num_classes)
File "/home/harora/py-faster-rcnn/tools/../lib/rpn/proposal_target_layer.py", line 191, in _sample_rois
_get_bbox_regression_labels(bbox_target_data, num_classes)
File "/home/harora/py-faster-rcnn/tools/../lib/rpn/proposal_target_layer.py", line 127, in _get_bbox_regression_labels
bbox_targets[ind, start:end] = bbox_target_data[ind, 1:]
ValueError: could not broadcast input array from shape (4) into shape (0)