PyramidBox icon indicating copy to clipboard operation
PyramidBox copied to clipboard

How to prepare training data?

Open samehraban opened this issue 7 years ago • 7 comments

Could you please elaborate on how to prepare training data? What are the contents of different directories you mentioned in the readme?

samehraban avatar Aug 05 '18 12:08 samehraban

I converted wider dataset to pascal format, then I had run pascalvoc_to_tfrecords.py. When I run train_model.py I get this error:

ValueError: Dimensions must be equal, but are 520400 and 136400 for 'ssd_losses/or1' (op: 'LogicalOr') with input shapes: [520400], [136400].

samehraban avatar Aug 06 '18 04:08 samehraban

I had set batch_size to 16 and setting it back to 1 solved the problem. But how can I train with greater batch sizes?

samehraban avatar Aug 06 '18 12:08 samehraban

@samehraban I forgot to associate some parameters with batchsize, and I will modify it later. You can change the code here first. 25600->25600 * 16( your batchsize ) , 6400->6400 * 16( your batchsize ).The error should be caused by this. I hope you can get a good training result.

EricZgw avatar Aug 08 '18 12:08 EricZgw

@EricZgw Thank you. I also tried to modify image size and got error on that too. Does it make sense to decrease image size and still use current vgg16 checkpoint?

samehraban avatar Aug 08 '18 14:08 samehraban

@samehraban The image size in the original paper is 640*640. The pretrained vgg16 checkpoint may not be very useful, I just think it is multi-scale training in a sense. You can try to train from scratch. And if you change the input size of the image in training, remember to also change the size of anchors.

EricZgw avatar Aug 08 '18 15:08 EricZgw

I change the code with your advise (nets/ssd.py: 25600->25600 * 16( your batchsize ) , 6400->6400 * 16( your batchsize )), but I get the incorrect training results. Is there anything else about batchsize 16 modification?

wwqstevenash avatar Sep 25 '18 03:09 wwqstevenash

@samehraban Hi, did you manage to prepare the training data successfully? Could you share how you managed it?

Thanks!

JuheonYi avatar May 15 '19 13:05 JuheonYi