qjadud1994 / CRNN-Keras

CRNN (CNN+RNN) for OCR using Keras / License Plate Recognition
MIT License
521 stars 191 forks source link

Training from pre-trained model weights. #25

Open Sreerag-ibtl opened 5 years ago

Sreerag-ibtl commented 5 years ago

The code uses VGG architecture for feature extraction. My doubt is that, is it possible to begin training from VGG weights?

qjadud1994 commented 5 years ago

Initialization does not seem to matter.

Because I had trained the CRNN from scratch.

Sreerag-ibtl commented 5 years ago

I tried CRNN with synthetic images of number plates. But the perfomance was poor on real images. So, I was wondering weather it is possible to do transfer learning with a smaller dataset that contains real images.

qjadud1994 commented 5 years ago

Of course, if you train only with synthetic images, it is natural that it does not work properly in real images.

So, I recommend pre-training with synthetic images and fine-tune with real data.

If you have few real images, it might be worth trying to proceed by learning only the last few layers.

Sreerag-ibtl commented 5 years ago

Do you have any suggestion about, upto which layer I should set the trainable flag False. Since there are many different layers involved and GRU layers are also present, I am little confused about this.

NikhilShaw commented 5 years ago

Train all layers except pre-trained ones (VGG).

centurions commented 4 years ago

Train all layers except pre-trained ones (VGG).

Can you please explain more ... ? How to do that ? Would you please show example code ? How to freeze those layers in model.py ? Thank you