From Conveyor Prototype to an Auditable SIM-Card OCR Pipeline
Custom hardware, edge computer vision, fine-tuned OCR and selective AI verification for physical SIM processing.
I designed the hardware and capture workflow, built a labelled SIM-card dataset, fine-tuned the OCR models, and connected extraction to a recoverable cloud pipeline and operator review. The project shows how those disciplines come together when every printed digit has to be right.
Designed and built by Isaacson Shoko in Midrand, South Africa.Technical copy and architecture reviewed: 9 October 2026.
The operational problem
What it reads
What it retains
A Number Must Be Right, Digit for Digit
Returned-device operations can leave teams with batches of physical SIM cards to identify, record and reconcile. Reading tiny printed numbers by hand is repetitive. A single wrong digit can associate a card with the wrong record.
I started by connecting physical handling with image capture and structured extraction. The most demanding work came after detecting the cards: a detector can find a SIM reliably while OCR produces a valid-looking, high-scoring number that is wrong.
Finding the card was the beginning. Reading every digit needed its own evidence.
That shaped the system around exact identifier matching, visible source evidence, recoverable processing and explicit acceptance decisions.
From Physical Handling to Repeatable Capture
The original prototype explored a custom dispenser and nine-card capture. The current pilot uses hand-loaded conveyor batches. The ESP32 controls belt movement; the Raspberry Pi handles the camera and card detection.
The dashboard coordinates loading, positioning, capture and submission. It shows a live preview with detection overlays, saves the original frame and individual native-resolution crops, and preserves run and batch state across interruptions.
Historical prototype: dispenser demonstration and original interface
These earlier development materials show the mechanical and interface work that preceded the hand-loaded Paddle/Kimi pilot. They document the project's history; the deployed architecture is described below.

Fine-Tuning for a Small, Specific Card Estate
Generic OCR and larger vision models did not consistently separate identifiers from manufacturing codes or read stacked digits in the right order. Prompt and image-preparation experiments helped unevenly. A separate reader-and-selector experiment also failed to improve the debugging batch.
I moved to a controlled training workflow: 40 labelled photographs, evenly split between MTN and Vodacom, representing 39 physical cards. I grouped duplicate photographs by physical card, linked reviewed line crops to source coordinates, and separated training, validation and test cards. This made model adaptation measurable without counting related images as independent examples.
Adapt the sequence model; preserve the visual backbone
Small-data transfer learning with PP-OCRv6 Small
I fine-tuned the pretrained recognizer's CTC sequence encoder and output projection while keeping its visual backbone and batch-normalization statistics fixed. This targeted the sequence-reading layers while retaining pretrained visual features.
Training used confirmed identifier-line crops with geometric, lighting and blur augmentation. I kept the original character dictionary, so improvements could not come from removing letters or silently substituting similar characters.
The recognizer ran for 20 epochs and 300 optimizer steps. Checkpoints were selected using validation data; training history, updated tensors, pretrained weights and exported model hashes were recorded for reproducibility.
Fine-tuning gave me a domain-adapted recognizer. The remaining errors showed where to work next: orientation, merged rows, text selection and identifier assembly.
Give the Recognizer the Right Pixels
The larger gains came from preparing text for the trained model. I isolated the card from the green conveyor, used the clipped corner as an orientation hint when its outline was trustworthy, corrected residual skew, and separated rows the text detector had merged.
When primary extraction remained unresolved, whole-card alignment and an additional reading path recovered supported text. Identifier selection excluded logos, manufacturing codes and neighbouring cards. Inference still begins with a full SIM crop; the operator does not have to crop the identifier.
Model adaptation and image geometry solved different parts of the problem. Training alone could not recover text the pipeline never presented correctly.
Provider Rules Without Invented Digits
Vodacom: printed ICCID
89. On the sampled stacked layouts, the first four five-digit rows form the ICCID. Known pilot formats have five zeros in positions 6–10; disagreement triggers verification.MTN: short SIM serial
A format expectation is a warning signal, not permission to manufacture a correction. Unfamiliar layouts and unclear digits still require supporting image evidence.
The Current Edge-to-Cloud Pipeline
Capture and detection run on the Pi. Live recognition runs in the demand-only cloud worker, with selective visual verification and results returned to the dashboard.
Deployed Paddle / Kimi route
Current pilot architecture · reviewed 9 October 2026
- 01
Pi capture + local ledger
ESP32 belt control; Pi camera and card detection. Original frames, native crops and pending deliveries are recorded locally.
- 02
Private S3 + IoT Core
Images and telemetry carry stable work identifiers, the operator-selected provider and image hashes. Receipt acknowledgement confirms durable delivery.
- 03
SQS queues
Queues buffer arrivals and preserve work for retries while recognition capacity is bounded.
- 04
On-demand PaddleOCR
An ECS Fargate container runs the fine-tuned recognizer with the frozen full-card geometry recipe. It exits after five minutes without work.
- 05
Selective Kimi K3
Weak, missing or conflicting readings receive image-based verification. Eligible complete Paddle readings skip the paid judge.
- 06
DynamoDB → dashboard
Source-checked results synchronize to the operator interface. Accepted readings, corrections and unresolved review cases retain their evidence.
The Pi records images and pending delivery before sending them. Stable identifiers and hashes bind retries to the same work. Backend acknowledgement confirms durable receipt; OCR completion is a later event. Each stage exposes its own status and failures.
A reproducible inference bundle
Bounded demand and spending
Earlier architecture and model experiments
Earlier project iterations explored managed extraction, GPT-4o and other vision models, Step Functions, n8n, Airtable and Power BI. Those experiments informed the design. New submissions use the dedicated Paddle/Kimi route shown here; earlier admitted jobs retain their recorded backend.
A Judge Should Resolve Uncertainty
Complete Paddle readings can be accepted when source, provider format and selected text-region checks pass. Weak, missing or conflicting readings go to Kimi K3 with the original image, selected deskewed views, relevant text rows and Paddle's output.
Kimi may confirm a weak reading or make an image-supported correction. Acceptance also checks response structure, legibility, printed groups and provider format. Unresolved digits, source or provider conflicts, and a contradiction of an otherwise strong, unflagged Paddle reading remain review cases.
The failure that shaped the policy
In one development example, the judge changed two correctly read 8 digits to 0. Close-ups and a blind reading experiment did not make that example exact. Adding another model had made the answer worse.
I therefore retained both readings, changed digit positions, the judge's explanation and source images. Paddle scores guide the review workflow; they are not calibrated probabilities that a complete identifier is correct.
What Has Been Measured
| Evaluation | Observed result | Interpretation |
|---|---|---|
| Training baseline | 14/40 exact identifiers | Fine-tuned recognizer + pretrained detector on the development photos. Region selection and layout still limited full-card extraction. |
| Deskew + row separation | 28/40 exact identifiers | Same development photos, after detector-scale adjustment. Text geometry improved extraction without another model-weight change. |
| Frozen recipe: fresh Pi 4 replay | 40/40 exact; mean 11.90 s/card | One OCR thread; every extraction rerun fresh on reused development images. Demonstrates device compatibility, not accuracy on unseen cards. Concurrent live capture was not benchmarked. |
| Later live captures: 15 MTN + 11 Vodacom | Paddle matched saved-image assessment on 25/26; all 26 ultimately accepted | Three flagged records received Kimi confirmation or correction. Image-based assessment and machine acceptance are not an independent physical-card accuracy study. |
The Pi replay corresponds to approximately five cards per minute, excluding startup. This is sequential OCR throughput on that benchmark, not end-to-end conveyor throughput or a cloud-worker rate. The live Pi service continues to run capture and detection, with OCR in the cloud.
The next accuracy milestone is a larger, independently labelled set of previously unseen physical cards, with varied print formats, orientations and capture conditions. Exact identifier errors, unresolved outcomes, unnecessary review and latency need separate reporting.
What the Operator Can Inspect
Each card links its original frame, native crop, raw OCR, selected text-region scores, judge reading and explanation, and final acceptance or review status. A review pop-out brings the evidence together so an operator can identify which stage made a mistake.

