# ICDAR 2025 Competition on End-to-end Document Image Machine Translation (OCR-free Track) This is the official baseline code repository for [***ICDAR 2025 Competition on End-to-end Document Image Machine Translation (OCR-free Track)***](https://cip-documentai.github.io/) ## Dataset Download The dataset can be downloaded from this [huggingface link](https://huggingface.co/datasets/liangyupu/DoTA_dataset). ## Baseline Implementation This is an implementation of a simple end-to-end document image machine translation model with an image encoder and a translation decoder. Details can be found in [***Document Image Machine Translation with Dynamic Multi-pre-trained Models Assembling (NAACL 2024 Main)***](https://aclanthology.org/2024.naacl-long.392/) Section 5.3 Base. ### 1. Requirements ```bash python==3.10.13 pytorch==1.13.1 transformers==4.33.2 ``` ### 2. Download Pre-trained models Download pre-trained Donut model from [naver-clova-ix/donut-base](https://huggingface.co/naver-clova-ix/donut-base). Download pre-trained Nougat model from [facebook/nougat-small](https://huggingface.co/facebook/nougat-small). ### 3. Train ```bash bash launch_train.sh ``` ### 5. Inference Before running the script, you need to replace the `~/anaconda3/envs/your_env_name/lib/python3.10/site-packages/transformers/models/bert/modeling_bert.py` file with the `modeling_bert.py` file. ```bash bash launch_inference.sh ``` ## Citation If you want to use our dataset and cite our paper, please use the following BibTex entries: ```BibTex @inproceedings{liang2024document, title={Document Image Machine Translation with Dynamic Multi-pre-trained Models Assembling}, author={Liang, Yupu and Zhang, Yaping and Ma, Cong and Zhang, Zhiyang and Zhao, Yang and Xiang, Lu and Zong, Chengqing and Zhou, Yu}, booktitle={Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies}, pages={xxxx--xxxx}, year={2024} } ``` If you have any question, feel free to contact [dimt2025.contact@gmail.com](mailto:dimt2025.contact@gmail.com).