.png&w=1920&q=75)
A containerized OCR pipeline that reads US licence plates, Chinese plates and road signs from images, built on the mandated ROCm PyTorch base and run on AMD GPUs. Model: Qwen3-VL-8B-Instruct in bf16 with Hugging Face Transformers, greedy decoding. One prompt encodes the transcription rules: return only the registration number and drop state names and slogans around it, keep the Chinese province character and letter, copy characters exactly, and add no units or labels. Code post-processing joins multi-line text with single spaces and, for Chinese plates only, corrects O to 0 and I to 1 in the serial, which never uses those letters. Architecture: the harness starts a new process per image, and loading an 8B model takes longer than the 30-second limit. So the container's CMD starts a small server that loads the model once and warms up, and app.py is a thin client with a 25-second budget that always writes valid JSON, falling back to an empty answer if anything fails. Testing: beyond the 10 samples, I built two harder test sets: the samples under 10 degradations (blur, darkness, noise, skew, low resolution and combinations) and 46 synthetic plates and signs with unseen texts, also degraded. Results: 200/200 on the samples, 99/100 and 454/460 on the hard sets. Preprocessing with autocontrast was tried and dropped because it hurt accuracy. On an AMD Instinct MI300X: healthy after 23 s, 0.2-0.4 s per image, peak VRAM 18 GiB, image 45.7 GiB uncompressed. Built with AI assistance (Claude) for code review and test tooling.
Category tags: