sml2h3 / ddddocr

带带弟弟 通用验证码识别OCR pypi版
https://ddddocr.com
MIT License
9.01k stars 1.65k forks source link

项目名称包含下划线(_)时,恢复训练时提取 history_step 异常 #102

Open frankxzw opened 1 year ago

frankxzw commented 1 year ago

/utils/train.py line: 58

checkpoint_name = checkpoint.split(".")[0].split("_")
if int(checkpoint_name[3]) > history_step:
    newer_checkpoint = checkpoint
    history_step = int(checkpoint_name[3])

to

checkpoint_name = checkpoint.split(".")[0].split("_")
if int(checkpoint_name[-1]) > history_step:
    newer_checkpoint = checkpoint
    history_step = int(checkpoint_name[-1])