Transformers-Tutorials icon indicating copy to clipboard operation
Transformers-Tutorials copied to clipboard

Generate KIE Output Json from Any LayoutLM Variant

Open purnasai-cyient opened this issue 3 years ago • 5 comments

Hi @NielsRogge,

I am trying to convert the key, Value information that is generated from Any layoutLM variant into a JSON File. Need little help in doing that. Any Idea or way to convert to JSON.

Current output Format: image

Required Format: Map Question--->Answer: { "Fax":"614-466-5087", "TO":"George Baroody", "PHONE NUMBER":"(336) 335-7363", "DATE":"12/10/98", "NUMBER OF PAGES INCLUDING COVER SHEET:":"3" }

If the above looks easy, I have a complex layout format like the below, then How do we do, key-value mapping better and efficiently? form-037-merchant-processing-application-tell-us-

large

Thank you So much.

purnasai-cyient avatar Sep 18 '22 08:09 purnasai-cyient

@purnasai-cyient Did you find an answer to get the KIE Output for the complex layout ?

jyotiyadav94 avatar Sep 29 '22 18:09 jyotiyadav94

Not by following the above way of annotation. I changed the way I annotate. I need only a set of labels from the document.

Currently, I annotated the required text for these classes and all other text as "others" labels.

After Inference, I am doing post-processing to get those labels' text only. But I still want to know, How others approaching this with the Above annotation

purnasai-cyient avatar Sep 29 '22 20:09 purnasai-cyient

@purnasai-cyient

Yeah I agree with few set of labels its easy to get extract the values.I haven't find a good approach for question & answer

jyotiyadav94 avatar Sep 30 '22 07:09 jyotiyadav94

Hi,

I've uploaded some notebooks illustrating how to fine-tune LayoutLMv2/LayoutXLM for relation extraction here: https://github.com/NielsRogge/Transformers-Tutorials/tree/master/LayoutXLM

NielsRogge avatar Sep 30 '22 07:09 NielsRogge

Hi,

I've uploaded some notebooks illustrating how to fine-tune LayoutLMv2/LayoutXLM for relation extraction here: https://github.com/NielsRogge/Transformers-Tutorials/tree/master/LayoutXLM

hey NielsRogge, i want to get output in json formate. how i can do this? your example will be appreciated. thanks

imrankh46 avatar Feb 02 '24 12:02 imrankh46