Quick test to see if a local vision model can read handwritten Portuguese grade sheets.
-
Install Ollama — download from https://ollama.com/download, drag to Applications, launch it.
-
Pull a vision model:
ollama pull minicpm-v
Alternative (larger, often more accurate, slower):
ollama pull llama3.2-vision
If you switch model, update
MODELat the top oftest_ocr.py. -
Install poppler (system dep for PDF rendering):
brew install poppler
-
Install Python deps:
pip install pdf2image ollama
python test_ocr.py "/path/to/turma.pdf"The script will:
- Render each page of the PDF to an image
- Send each image to the local vision model
- Print the raw model response and a parsed JSON summary at the end
This is a probe, not the final app. Read the output and judge:
- Are the names mostly correct?
- Are the grades close to the truth (compare to the original PDF visually)?
- How wrong is "wrong" — off by 1 digit, or completely hallucinated?
If accuracy is acceptable → continue to Stage 2 (Excel output, multi-page tabs).
If accuracy is poor → try llama3.2-vision, or pivot to cloud API.
test_ocr.py— the probe scriptREADME.md— this file