Post-processing steps
Model I am using (LayoutLM): While implementing LayoutLM for custom dataset how do we use the --do predict function and get the test predictions on it? The script will help me identify spans of key and value? How to create a binary classifier based on LayoutLM output embeddings?
Please help and kindly look into the same
Best Regards
@MohitTuli Please refer to the FUNSD paper, where they use the embeddings of the spans to create the binary classifier.
@MohitTuli in order to get key pairs, do we need to fine tune on the FUNSD dataset on our end? or is there a way to --do_predict without retraining? I cannot find an example of the syntax provided
I had to do the fine-tuning either on our own data or on the FUNSD to get it to work
@r000bin can you help me fix this issue - When trying to do --do_predict, if I put the output directory in --do_train as an output directory, it says:' FileExistsError: [Errno 17] File exists: 'outest'
when I try to put an new empty directory for --do_predict, it says :
OSError: Model name 'outputwtf' was not found in tokenizers model name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese, bert-base-german-cased, bert-large-uncased-whole-word-masking, bert-large-cased-whole-word-masking, bert-large-uncased-whole-word-masking-finetuned-squad, bert-large-cased-whole-word-masking-finetuned-squad, bert-base-cased-finetuned-mrpc, bert-base-german-dbmdz-cased, bert-base-german-dbmdz-uncased). We assumed 'outputwtf' was a path or url to a directory containing vocabulary files named ['vocab.txt'] but couldn't find such vocabulary files at this path or url.
can you tell me how you ran the command for --do_predict after completing --do_train
Don't change anything in the command beside --do_predict But that's what you tried first, right? And you got the FileExistsError: [Errno 17] File exists: 'outest' after starting --do_predict?
@elnazsn1988 Facing the same problem. Did you find any solution?
@cococedric14 so I tried posting elsewhere also, no luck - finally used previously forked older commit, this version works for me with none of the issues : https://github.com/elnazsn1988/unilm/tree/master/layoutlm , however not validated full end-to end yet. Also, changed the a few lines I wrote in the read.me there - there is an issue with the writeout and readin commands which can be edited. hope this helps.
@wolfshow @elnazsn1988 @r000bin @mohittuli Hey can you give me overview of how binary classifier can be use use with layoutlm model or where i can change code to make it running with binary classifier. Also how to tackle when key have multiple choice value like checkbox.