microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities
https://aka.ms/GeneralAI
MIT License
20.2k stars 2.55k forks source link

How to get bbox on funsd model prediction #204

Open sryeddula opened 4 years ago

sryeddula commented 4 years ago

Model I am using (LayoutLM[seq_labeling]):

After successfully training using FUNSD data set. When I try to predict I am only getting test_predictions bunt not bounding box co-ordinates. Can you please help me get bounding boxes on prediction

SibtainRazaJamali commented 4 years ago

its output is in the same order as your passed input tokens. You can easily map your bounding boxes to the corresponding prediction tokens as they are separated by new line tokens.

elnazsn1988 commented 4 years ago

@SibtainRazaJamali @sryeddula Can you share the command you used to run the --do_predict? also, do we have to retrain on FUNSD, or can we use the pretrained weights to predict?