PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12k stars 2.93k forks source link

[Question]: Ernie-layout - how bbox and segment bbox cordinates in ernie-layout are different from layoutlm bbox values? #4999

Open vishal-nayak1 opened 1 year ago

vishal-nayak1 commented 1 year ago

请提出你的问题

Hi, how bbox and segment bbox coordinates in ernie-layout are different from layoutlm model input bbox values? Also is the bbox values of layoutlm is similar to bbox coordinates values of ernie-layout? Are they normalised coordinates?

bbox In ernie layout - left, top, width, height (normalized) bbox in layoutlm - (left, top, left+width, top+height) (normalized) is it right?

linjieccc commented 1 year ago

@vishal-nayak1 Hi,

the setting of bbox is the same in both models - (left, top, left+width, top+height) (normalized in range of 0~1000).

layoutlm: https://github.com/PaddlePaddle/PaddleNLP/blob/develop/paddlenlp/transformers/layoutlm/modeling.py#L110

ernie-layout: https://github.com/PaddlePaddle/PaddleNLP/blob/develop/paddlenlp/transformers/ernie_layout/modeling.py#L140

vishal-nayak1 commented 1 year ago

@linjieccc Got it Thanks!