LayoutLMV3 information extraction from invoice
Hi,So I was trying out invoice information extraction using LayoutLMV3. There are total 11 ner present. However all of them are not present in every dataset. Like for example:image_1 : has 10 labels(out of the above told 11)image_2 : has 11 labels and so on.The problem is that due to this inconsistency in labels when I give batch_size more than 1 than the following error pops up:ValueError: expected sequence of length 509 at dim 1 (got 512)For few dataset I observed that the labels shape is:torch.Size([509])and for few it’slabels torch.Size([512]).Any help on how to solve this is highly appreciated.Regards
2023-11-28T10:29:01Z
The problem was with the labeling. While labeling the ner corresponding to bbox and tokens few were left out. Thus, the mismatch.
2024-09-22T12:58:16Z
Hi@kaniam, would you mind sharing your code for using LayoutLMv3 to extract information from invoices?