[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71088":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},71088,"donut","clovaai\u002Fdonut","clovaai","Official Implementation of OCR-free Document Understanding Transformer (Donut) and Synthetic Document Generator (SynthDoG), ECCV 2022","https:\u002F\u002Farxiv.org\u002Fabs\u002F2111.15664",null,"Python",6877,562,54,207,0,4,15,67.75,"MIT License",false,"master",true,[25,26,27,28,29,30],"computer-vision","document-ai","eccv-2022","multimodal-pre-trained-model","nlp","ocr","2026-06-12 04:00:58","\u003Cdiv align=\"center\">\n    \n# Donut 🍩 : Document Understanding Transformer\n\n[![Paper](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-arxiv.2111.15664-red)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2111.15664)\n[![Conference](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FECCV-2022-blue)](#how-to-cite)\n[![Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-Gradio-brightgreen)](#demo)\n[![Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-Colab-orange)](#demo)\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdonut-python?color=green&label=pip%20install%20donut-python)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fdonut-python)\n[![Downloads](https:\u002F\u002Fstatic.pepy.tech\u002Fpersonalized-badge\u002Fdonut-python?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fdonut-python)\n\nOfficial Implementation of Donut and SynthDoG | [Paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2111.15664) | [Slide](https:\u002F\u002Fdocs.google.com\u002Fpresentation\u002Fd\u002F1gv3A7t4xpwwNdpxV_yeHzEOMy-exJCAz6AlAI9O5fS8\u002Fedit?usp=sharing) | [Poster](https:\u002F\u002Fdocs.google.com\u002Fpresentation\u002Fd\u002F1m1f8BbAm5vxPcqynn_MbFfmQAlHQIR5G72-hQUFS2sk\u002Fedit?usp=sharing)\n\n\u003C\u002Fdiv>\n\n## Introduction\n\n**Donut** 🍩, **Do**cume**n**t **u**nderstanding **t**ransformer, is a new method of document understanding that utilizes an OCR-free end-to-end Transformer model. Donut does not require off-the-shelf OCR engines\u002FAPIs, yet it shows state-of-the-art performances on various visual document understanding tasks, such as visual document classification or information extraction (a.k.a. document parsing). \nIn addition, we present **SynthDoG** 🐶, **Synth**etic **Do**cument **G**enerator, that helps the model pre-training to be flexible on various languages and domains.\n\nOur academic paper, which describes our method in detail and provides full experimental results and analyses, can be found here:\u003Cbr>\n> [**OCR-free Document Understanding Transformer**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2111.15664).\u003Cbr>\n> [Geewook Kim](https:\u002F\u002Fgeewook.kim), [Teakgyu Hong](https:\u002F\u002Fdblp.org\u002Fpid\u002F183\u002F0952.html), [Moonbin Yim](https:\u002F\u002Fgithub.com\u002Fmoonbings), [JeongYeon Nam](https:\u002F\u002Fgithub.com\u002Flong8v), [Jinyoung Park](https:\u002F\u002Fgithub.com\u002Fjyp1111), [Jinyeong Yim](https:\u002F\u002Fjinyeong.github.io), [Wonseok Hwang](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=M13_WdcAAAAJ), [Sangdoo Yun](https:\u002F\u002Fsangdooyun.github.io), [Dongyoon Han](https:\u002F\u002Fdongyoonhan.github.io), [Seunghyun Park](https:\u002F\u002Fscholar.google.com\u002Fcitations?user=iowjmTwAAAAJ). In ECCV 2022.\n\n\u003Cimg width=\"946\" alt=\"image\" src=\"misc\u002Foverview.png\">\n\n## Pre-trained Models and Web Demos\n\nGradio web demos are available! [![Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-Gradio-brightgreen)](#demo) [![Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDemo-Colab-orange)](#demo)\n|:--:|\n|![image](misc\u002Fscreenshot_gradio_demos.png)|\n- You can run the demo with `.\u002Fapp.py` file.\n- Sample images are available at `.\u002Fmisc` and more receipt images are available at [CORD dataset link](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fnaver-clova-ix\u002Fcord-v2).\n- Web demos are available from the links in the following table.\n- Note: We have updated the Google Colab demo (as of June 15, 2023) to ensure its proper working.\n\n|Task|Sec\u002FImg|Score|Trained Model|\u003Cdiv id=\"demo\">Demo\u003C\u002Fdiv>|\n|---|---|---|---|---|\n| [CORD](https:\u002F\u002Fgithub.com\u002Fclovaai\u002Fcord) (Document Parsing)   |   0.7 \u002F\u003Cbr> 0.7 \u002F\u003Cbr> 1.2   |  91.3 \u002F\u003Cbr> 91.1 \u002F\u003Cbr> 90.9    | [donut-base-finetuned-cord-v2](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-cord-v2\u002Ftree\u002Fofficial) (1280) \u002F\u003Cbr> [donut-base-finetuned-cord-v1](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-cord-v1\u002Ftree\u002Fofficial) (1280) \u002F\u003Cbr> [donut-base-finetuned-cord-v1-2560](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-cord-v1-2560\u002Ftree\u002Fofficial) | [gradio space web demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-cord-v2),\u003Cbr>[google colab demo (updated at 23.06.15)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1NMSqoIZ_l39wyRD7yVjw2FIuU2aglzJi?usp=sharing) |\n| [Train Ticket](https:\u002F\u002Fgithub.com\u002Fbeacandler\u002FEATEN) (Document Parsing)   |   0.6   |  98.7    | [donut-base-finetuned-zhtrainticket](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-zhtrainticket\u002Ftree\u002Fofficial) | [google colab demo (updated at 23.06.15)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1YJBjllahdqNktXaBlq5ugPh1BCm8OsxI?usp=sharing) |\n| [RVL-CDIP](https:\u002F\u002Fwww.cs.cmu.edu\u002F~aharley\u002Frvl-cdip) (Document Classification)     |  0.75   |   95.3      | [donut-base-finetuned-rvlcdip](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-rvlcdip\u002Ftree\u002Fofficial) | [gradio space web demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fnielsr\u002Fdonut-rvlcdip),\u003Cbr>[google colab demo (updated at 23.06.15)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1iWOZHvao1W5xva53upcri5V6oaWT-P0O?usp=sharing) |\n| [DocVQA Task1](https:\u002F\u002Frrc.cvc.uab.es\u002F?ch=17) (Document VQA) |  0.78       | 67.5 | [donut-base-finetuned-docvqa](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-docvqa\u002Ftree\u002Fofficial) | [gradio space web demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fnielsr\u002Fdonut-docvqa),\u003Cbr>[google colab demo (updated at 23.06.15)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1oKieslZCulFiquequ62eMGc-ZWgay4X3?usp=sharing) |\n\nThe links to the pre-trained backbones are here:\n- [`donut-base`](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-base\u002Ftree\u002Fofficial): trained with 64 A100 GPUs (~2.5 days), number of layers (encoder: {2,2,14,2}, decoder: 4), input size 2560x1920, swin window size 10, IIT-CDIP (11M) and SynthDoG (English, Chinese, Japanese, Korean, 0.5M x 4).\n- [`donut-proto`](https:\u002F\u002Fhuggingface.co\u002Fnaver-clova-ix\u002Fdonut-proto\u002Ftree\u002Fofficial): (preliminary model) trained with 8 V100 GPUs (~5 days), number of layers (encoder: {2,2,18,2}, decoder: 4), input size 2048x1536, swin window size 8, and SynthDoG (English, Japanese, Korean, 0.4M x 3).\n\nPlease see [our paper](#how-to-cite) for more details.\n\n## SynthDoG datasets\n\n![image](misc\u002Fsample_synthdog.png)\n\nThe links to the SynthDoG-generated datasets are here:\n\n- [`synthdog-en`](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fnaver-clova-ix\u002Fsynthdog-en): English, 0.5M.\n- [`synthdog-zh`](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fnaver-clova-ix\u002Fsynthdog-zh): Chinese, 0.5M.\n- [`synthdog-ja`](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fnaver-clova-ix\u002Fsynthdog-ja): Japanese, 0.5M.\n- [`synthdog-ko`](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fnaver-clova-ix\u002Fsynthdog-ko): Korean, 0.5M.\n\nTo generate synthetic datasets with our SynthDoG, please see `.\u002Fsynthdog\u002FREADME.md` and [our paper](#how-to-cite) for details.\n\n## Updates\n\n**_2023-06-15_** We have updated all Google Colab demos to ensure its proper working.\u003Cbr>\n**_2022-11-14_** New version 1.0.9 is released (`pip install donut-python --upgrade`). See [1.0.9 Release Notes](https:\u002F\u002Fgithub.com\u002Fclovaai\u002Fdonut\u002Freleases\u002Ftag\u002F1.0.9).\u003Cbr>\n**_2022-08-12_** Donut 🍩 is also available at [huggingface\u002Ftransformers 🤗](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmain\u002Fen\u002Fmodel_doc\u002Fdonut) (contributed by [@NielsRogge](https:\u002F\u002Fgithub.com\u002FNielsRogge)). `donut-python` loads the pre-trained weights from the `official` branch of the model repositories. See [1.0.5 Release Notes](https:\u002F\u002Fgithub.com\u002Fclovaai\u002Fdonut\u002Freleases\u002Ftag\u002F1.0.5).\u003Cbr>\n**_2022-08-05_** A well-executed hands-on tutorial on donut 🍩 is published at [Towards Data Science](https:\u002F\u002Ftowardsdatascience.com\u002Focr-free-document-understanding-with-donut-1acfbdf099be) (written by [@estaudere](https:\u002F\u002Fgithub.com\u002Festaudere)).\u003Cbr>\n**_2022-07-20_** First Commit, We release our code, model weights, synthetic data and generator.\n\n## Software installation\n\n[![PyPI](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fdonut-python?color=green&label=pip%20install%20donut-python)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fdonut-python)\n[![Downloads](https:\u002F\u002Fstatic.pepy.tech\u002Fpersonalized-badge\u002Fdonut-python?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fdonut-python)\n\n```bash\npip install donut-python\n```\n\nor clone this repository and install the dependencies:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fclovaai\u002Fdonut.git\ncd donut\u002F\nconda create -n donut_official python=3.7\nconda activate donut_official\npip install .\n```\n\nWe tested [donut-python](https:\u002F\u002Fpypi.org\u002Fproject\u002Fdonut-python\u002F1.0.1) == 1.0.1 with:\n- [torch](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fpytorch) == 1.11.0+cu113 \n- [torchvision](https:\u002F\u002Fgithub.com\u002Fpytorch\u002Fvision) == 0.12.0+cu113\n- [pytorch-lightning](https:\u002F\u002Fgithub.com\u002FLightning-AI\u002Flightning) == 1.6.4\n- [transformers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers) == 4.11.3\n- [timm](https:\u002F\u002Fgithub.com\u002Frwightman\u002Fpytorch-image-models) == 0.5.4\n\n**Note**: From several reported issues, we have noticed increased challenges in configuring the testing environment for `donut-python` due to recent updates in key dependency libraries. While we are actively working on a solution, we have updated the Google Colab demo (as of June 15, 2023) to ensure its proper working. For assistance, we encourage you to refer to the following demo links: [CORD Colab Demo](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1NMSqoIZ_l39wyRD7yVjw2FIuU2aglzJi?usp=sharing), [Train Ticket Colab Demo](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1YJBjllahdqNktXaBlq5ugPh1BCm8OsxI?usp=sharing), [RVL-CDIP Colab Demo](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1iWOZHvao1W5xva53upcri5V6oaWT-P0O?usp=sharing), [DocVQA Colab Demo](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1oKieslZCulFiquequ62eMGc-ZWgay4X3?usp=sharing).\n\n## Getting Started\n\n### Data\n\nThis repository assumes the following structure of dataset:\n```bash\n> tree dataset_name\ndataset_name\n├── test\n│   ├── metadata.jsonl\n│   ├── {image_path0}\n│   ├── {image_path1}\n│             .\n│             .\n├── train\n│   ├── metadata.jsonl\n│   ├── {image_path0}\n│   ├── {image_path1}\n│             .\n│             .\n└── validation\n    ├── metadata.jsonl\n    ├── {image_path0}\n    ├── {image_path1}\n              .\n              .\n\n> cat dataset_name\u002Ftest\u002Fmetadata.jsonl\n{\"file_name\": {image_path0}, \"ground_truth\": \"{\\\"gt_parse\\\": {ground_truth_parse}, ... {other_metadata_not_used} ... }\"}\n{\"file_name\": {image_path1}, \"ground_truth\": \"{\\\"gt_parse\\\": {ground_truth_parse}, ... {other_metadata_not_used} ... }\"}\n     .\n     .\n```\n\n- The structure of `metadata.jsonl` file is in [JSON Lines text format](https:\u002F\u002Fjsonlines.org), i.e., `.jsonl`. Each line consists of\n  - `file_name` : relative path to the image file.\n  - `ground_truth` : string format (json dumped), the dictionary contains either `gt_parse` or `gt_parses`. Other fields (metadata) can be added to the dictionary but will not be used.\n- `donut` interprets all tasks as a JSON prediction problem. As a result, all `donut` model training share a same pipeline. For training and inference, the only thing to do is preparing `gt_parse` or `gt_parses` for the task in format described below.\n\n#### For Document Classification\nThe `gt_parse` follows the format of `{\"class\" : {class_name}}`, for example, `{\"class\" : \"scientific_report\"}` or `{\"class\" : \"presentation\"}`.\n- Google colab demo is available [here](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1xUDmLqlthx8A8rWKLMSLThZ7oeRJkDuU?usp=sharing).\n- Gradio web demo is available [here](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fnielsr\u002Fdonut-rvlcdip).\n\n#### For Document Information Extraction\nThe `gt_parse` is a JSON object that contains full information of the document image, for example, the JSON object for a receipt may look like `{\"menu\" : [{\"nm\": \"ICE BLACKCOFFEE\", \"cnt\": \"2\", ...}, ...], ...}`.\n- More examples are available at [CORD dataset](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fnaver-clova-ix\u002Fcord-v2).\n- Google colab demo is available [here](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1o07hty-3OQTvGnc_7lgQFLvvKQuLjqiw?usp=sharing).\n- Gradio web demo is available [here](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fnaver-clova-ix\u002Fdonut-base-finetuned-cord-v2).\n\n#### For Document Visual Question Answering\nThe `gt_parses` follows the format of `[{\"question\" : {question_sentence}, \"answer\" : {answer_candidate_1}}, {\"question\" : {question_sentence}, \"answer\" : {answer_candidate_2}}, ...]`, for example, `[{\"question\" : \"what is the model name?\", \"answer\" : \"donut\"}, {\"question\" : \"what is the model name?\", \"answer\" : \"document understanding transformer\"}]`.\n- DocVQA Task1 has multiple answers, hence `gt_parses` should be a list of dictionary that contains a pair of question and answer.\n- Google colab demo is available [here](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1Z4WG8Wunj3HE0CERjt608ALSgSzRC9ig?usp=sharing).\n- Gradio web demo is available [here](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fnielsr\u002Fdonut-docvqa).\n\n#### For (Pseudo) Text Reading Task\nThe `gt_parse` looks like `{\"text_sequence\" : \"word1 word2 word3 ... \"}`\n- This task is also a pre-training task of Donut model.\n- You can use our **SynthDoG** 🐶 to generate synthetic images for the text reading task with proper `gt_parse`. See `.\u002Fsynthdog\u002FREADME.md` for details.\n\n### Training\n\nThis is the configuration of Donut model training on [CORD](https:\u002F\u002Fgithub.com\u002Fclovaai\u002Fcord) dataset used in our experiment. \nWe ran this with a single NVIDIA A100 GPU.\n\n```bash\npython train.py --config config\u002Ftrain_cord.yaml \\\n                --pretrained_model_name_or_path \"naver-clova-ix\u002Fdonut-base\" \\\n                --dataset_name_or_paths '[\"naver-clova-ix\u002Fcord-v2\"]' \\\n                --exp_version \"test_experiment\"    \n  .\n  .                                                                                                                                                                                                                                         \nPrediction: \u003Cs_menu>\u003Cs_nm>Lemon Tea (L)\u003C\u002Fs_nm>\u003Cs_cnt>1\u003C\u002Fs_cnt>\u003Cs_price>25.000\u003C\u002Fs_price>\u003C\u002Fs_menu>\u003Cs_total>\u003Cs_total_price>25.000\u003C\u002Fs_total_price>\u003Cs_cashprice>30.000\u003C\u002Fs_cashprice>\u003Cs_changeprice>5.000\u003C\u002Fs_changeprice>\u003C\u002Fs_total>\nAnswer: \u003Cs_menu>\u003Cs_nm>Lemon Tea (L)\u003C\u002Fs_nm>\u003Cs_cnt>1\u003C\u002Fs_cnt>\u003Cs_price>25.000\u003C\u002Fs_price>\u003C\u002Fs_menu>\u003Cs_total>\u003Cs_total_price>25.000\u003C\u002Fs_total_price>\u003Cs_cashprice>30.000\u003C\u002Fs_cashprice>\u003Cs_changeprice>5.000\u003C\u002Fs_changeprice>\u003C\u002Fs_total>\nNormed ED: 0.0\nPrediction: \u003Cs_menu>\u003Cs_nm>Hulk Topper Package\u003C\u002Fs_nm>\u003Cs_cnt>1\u003C\u002Fs_cnt>\u003Cs_price>100.000\u003C\u002Fs_price>\u003C\u002Fs_menu>\u003Cs_total>\u003Cs_total_price>100.000\u003C\u002Fs_total_price>\u003Cs_cashprice>100.000\u003C\u002Fs_cashprice>\u003Cs_changeprice>0\u003C\u002Fs_changeprice>\u003C\u002Fs_total>\nAnswer: \u003Cs_menu>\u003Cs_nm>Hulk Topper Package\u003C\u002Fs_nm>\u003Cs_cnt>1\u003C\u002Fs_cnt>\u003Cs_price>100.000\u003C\u002Fs_price>\u003C\u002Fs_menu>\u003Cs_total>\u003Cs_total_price>100.000\u003C\u002Fs_total_price>\u003Cs_cashprice>100.000\u003C\u002Fs_cashprice>\u003Cs_changeprice>0\u003C\u002Fs_changeprice>\u003C\u002Fs_total>\nNormed ED: 0.0\nPrediction: \u003Cs_menu>\u003Cs_nm>Giant Squid\u003C\u002Fs_nm>\u003Cs_cnt>x 1\u003C\u002Fs_cnt>\u003Cs_price>Rp. 39.000\u003C\u002Fs_price>\u003Cs_sub>\u003Cs_nm>C.Finishing - Cut\u003C\u002Fs_nm>\u003Cs_price>Rp. 0\u003C\u002Fs_price>\u003Csep\u002F>\u003Cs_nm>B.Spicy Level - Extreme Hot Rp. 0\u003C\u002Fs_price>\u003C\u002Fs_sub>\u003Csep\u002F>\u003Cs_nm>A.Flavour - Salt & Pepper\u003C\u002Fs_nm>\u003Cs_price>Rp. 0\u003C\u002Fs_price>\u003C\u002Fs_sub>\u003C\u002Fs_menu>\u003Cs_sub_total>\u003Cs_subtotal_price>Rp. 39.000\u003C\u002Fs_subtotal_price>\u003C\u002Fs_sub_total>\u003Cs_total>\u003Cs_total_price>Rp. 39.000\u003C\u002Fs_total_price>\u003Cs_cashprice>Rp. 50.000\u003C\u002Fs_cashprice>\u003Cs_changeprice>Rp. 11.000\u003C\u002Fs_changeprice>\u003C\u002Fs_total>\nAnswer: \u003Cs_menu>\u003Cs_nm>Giant Squid\u003C\u002Fs_nm>\u003Cs_cnt>x1\u003C\u002Fs_cnt>\u003Cs_price>Rp. 39.000\u003C\u002Fs_price>\u003Cs_sub>\u003Cs_nm>C.Finishing - Cut\u003C\u002Fs_nm>\u003Cs_price>Rp. 0\u003C\u002Fs_price>\u003Csep\u002F>\u003Cs_nm>B.Spicy Level - Extreme Hot\u003C\u002Fs_nm>\u003Cs_price>Rp. 0\u003C\u002Fs_price>\u003Csep\u002F>\u003Cs_nm>A.Flavour- Salt & Pepper\u003C\u002Fs_nm>\u003Cs_price>Rp. 0\u003C\u002Fs_price>\u003C\u002Fs_sub>\u003C\u002Fs_menu>\u003Cs_sub_total>\u003Cs_subtotal_price>Rp. 39.000\u003C\u002Fs_subtotal_price>\u003C\u002Fs_sub_total>\u003Cs_total>\u003Cs_total_price>Rp. 39.000\u003C\u002Fs_total_price>\u003Cs_cashprice>Rp. 50.000\u003C\u002Fs_cashprice>\u003Cs_changeprice>Rp. 11.000\u003C\u002Fs_changeprice>\u003C\u002Fs_total>\nNormed ED: 0.039603960396039604                                                                                                                                  \nEpoch 29: 100%|█████████████| 200\u002F200 [01:49\u003C00:00,  1.82it\u002Fs, loss=0.00327, exp_name=train_cord, exp_version=test_experiment]\n```\n\nSome important arguments:\n\n- `--config` : config file path for model training.\n- `--pretrained_model_name_or_path` : string format, model name in Hugging Face modelhub or local path.\n- `--dataset_name_or_paths` : string format (json dumped), list of dataset names in Hugging Face datasets or local paths.\n- `--result_path` : file path to save model outputs\u002Fartifacts.\n- `--exp_version` : used for experiment versioning. The output files are saved at `{result_path}\u002F{exp_version}\u002F*`\n\n### Test\n\nWith the trained model, test images and ground truth parses, you can get inference results and accuracy scores.\n\n```bash\npython test.py --dataset_name_or_path naver-clova-ix\u002Fcord-v2 --pretrained_model_name_or_path .\u002Fresult\u002Ftrain_cord\u002Ftest_experiment --save_path .\u002Fresult\u002Foutput.json\n100%|█████████████| 100\u002F100 [00:35\u003C00:00,  2.80it\u002Fs]\nTotal number of samples: 100, Tree Edit Distance (TED) based accuracy score: 0.9129639764131697, F1 accuracy score: 0.8406020841373987\n```\n\nSome important arguments:\n\n- `--dataset_name_or_path` : string format, the target dataset name in Hugging Face datasets or local path.\n- `--pretrained_model_name_or_path` : string format, the model name in Hugging Face modelhub or local path.\n- `--save_path`: file path to save predictions and scores.\n\n## How to Cite\nIf you find this work useful to you, please cite:\n```bibtex\n@inproceedings{kim2022donut,\n  title     = {OCR-Free Document Understanding Transformer},\n  author    = {Kim, Geewook and Hong, Teakgyu and Yim, Moonbin and Nam, JeongYeon and Park, Jinyoung and Yim, Jinyeong and Hwang, Wonseok and Yun, Sangdoo and Han, Dongyoon and Park, Seunghyun},\n  booktitle = {European Conference on Computer Vision (ECCV)},\n  year      = {2022}\n}\n```\n\n## License\n\n```\nMIT license\n\nCopyright (c) 2022-present NAVER Corp.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and\u002For sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","Donut是一个用于文档理解的端到端Transformer模型，无需依赖传统的OCR引擎或API。其核心功能包括视觉文档分类和信息提取，通过SynthDoG生成合成文档以增强模型在多语言和多领域中的预训练灵活性。该项目采用Python开发，基于深度学习技术，在多种文档理解任务中表现出色。适用于需要高效处理图像文档并从中提取关键信息的场景，如财务报表分析、合同审查等。MIT许可证使得该项目易于被广泛使用和二次开发。",2,"2026-06-11 03:35:49","high_star"]