Acceptance and review: two visible outcomes
Illustrative cases based on the current policy; identifiers and live records are omitted.
A flagged Paddle reading is resolved
Kimi confirms or corrects the visible digits; source, schema, printed groups and provider checks pass. The final identifier and original Paddle proposal remain separately recorded.
Inspect: source crop → selected rows → both readings → changed positions → explanation.
A strong reading receives a contradictory suggestion
The judge contradicts an otherwise strong, unflagged Paddle result. No identifier is automatically promoted; the operator checks the source evidence and records a decision.
Inspect: original digits → disagreement positions → judge reason → operator decision.
Corrections preserve the original extraction and record the operator's decision. A late cloud result cannot overwrite an existing operator review. Recovery, evidence and the review interface are part of OCR quality: an unexplained result is difficult to trust or improve.
The Engineering Decisions Behind the System
The work spans mechanical design, embedded control, computer vision, model training, cloud delivery and application development. The useful evidence of that breadth is in the decisions and their measured consequences.
Adapt the model deliberately
Evaluate the whole task
Preserve work and evidence
Use AI where it helps
A Deployed Pilot, With Validation Next
The pilot connects capture, durable delivery, on-demand recognition, selective verification, result storage and review in one working system. Continued validation determines how far it can be trusted on a customer's cards and process.
Next validation work
- Broaden the dataset with previously unseen physical cards.
- Validate acceptance thresholds and review workload on fresh labels.
- Improve capture consistency across formats and orientations.
- Measure sustained intake, backlog recovery, processing latency and cost.
Further productization
- Secure remote access and multiple-device management.
- Downstream inventory and operational integrations.
- Repeatable automated dispensing hardware.
- Custom PCB design for an agreed hardware configuration.
The commercial objective is to reduce repeated transcription while keeping exceptions visible and records traceable. A customer evaluation should establish actual error rate, review workload, throughput and cost against that customer's baseline.
Evaluation, customization and IP scope
An engagement can scope representative card formats, acceptance criteria, hardware, hosting, retention, access controls and integrations. Isaacson Shoko owns the custom solution's system design and orchestration IP. Third-party hardware, models, platforms and services remain subject to their own licences and terms.
Evaluate the system with your SIM-card workflow.
Share representative card formats, daily volumes and required integrations so we can define a measured pilot and acceptance criteria.
Evaluate Your SIM-Card Workflow