Open khawar-islam opened 1 year ago
Dear @JaidedTeam
I would like to fine-tune the EASY OCR in the handwritten Korean language, I am assuming that the pre-trained model is already trained in Korean and English vocabulary and I will enhance the Korean handwritten accuracy on EASY OCR. How do I achieve it? I know how to train custom models but due to the large size of English datasets, I don't want to train in Korean and English from scratch. I have already 10 M KOREAN handwritten images.
Regards, Khawar
Just my two cents if its of any use. I assume you dont need training for detector model as it should be very accurate. . You may freeze the freeze extraction layer and maybe even the sequential layer of the recognition model and then fine tune only on the Korean dataset with a relatively small learning rate. Modern ML models have loads of methods to reduce multivariate shift so this approach can work imo (it did lead to a relatively better thai lang model at my side).
Dear @MdotO thanks for your answer. Yes, you are right, I am working on recognition model and currently fine-tuning Korean recognition model with approximately 6M
images. I changed several parameters in .yaml
file and if you can recommend me some better parameter please. At the moment, the Best_accuracy on [214000/900000] is : 6.667
and model cannot further increase the performance. 6.667 I got on [30000/900000]
YAML File
batch_size: 128 #32
workers: 16
num_iter: 900000
lr: 1.
# Model Architecture
Transformation: 'None'
FeatureExtraction: 'VGG'
SequenceModeling: 'BiLSTM'
Prediction: 'CTC'
num_fiducial: 20
input_channel: 1
output_channel: 256
hidden_size: 256
decode: 'greedy'
new_prediction: True
freeze_FeatureFxtraction: False
freeze_SequenceModeling: False
is 6.67 the accuracy or some loss value ? seems like loss as 6.67 % accuracy itself is extremely low. There can be many things potentially to be done not involving yaml(I am not sure of those details) but even for the parameters themselves, there are a few things to try out !
Thank you for your suggestion. 6.67 is Best accuracy, you can see below.
[131000/900000] Train loss: 0.00137, Valid loss: 8.52225, Elapsed_time: 175221.94042
Current_accuracy : 3.333, Current_norm_ED : 0.5855
Best_accuracy : 6.667, Best_norm_ED : 0.6071
saved_model: /media/cvpr/CM_24/EasyOCR/easyocr/model/korean_g2.pth
Once again thanks for your suggestion now lets wait for the result
Hello, how was the result?
@akiyomov not that much bad
Dear @JaidedTeam
I would like to fine-tune the EASY OCR in the handwritten Korean language, I am assuming that the pre-trained model is already trained in Korean and English vocabulary and I will enhance the Korean handwritten accuracy on EASY OCR. How do I achieve it? I know how to train custom models but due to the large size of English datasets, I don't want to train in Korean and English from scratch. I have already 10 M KOREAN handwritten images.
Regards, Khawar