Image classify and OCR pipeline
High-volume image ingestion, normalization, and classification. Variable-batch worker pool, GPU-aware scheduling, OCR fallback, structured extraction routed downstream to a clinical data sink. Survives bursty load without losing a frame.
The problem
A clinical operator needed to ingest very large volumes of images, classify them, OCR where needed, and route structured extracts downstream. Previous attempts ran on synchronous workers that fell behind under bursty load and lost frames during GPU saturation. There was no observable signal for queue depth or per-stage latency, so backlogs were discovered in hindsight when the downstream consumer alarmed.
The approach
We built a Python pipeline with a variable-batch worker pool and GPU-aware scheduling. Workers self-tune batch size based on GPU memory; a fallback OCR path activates when the primary classifier returns low-confidence results. Structured extracts route to a downstream clinical data sink with deduplication by content hash. Queue depth and per-stage latency surface in a metrics dashboard so backlogs are visible before they become outages.
Stack and engineering choices
- Python worker pool
- GPU-aware batch scheduling
- OCR fallback on low confidence
- S3 object intermediation
- Content-hash deduplication
- Per-stage latency metrics
- Downstream structured extracts
Outcome
The pipeline survives bursty load without losing frames. Per-image cost is bounded by tunable batch size; per-stage latency is visible to ops. Downstream consumers receive deduplicated, structured extracts they can join into the clinical record without reconciling duplicates afterward.
See more production AI agent work at quadevs across other engagements with similar shape.
Have a project that overlaps this work?
Send a one-paragraph brief. We reply within one business day.
hello@quadevs.com