# 51st Place Solution - Single Matcha Model

Hi everyone,
First of all, huge congratulations to the winners. I would like to share our 51st-place solution briefly as well. Our team is
[@batuhanm](https://www.kaggle.com/batuhanm)
and
[@emirkocak](https://www.kaggle.com/emirkocak)
We started working on this competition just two weeks prior to the deadline and dived into the discussions immediately. After having an initial understanding we found these two baseline notebooks:
[https://www.kaggle.com/code/nbroad/donut-train-benetech](https://www.kaggle.com/code/nbroad/donut-train-benetech)
[https://www.kaggle.com/code/heyytanay/training-pix2struct-pytorch-amp-w-b](https://www.kaggle.com/code/heyytanay/training-pix2struct-pytorch-amp-w-b)
huge thanks to
[@nbroad](https://www.kaggle.com/nbroad)
[@heyytanay](https://www.kaggle.com/heyytanay)
for their contributions. I merged these two code baselines and trained an end-to-end Matcha model for two epochs. The result of this pipeline was .43 - .25. After some investigations, I realized that the model was underfitting so we trained the same model for 8 more epochs (so 10 in total). This experiment reached .66 in the public LB and .37 in the private. This whole process took a week or so.
Then after having lots of debates on using the ICDAR dataset and discussions, it was banned at first so we didn't focus on that part. Instead, we included this dataset:
[https://www.kaggle.com/datasets/brendanartley/benetech-extra-generated-data](https://www.kaggle.com/datasets/brendanartley/benetech-extra-generated-data)
from
[@brendanartley](https://www.kaggle.com/brendanartley)
(again huge thanks here). With around 300k~ images we trained 3 more epochs in total and reached out to .73 in the public LB.
Since the matcha is a generative model, for final post-processing, we did some cleaning with the numbers and got a slight boost (+0.001).
Things didn't work
We couldn't manage deplot to work as matcha. Our goal was to combine these two models and improve on confused examples, but 1 week of effort was not enough and it just didn't work.
We also trained a separate scatter model but due to time limit, we couldn't manage it to incorporate our inference pipeline. After reading couple of solutions, it looks this would improve the results a lot.
Well, thanks for reading, and again congrats to the winners!