NielsRogge / Transformers-Tutorials

This repository contains demos I made with the Transformers library by HuggingFace.
MIT License
9.54k stars 1.45k forks source link

help with fine tune layoutxlm #466

Open piarosebelledelapaz opened 1 month ago

piarosebelledelapaz commented 1 month ago

hello,

i want to fine tune layout xlm with 13 categories i have annotations from PaddleOCR KIE, with a dataset structure of:

image.jpeg \t annotations image.jpeg \t annotations image.jpeg \t annotations

where the annotations include transcription, points (bboxes), key_cls (labels), and is stored in a txt file.

i was using the approach of paddleocr but the KIE models based on layoutlm has restrictions with max_seq_len=512, so i would like to finetune the model myself and have the max_seq_len=1024. any assistance on how to do it?

also is it possible to use my weights from the trained model of paddleocr for the detection adn recognition?

thank you for the help in advance.