OpenOCR icon indicating copy to clipboard operation
OpenOCR copied to clipboard

Long text custom training + Image size in config problem

Open hiennt168 opened this issue 1 year ago • 2 comments

I tested that in your demo, the OCR results are quite good even with long text. However, in the training config of SVTRv2, the image_shape is set to [48, 320],which seems rather short, roughly around 6 to 7 characters.

Was the checkpoint used in the demo trained with this image shape configuration? I want to finetune the model on a custom dataset consisting of text lines cropped from PDF files, where image width can vary from 0 to 1200. How should I modify the config to make this finetuning possible?

hiennt168 avatar Aug 01 '25 08:08 hiennt168

Try the following shape configuration:

      - RecTVResize:
          image_shape: [48, 960]
          padding: True

Topdu avatar Aug 05 '25 10:08 Topdu

@FahNos 这个链接实现了,请问还有其他链接可参考吗

maomaoyuchengzi avatar Jan 15 '26 03:01 maomaoyuchengzi