Code Monkey home page Code Monkey logo

Comments (2)

zx1239856 avatar zx1239856 commented on September 7, 2024

BTW, if I use the provided code, I got F-1 91.5 on CORD dataset, which closely matches the numbers in the paper.

If I include the unmatched ground truth as false negatives, the F-1 is 83.6.

from donut.

gwkrsrch avatar gwkrsrch commented on September 7, 2024

Hi, thank you for reporting the issue. No, it is not intended. It seems that this issue has occurred during the recent refactoring to 1.0.6. donut-python>=1.0.7 will resolve the issue (pip install donut-python --upgrade).

Regarding the different scores, we have tested various versions/types of F1, and the current implementation in this repository is the most rigid one. For example, it counts the case where the key is exact-matched but the value is not (e.g., "menu.nm":"Cake" & "menu.nm":"cake") as both FP and FN. Note that this might be too severe for all methods in an end-to-end setting (regardless of the OCR dependency. Also, this is a reason for using a TED-based metric). For instance, if a single character is missed in the OCR, there is no chance for the conventional tagging-based models. For the various versions, the overall trends among the methods were the same in our analyses. The current version will return a score of around 84.

python test.py --dataset_name_or_path naver-clova-ix/cord-v2 --pretrained_model_name_or_path naver-clova-ix/donut-base-finetuned-cord-v2
100%|█████████████| 100/100 [00:35<00:00,  2.80it/s]
Total number of samples: 100, Tree Edit Distance (TED) based accuracy score: 0.9374973163596032, F1 accuracy score: 0.8406020841373987

The current script (donut-python>=1.0.7) is simple and easy to understand, and we further improved and fixed our script during the refactoring. With the latest evaluation script, we updated the scores at https://arxiv.org/abs/2111.15664. See https://github.com/clovaai/donut#test also. Hope this helps :)

from donut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.