install uv and run the following command to install the dependencies:
uv sync
Prepare your own OpenAI API key, write it in .env. The run the following command in terminal:
input_dir: the directory of your input images, e.g.,sample_imagescollection_series: the collection series you want to uselegacy(Generative AI Challenge) orsydowsave-json: whether to save the OCR results in JSON formatsave-excel: whether to save the OCR results in Excel format
uv run python -m main --input-dir sample_images --collection-series legacy --save-json --save-excel
You need to create a structured output Pydantic model in main.py and adjust batch_ocr function accoding, then change your promptsin ocr_prompt_default.yml to your needs.
You can read more details in FungariumOCR.pdf.
Enjoy :)
