Deployed engineering pilot

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

Identify and reconcile physical SIM cards from returned-device operations while reducing repeated manual transcription.

What it reads

SIM identifiers: MTN's printed 10-digit short serial and Vodacom's printed 20-digit ICCID. Leading zeros are preserved.

What it retains

Source images, OCR and judge readings, acceptance or review decisions, and an audit trail for each card.

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.

Historical prototype control interface
Historical prototype interface, before the current capture and evidence-review workflow.

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.

Illustrative stacked text before and after deskew and row separation: a merged region becomes four individually ordered rows
Illustration of the current geometry recipe using masked demonstration text. Separating a merged stack gives the recognizer individual rows in reading order. This is a schematic, not a measured card image.

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

A 20-digit identifier beginning with 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

The printed 10-digit short serial is retained as a string, including leading zeros. The system preserves what is printed without expanding it into a full ICCID.

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 route: Pi capture and local ledger to private S3 and IoT Core, SQS, demand-only PaddleOCR, selective Kimi verification, DynamoDB results and operator dashboard. Complete eligible Paddle readings bypass Kimi.
Current deployed pilot, reviewed 9 October 2026. Complete eligible Paddle readings pass directly to results; flagged readings receive selective verification, with unresolved cases retained for review.

Deployed Paddle / Kimi route

Current pilot architecture · reviewed 9 October 2026

  1. 01

    Pi capture + local ledger

    ESP32 belt control; Pi camera and card detection. Original frames, native crops and pending deliveries are recorded locally.

  2. 02

    Private S3 + IoT Core

    Images and telemetry carry stable work identifiers, the operator-selected provider and image hashes. Receipt acknowledgement confirms durable delivery.

  3. 03

    SQS queues

    Queues buffer arrivals and preserve work for retries while recognition capacity is bounded.

  4. 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.

  5. 05

    Selective Kimi K3

    Weak, missing or conflicting readings receive image-based verification. Eligible complete Paddle readings skip the paid judge.

  6. 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

The worker loads the trained recognizer with the tested orientation, deskew, row-separation and alignment code. Exporting a model is one step; deploying the same processing recipe keeps the experiment connected to the operational result.

Bounded demand and spending

The pilot limits task count, daily runtime, starts and paid judge admission. A $25 monthly AWS alert budget complements software spending controls. Delayed billing data makes it an operational threshold, not a guarantee that total AWS charges cannot exceed $25.
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

Development and live-pilot observations through 9 October 2026. These evaluations have different scopes.
EvaluationObserved resultInterpretation
Training baseline14/40 exact identifiersFine-tuned recognizer + pretrained detector on the development photos. Region selection and layout still limited full-card extraction.
Deskew + row separation28/40 exact identifiersSame development photos, after detector-scale adjustment. Text geometry improved extraction without another model-weight change.
Frozen recipe: fresh Pi 4 replay40/40 exact; mean 11.90 s/cardOne 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 VodacomPaddle matched saved-image assessment on 25/26; all 26 ultimately acceptedThree 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.

Acquisition dashboard development simulation showing camera workspace, manual-loading controls and batch delivery statuses
Acquisition dashboard from the interface development simulation. Demonstration cards show loading, capture and submission controls; the counters are simulated and do not represent the live evaluation.

Acceptance and review: two visible outcomes

Illustrative cases based on the current policy; identifiers and live records are omitted.

Accepted · Kimi resolution

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.

Review required

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

Fine-tune selected layers, preserve the character dictionary, and track checkpoints and model hashes so a result can be traced to a specific experiment.

Evaluate the whole task

Score exact identifiers from full SIM crops. Line recognition and text-region metrics help diagnose failures; neither substitutes for a correct final identifier.

Preserve work and evidence

Local delivery state, durable queues, image hashes and protected result revisions make interruption and recovery part of the workflow.

Use AI where it helps

Invoke a visual judge selectively, retain both readings, and leave unresolved contradictions visible. Demand-only hosting bounds idle compute.

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
4DAnalytics

© 2026 4D Analytics | Isaacson Shoko

Generative AI Developer | Midrand, South Africa

Privacy and analytics

This site records cookie-free interaction events on the production domain to distinguish genuine engagement from infrastructure traffic. It respects Do Not Track and Global Privacy Control and does not include names, email addresses, form messages, or assistant question text in analytics.