Container Recognition
(Shipping Containers & Cargo)

Straight facts

This page explains how to deploy computer vision that reliably reads ISO 6346 container IDs, detects seals/placards/damage, and integrates with your yard/terminal systems—without hype.

📦 What it does

Detect a container on a truck/rail/yard stack → locate the ID zone → OCR the container number and size/type code → validate with ISO-6346 check digit → emit events (gate-in/out, tally, alerts) with images and confidence.

📋 Standards & fields we capture

🔢 ISO 6346 Container Number

Owner(3 letters) + Category(1 letter: U/J/Z) + Serial(6 digits) + Check digit(1)

We always validate the check digit to cut false reads

📐 Size/Type (4 chars)

e.g., 45G1 (40' HC GP)

BIC owner code lookup (optional)

🔒 Seal Presence & Number

Alphanumeric, length varies

⚠️ Hazard Placards & UN Numbers

IMDG/ADR icons + 4-digit UN code

🌡️ Reefer Panel Readouts

Setpoint, supply/return temps (when visible)

💥 Damage Cues

Dents/holes/rust/door misalignment (heuristic + ML)

🎯 Use cases

🚪 Gate-in/Gate-out OCR

Pair with ANPR/LPR and chassis ID

📊 Yard Tally & Inventory

Stack counts, location confirmation

🚂 Rail Portals & Quay Cranes

Side/top views

🏭 Warehouse Docks & Cross-docking

Check against ASN/booking

🛡️ Safety & Compliance

Hazard placard presence, seal check, door-open state

🏗️ System architecture (practical)

🎯

1. Trigger/Track

Loop/radar/LPR/vision tracker

📦

2. Container Detector

Finds ID/placard/seal ROIs (multi-frame)

🔤

3. OCR

Robust fonts, grime, skew, reflections

4. Validation

ISO-6346 check digit + size/type grammar

🔗

5. Augment

ANPR, chassis ID, trailer USDOT

📡

6. Events & APIs

JSON/REST/MQTT/CSV; optional EDI

💾

7. Store

Cropped ROIs + full frames, retention policy

📷 Camera & optics that actually work

📐 Angles

  • • Keep horizontal/vertical view angles ≤ 25–30°
  • • Roll ≤ 5°

🎯 Pixel Density (OCR)

  • • Character height ≥ 30–40 px
  • • Prefer 50+ px for reliable reads
  • • Seals/UN numbers often need more

⚡ Shutter

  • 1/1000–1/4000 s for moving trucks
  • • Lock shutter and manage exposure via gain/IR

🎬 Frame Rate

  • • 25–60 fps
  • • Multi-frame voting improves read rate

💡 Illumination

  • • Narrow-beam 850 nm IR (or white strobe)
  • • Aimed at the ID area
  • • WDR helps back-light

📹 Hardware

  • Global shutter preferred at high speed
  • • Motorized varifocal (12–50 mm)
  • • Use polarizer when glare is severe

🎥 Multi-camera Layout

Front (ANPR), side (container ID), rear/door (seal & door state), wide overview

📊 Performance metrics you should demand

📸 Capture Rate

Containers with a readable ID in frames

👁️ Read Rate

Correct IDs among captured, with/without check-digit validation

⚠️ UN Placard Detection

& seal-presence rate, seal OCR accuracy

⚡ Latency

Trigger → event, throughput (lanes/site), dropped frames

📈 Confidence Histograms

& threshold curves for tuning

⚠️ Common failure modes (and fixes)

💡 Headlight glare / retro-reflective washout

Fix: Strobe + shorter exposure + polarizer; aim IR narrowly

📐 Oblique views / occlusion by ladders/locks

Fix: Reposition camera; ensure one-side coverage where ID sits

🏭 Dirty/rusted panels / repaint

Fix: Enhance ROI; raise pixel density; use multi-frame voting and "unreadable" state

🔤 Font/spacing variations

Fix: Train with regional datasets; keep validators strict (check digit, grammar)

🚗 Fast drive-through

Fix: Pre-trigger (loop/radar), track across frames, aggregate votes

🔒 Data & privacy

💾 Storage Strategy

Store cropped ROIs + minimal full frames; configurable retention (e.g., 30–90 days)

🔐 Security Measures

Hash the container ID in indexes; encrypt in transit/at rest; role-based access

📋 ANPR Integration

When paired with ANPR, treat plate images as personal data (signage, access logs, purpose limitation)

🔗 Integration

📡 APIs

REST/MQTT/CSV webhooks with images, crops, confidence, timing

🏭 Systems

TOS/YMS/WMS/ERP; optional EDI exports (e.g., CODECO-like gate events, COARRI-style confirmations)

📊 Dashboards

Live lanes, read/capture rates, confidence histograms, device health

🚩 Red flags

❌ "Reads every container at any angle"

Without pixel-density or lighting plans

❌ No check-digit validation

Or owner/type grammar

❌ Single camera expected

To cover overview + ID + plate + seal

❌ No sample videos or lane-level KPIs

From pilots

🔗 GaugeSnap integration

🧠 Edge Vision Stack

Tuned for container ID + ISO-6346 check-digit validation, UN placard detection, seal presence/OCR, and reefer panel OCR (when visible)

🔗 ANPR Pairing

Truck plate ↔ container ID ↔ chassis, multi-frame voting, confidence scoring

🎯 Local & Special Cases

Fine-tune on regional fonts, repaint styles, or operator-specific seal formats

🔒 APIs & Privacy

REST/MQTT/CSV/EDI, hashed IDs, configurable retention, PDPA-ready logs

🚀 How to start (low-risk)

Send 30–60 s test videos per lane/view (day & night) showing the container side with the ID area, plus your target speeds/angles/distances. We'll return:

1. Camera/illumination/shutter plan

And pixel-density check

2. Baseline read-rate estimate

With check-digit validation and multi-frame voting

3. Integration outline

Events, APIs, retention/privacy

💡 Principle: Prove with lane-level videos and KPIs—before you scale.