MobileNet-YOLO icon indicating copy to clipboard operation
MobileNet-YOLO copied to clipboard

[Training Issue] Multi-scale training on YOLOv2

Open ryusaeba opened this issue 6 years ago • 3 comments

Model : yolov2

Backbone : Darknet19

Questions : Hi @eric612 ,

When using the multi-scale for YOLOv2 training, it will pop the following message. concat_layer.cpp:42] Check failed: top_shape[j] == bottom[i]->shape(j) (19 vs. 13) All inputs must have the same shape, except at concat_axis. The shape mismatch will have 19 v.s. X, which is depends on the random pick from which one resolution. If disable the multi-scaling feature, the issue will be gone.

The same Annotation layer used in YOLOv3 won't have this error.

Have you ever met this problem before?

ryusaeba avatar Nov 08 '19 06:11 ryusaeba

The reorg layer would not dynamic change blob size when training , it may make some dim error .

https://github.com/eric612/MobileNet-YOLO/blob/master/src/caffe/layers/reorg_layer.cpp

it was copied from here https://github.com/gklz1982/caffe-yolov2/blob/master/src/caffe/layers/reorg_layer.cpp

eric612 avatar Nov 08 '19 06:11 eric612

Hi @eric612 , Thanks for the quick response, so how do you workaround this when using multi-scale trick for YOLOv2?

ryusaeba avatar Nov 08 '19 07:11 ryusaeba

You can reference this code , and modify the reorg layer source code https://github.com/eric612/MobileNet-YOLO/blob/master/src/caffe/layers/yolov3_layer.cpp#L287-L289

eric612 avatar Nov 08 '19 14:11 eric612