.png&w=1920&q=75)
An OCR container for AMD AI League Match 2 that reads licence plates and road signs with an open vision-language model running on an AMD GPU through ROCm. How it works: the container starts a resident server that loads Qwen2.5-VL-7B-Instruct once, in bf16 on the GPU, runs a warm-up inference and then listens on a unix socket. Each call to app.py is a thin client, so the harness can start a new process per image without the model ever being reloaded. Image handling accepts PNG, JPEG and TIFF (including 16-bit and multi-page files), applies EXIF rotation, and resizes very large or very small images to keep the number of visual tokens, and the time per image, bounded. The prompt encodes the transcription rules: return the plate number without state names or slogans, keep the province character and letter on Chinese plates, keep every word printed on a sign, and join multi-line text top to bottom. Post-processing removes labels, quotes and explanations, and folds look-alike separators and full-width characters that the grader's normalization would not remove. Reliability: the model weights are baked into the image, so it runs with no network access. Every call writes a valid JSON file, even when something fails. The build checks that torch and torchvision are ROCm builds. The image is built and contract-checked in GitHub Actions, and evaluated against the sample images plus blurred, noisy, glare, low-light and skewed variants.
Category tags: