Donut :doughnut:, Document understanding transformer, 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/APIs, 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).

We strongly recommend using a virtual environment. If you're not sure where to start, we offer a tutorial here.
pip install ikomia
from ikomia.dataprocess.workflow import Workflow
# Init your workflow
wf = Workflow()
# Add algorithm
algo = wf.add_task(name="infer_donut", auto_connect=True)
# Run on your image
wf.run_on(url="https://raw.githubusercontent.com/Ikomia-hub/infer_donut/refs/heads/main/images/example.jpg")
# Display results
extracted_data = algo.get_output(1)
print(extracted_data.data)
Ikomia Studio offers a friendly UI with the same features as the API.
Parameters should be in strings format when added to the dictionary.
from ikomia.dataprocess.workflow import Workflow
# Init your workflow
wf = Workflow()
# Add algorithm
algo = wf.add_task(name="infer_donut", auto_connect=True)
algo.set_parameters({
"model_name": "naver-clova-ix/donut-base-finetuned-docvqa",
"prompt": "What is the date of the document",
"cuda": "True"
})
wf.run_on(url="https://raw.githubusercontent.com/Ikomia-hub/infer_donut/refs/heads/main/images/example.jpg")
# Display results
extracted_data = algo.get_output(1)
print(extracted_data.data)
Every algorithm produces specific outputs, yet they can be explored them the same way using the Ikomia API. For a more in-depth understanding of managing algorithm outputs, please refer to the documentation.
from ikomia.dataprocess.workflow import Workflow
# Init your workflow
wf = Workflow()
# Add algorithm
algo = wf.add_task(name="infer_donut", auto_connect=True)
# Run on your image
wf.run_on(url="https://raw.githubusercontent.com/Ikomia-hub/infer_donut/refs/heads/main/images/example.jpg")
# Iterate over outputs
for output in algo.get_outputs():
# Print information
print(output)
# Export it to JSON
output.to_json()
Python
100.0%
Donut :doughnut:, Document understanding transformer, 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/APIs, 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).

We strongly recommend using a virtual environment. If you're not sure where to start, we offer a tutorial here.
pip install ikomia
from ikomia.dataprocess.workflow import Workflow
# Init your workflow
wf = Workflow()
# Add algorithm
algo = wf.add_task(name="infer_donut", auto_connect=True)
# Run on your image
wf.run_on(url="https://raw.githubusercontent.com/Ikomia-hub/infer_donut/refs/heads/main/images/example.jpg")
# Display results
extracted_data = algo.get_output(1)
print(extracted_data.data)
Ikomia Studio offers a friendly UI with the same features as the API.
Parameters should be in strings format when added to the dictionary.
from ikomia.dataprocess.workflow import Workflow
# Init your workflow
wf = Workflow()
# Add algorithm
algo = wf.add_task(name="infer_donut", auto_connect=True)
algo.set_parameters({
"model_name": "naver-clova-ix/donut-base-finetuned-docvqa",
"prompt": "What is the date of the document",
"cuda": "True"
})
wf.run_on(url="https://raw.githubusercontent.com/Ikomia-hub/infer_donut/refs/heads/main/images/example.jpg")
# Display results
extracted_data = algo.get_output(1)
print(extracted_data.data)
Every algorithm produces specific outputs, yet they can be explored them the same way using the Ikomia API. For a more in-depth understanding of managing algorithm outputs, please refer to the documentation.
from ikomia.dataprocess.workflow import Workflow
# Init your workflow
wf = Workflow()
# Add algorithm
algo = wf.add_task(name="infer_donut", auto_connect=True)
# Run on your image
wf.run_on(url="https://raw.githubusercontent.com/Ikomia-hub/infer_donut/refs/heads/main/images/example.jpg")
# Iterate over outputs
for output in algo.get_outputs():
# Print information
print(output)
# Export it to JSON
output.to_json()
Python
100.0%