Open bely66 opened 2 years ago
num_chars
has to be hardcoded, but this issue will be eliminated in our upcoming release.so the num_chars should be the exact number? because I have to add 1 for the training to run
@bely66 That's right. The extra character comes from the special "<BOS/EOS>" token.
Hello, there.
I also tried to train the ABINet (vision-only model) on a custom dataset. The dataset contains around 27k training samples and 5k test samples. The chars predicted include numbers(0-9), letters(a-z A-Z), Chinese characters, and some punctuation, leading to ~5K in total. That is to say, the output dimension of the last linear layer is ~5K.
I trained the ABINet by using the default configuration with 20 epochs. I noticed the metrics are pretty much low compared with the reference model.
My results at 19-th epoch:
2022-08-29 17:24:01,492 - mmocr - INFO - Epoch(val) [19][4769]
0_char_recall: 0.1754,
0_char_precision: 0.2006,
0_word_acc: 0.0315,
0_word_acc_ignore_case: 0.0317,
0_word_acc_ignore_case_symbol: 0.0323,
0_1-N.E.D: 0.1470
My loss is always hovering around 4, while the reference loss value is around 0.2.
Friends, do you have any improvement updates? Especially for Chinese text recognition.
Hi Everyone, I'm using my own custom dataset to train ABINET on a non-latin language. I went through the following steps: Generated labels.txt for the data with the OCRDataset format. Added a config file for the new dataset in configs/base/rec_datasets Changed the dataset path to the new config in abinet_academic.py in configs/rec/ then added dict_list with the new language characters in the configs/base/rec_models/abinet.py
I faced a problem because the num_chars is hardcoded in the file:
I changed it to the following:
I added len(dict_list)+1 because it was failing without adding one.
I have Two Questions: