Open hp0716 opened 2 weeks ago
I just evaluated the results and it is consistent with the paper. May I ask if your model loaded is retrained?
[2024/08/29 20:30:23] openrec INFO: valid dataloader has 699 iters
[2024/08/29 20:30:24] openrec INFO: {'Total': 20836249, 'Trainable': 20836249}
[2024/08/29 20:30:25] openrec INFO: finetune from checkpoint ./output/rec/focalsvtr_smtr_ch_aug/best.pth
[2024/08/29 20:30:25] openrec INFO: run with torch 2.2.0 and device cuda:0
[2024/08/29 20:30:25] openrec INFO: metric in ckpt ***************
eval model:: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 699/699 [00:43<00:00, 15.99it/s]
[2024/08/29 20:31:08] openrec INFO: metric eval ***************
[2024/08/29 20:31:08] openrec INFO: acc:0.99279999980144
[2024/08/29 20:31:08] openrec INFO: norm_edit_dis:0.9981769325677972
[2024/08/29 20:31:08] openrec INFO: num_samples:50000
[2024/08/29 20:31:08] openrec INFO: fps:1496.6909505311978
I used the model you provided.
Sorry, I did not match the file structure, thank you for your answer.
Sorry, I'm not sure if I just need these files to run it python tools/eval_rec_all_ch.py --c configs/rec/smtr/focalsvtr_smtr_ch_aug/focalsvtr_smtr_ch_aug.yml
Yes! You just run 'python tools/eval_rec_all_ch.py --c configs/rec/smtr/focalsvtr_smtr_ch_aug/focalsvtr_smtr_ch_aug.yml'. In addition , updating openocr to latest, please. I'm not sure what went wrong, but I ran it successfully with the latest code.
Does the pre-training model need to be updated?
Does the pre-training model need to be updated?
Don't need to, I'm loading the models that are already publicly available.
I have encountered the following error, may I ask what needs to be done before running the mdb file you gave
modify 214-215 line in the tools/data/ratio_dataset_test.py: data['gen_ratio'] = imgW // imgH data['real_ratio'] = round(w/h) return data
This method doesn't work
Sorry, modify 214-215 line in the tools/data/ratio_dataset_test.py AND 172-173 line in the tools/data/ratio_dataset.py: data['gen_ratio'] = imgW // imgH data['real_ratio'] = round(w/h) return data
This method works, but the accuracy does not change. I guess the pre-training model is different from you used. Could you please send me the pre-training model you are using now?
I'm so sorry about this but the pretrained model I'm using was downloaded from the publicly available google drive and nothing has changed. What are the details of your environment? Including your GPU model. You can also try other models, using cpu calculations, or any other available device to verify if you have the same problem.
OK, Could you please send your yml file? I don't know how to specify test set ducument_test or scene_test in this yml file.
The config file is downloaded from the the publicly available google drive
Eval:
dataset:
name: RatioDataSet
ds_width: True
padding: False
padding_rand: False
data_dir_list:
- ../benchmark_bctr/benchmark_bctr_test/document_test # - ../benchmark_bctr/benchmark_bctr_test/scene_test
You can also modify the eval_rec_all_ch.py: data_dirs_list = [[
# '../benchmark_bctr/benchmark_bctr_test/web_test',
'../benchmark_bctr/benchmark_bctr_test/document_test',
# '../benchmark_bctr/benchmark_bctr_test/handwriting_test'
]]
The config file is as follows.
The output is as follows. [2024/08/28 15:03:05] openrec INFO: ../benchmark_bctr/benchmark_bctr_test/document_test valid dataloader has 699 iters eval model:: 100%|██████████████████████████████████████| 699/699 [02:08<00:00, 5.45it/s] [2024/08/28 15:05:13] openrec INFO: metric eval *** [2024/08/28 15:05:13] openrec INFO: acc:0.7463381759763863 [2024/08/28 15:05:13] openrec INFO: norm_edit_dis:0.9638970785267542 [2024/08/28 15:05:13] openrec INFO: num_samples:50453 [2024/08/28 15:05:13] openrec INFO: fps:446.6478682497568 [74.63381759763863, 74.63381759763863]