<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: fuwei</title>
    <description>The latest articles on DEV Community by fuwei (@fuwei_technology).</description>
    <link>https://dev.to/fuwei_technology</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3980941%2F04fbc344-91e4-4512-bdfd-ee08b22797a0.png</url>
      <title>DEV Community: fuwei</title>
      <link>https://dev.to/fuwei_technology</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fuwei_technology"/>
    <language>en</language>
    <item>
      <title>Why Your Container Truck Still Waits 10 Minutes at the Port Gate (And What Actually Fixes It)</title>
      <dc:creator>fuwei</dc:creator>
      <pubDate>Wed, 05 Aug 2026 01:11:22 +0000</pubDate>
      <link>https://dev.to/fuwei_technology/why-your-container-truck-still-waits-10-minutes-at-the-port-gate-and-what-actually-fixes-it-2pem</link>
      <guid>https://dev.to/fuwei_technology/why-your-container-truck-still-waits-10-minutes-at-the-port-gate-and-what-actually-fixes-it-2pem</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxpvsblk8cq9ja81657ze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxpvsblk8cq9ja81657ze.png" alt=" " width="799" height="454"&gt;&lt;/a&gt;&lt;br&gt;
If you've ever sat behind a line of container trucks at a port gate, you've probably wondered why something that should take seconds — verify the container, verify the truck, let it through — takes minutes. The bottleneck isn't the paperwork. It's that most gates are still solving four separate identification problems with one manual process.&lt;/p&gt;

&lt;p&gt;Let's break the problem down the way an engineer would, then look at what a fully instrumented gate actually looks like under the hood.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The four things a gate has to verify, every single time&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What container is this? **(box number, type, condition)&lt;br&gt;
**What truck is this?&lt;/strong&gt; (plate, and often an RFID-tagged customs pass)&lt;br&gt;
&lt;strong&gt;How much does it weigh?&lt;/strong&gt; (and does that match the declared manifest weight?)&lt;br&gt;
&lt;strong&gt;Is the seal intact?&lt;/strong&gt; (electronic customs lock status)&lt;/p&gt;

&lt;p&gt;Each of these used to mean a human walking around a truck with a clipboard, or a driver handing paperwork through a window. Multiply that by 300 trucks an hour and you get exactly the queue you're used to seeing.&lt;/p&gt;

&lt;p&gt;The interesting engineering problem is: can all four checks happen automatically, in parallel, while the truck is still rolling — and can the system stay accurate when a container is rust-streaked, spray-painted with graffiti, half-obscured by shadow, or arriving in the rain at 2am?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 1: reading a container number that wasn't designed to be machine-readable&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Container ID plates follow the ISO 6346 / GB/T 1836 standard, but the physical reality is messy — faded paint, dents, condensation, glare, and characters that are visually similar (0/O, 1/I) under bad lighting.&lt;/p&gt;

&lt;p&gt;A production-grade system tackles this with &lt;strong&gt;4 synchronized 4MP starlight-grade cameras&lt;/strong&gt; shooting from multiple angles, capturing up to 6 images per container so the OCR model has redundancy to fall back on if one angle is obstructed. Combined with IR fill lighting for zero-lux conditions, this is what gets accuracy from "good enough on a sunny day" to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;≥99.5%&lt;/strong&gt; recognition in standard conditions&lt;br&gt;
&lt;strong&gt;≥98%&lt;/strong&gt; even with damaged, tilted, or low-visibility containers&lt;br&gt;
&lt;strong&gt;&amp;lt;0.1%&lt;/strong&gt; character-level error rate&lt;br&gt;
&lt;strong&gt;&amp;lt;3 seconds&lt;/strong&gt; from trigger to fully parsed result, with sensor response under 12 microseconds to filter out false triggers (a huge deal — false triggers from wind, birds, or adjacent-lane traffic are a real source of noise in outdoor deployments)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 2: identifying the truck without slowing it down&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;License plate recognition alone isn't enough for customs-controlled zones, so most serious deployments layer two identification methods:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optical plate recognition:&lt;/strong&gt; sub-300ms per plate, fusing 3 consecutive frames for accuracy, tuned for the reality of commercial plates — faded, muddy, temporary tags&lt;br&gt;
&lt;strong&gt;RFID electronic customs pass:&lt;/strong&gt; dual-band (840–845MHz / 920–925MHz), ISO 18000-6C/6B compliant, read at 8–10 meters with sub-0.3s response — meaning the truck never has to stop or slow to be identified&lt;/p&gt;

&lt;p&gt;For drivers without an RFID tag, a QR/WeChat pre-declaration code and Mifare-protocol IC cards (with SAM secure authentication) cover the fallback paths.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 3: weight, without a scale that stops traffic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional weighbridges require trucks to stop and idle. Dynamic weighing systems capture weight at low rolling speed, sync it to the customs backend in under 200ms, and auto-flag any mismatch against the declared manifest weight — triggering an audible/visual alarm before the truck even reaches the barrier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem 4: tying it all together with a risk-control layer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the part that's easy to underestimate: none of the four checks above matter if they're not cross-validated in real time. The control logic has to reconcile container number, plate, weight, and e-seal status as a single transaction, and reject anything that doesn't match — while logging the exception for audit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F51s7uzxadapy65yizves.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F51s7uzxadapy65yizves.png" alt=" " width="799" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A typical architecture splits this into four layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Persistence layer&lt;/strong&gt; — encrypted local storage of every image, ID, and log, structured for permanent traceability (a customs audit requirement, not a nice-to-have)&lt;br&gt;
&lt;strong&gt;Driver layer&lt;/strong&gt; — hardware abstraction for the cameras, RFID readers, weighbridge, and other peripherals&lt;br&gt;
&lt;strong&gt;Control layer&lt;/strong&gt; — the timing/sequencing logic (what fires when, what blocks the barrier)&lt;br&gt;
&lt;strong&gt;Presentation layer&lt;/strong&gt; — the ops dashboard: live multi-lane camera feeds, device status, throughput stats, role-based access for customs vs. yard operators&lt;/p&gt;

&lt;p&gt;Decoupling these matters operationally — you can push a firmware update to the RFID readers without touching the risk-control logic, which is the difference between a 10-minute maintenance window and a full lane shutdown.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What the numbers add up to&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When all of this works together, the full sequence — stop, scan, cross-validate, raise barrier — runs in under 5 seconds, with a complete pass-through of 10–30 seconds per truck and a sustained throughput of up to 300 vehicles/hour per lane. The hardware is rated for -20°C to 70°C, IP65 outdoor protection, and an MTBF above 50,000 hours, because a gate that goes down at 3am in a rainstorm is a much bigger problem than a gate that's merely fast.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9j3536rj89omewtq7lrl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9j3536rj89omewtq7lrl.png" alt=" " width="799" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this is a systems problem, not a camera problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's tempting to think of "smart gate" as just "OCR camera + barrier," but the actual engineering challenge is the orchestration: four independent sensing subsystems, each with its own latency and failure modes, that have to agree with each other in under 5 seconds, in weather that ranges from coastal humidity to blowing dust, without losing a single transaction if the power blinks.&lt;/p&gt;

&lt;p&gt;That's the problem we've spent a lot of time on at Fuwei Technology, building gate systems for port and logistics operators that need this to just work, 24/7, at scale. If you're dealing with a similar identification/throughput problem — even outside ports — I'd be curious to hear how you're approaching it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ocr</category>
      <category>iot</category>
      <category>computervision</category>
    </item>
    <item>
      <title>Building Container OCR That Actually Works in the Rain: Lessons from the Field</title>
      <dc:creator>fuwei</dc:creator>
      <pubDate>Thu, 09 Jul 2026 07:32:53 +0000</pubDate>
      <link>https://dev.to/fuwei_technology/building-container-ocr-that-actually-works-in-the-rain-lessons-from-the-field-aik</link>
      <guid>https://dev.to/fuwei_technology/building-container-ocr-that-actually-works-in-the-rain-lessons-from-the-field-aik</guid>
      <description>&lt;p&gt;&lt;em&gt;How we approached recognition accuracy when the "easy" conditions are the exception, not the rule&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Most container OCR demos look great. Clean daylight, dry containers, camera angle perfectly perpendicular to the door. That's also almost never what a real port gate looks like.&lt;br&gt;
In production, our system has to read container numbers off boxes that are rusted, mud-splattered, backlit by a truck's headlights at 2am, or half-obscured by rain streaking across the lens. This post is about the engineering decisions — and the mistakes — that came out of trying to make recognition reliable under those conditions, not just accurate in a benchmark.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs0nv72fcepvj476pydrl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs0nv72fcepvj476pydrl.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why "high accuracy" numbers are often misleading&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A lot of OCR vendors quote a single accuracy number, usually measured on a curated dataset shot in good conditions. That number tells you almost nothing about gate performance, because the failure modes at a real terminal cluster hard around a small set of scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Heavy rain — water droplets on the lens housing distort character edges; wet container paint also increases specular reflection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strong backlight — trucks arriving at dawn/dusk, or headlights at night, blow out the exposure on one side of the frame&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Low light / dark nights — most terminals don't have gate-level lighting tuned for camera exposure, they have lighting tuned for human eyes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dirty or corroded containers — mud, rust bleed, and faded paint reduce character-to-background contrast, sometimes to the point a human squints too&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your training data doesn't proportionally represent these conditions, your reported accuracy is measuring the wrong thing. The first real fix wasn't a model change — it was admitting our evaluation set was too clean.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa2opuuiio8vxifr5nd1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa2opuuiio8vxifr5nd1u.png" alt=" " width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rebuilding the dataset around failure conditions, not average conditions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We restructured our data collection and augmentation pipeline around condition buckets rather than raw volume. Instead of "collect more images," the question became "collect more images in the specific conditions we're currently failing on."&lt;/p&gt;

&lt;p&gt;Concretely, that meant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tagging every training and eval image with a condition label (rain / backlight / low-light / soiled / clean) instead of treating the dataset as one undifferentiated pool&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tracking accuracy per bucket, not just in aggregate — a model can look great overall while quietly failing 30% of rainy-night captures&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Synthetic augmentation targeted at the weakest buckets: simulated rain streaks and lens droplets, exposure/backlight simulation, and paint-degradation overlays (rust bleed, mud spatter patterns) generated procedurally rather than hand-collected, since real-world dirty-container photos are slow to gather at scale&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This sounds obvious in hindsight, but it changed our priorities: we stopped chasing marginal gains on the easy 70% of captures and started spending compute budget where the model was actually failing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture: splitting localization from recognition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Early on we ran a single end-to-end model doing detection + recognition in one pass. It worked fine in good conditions and degraded unpredictably in bad ones — when the model got the character localization even slightly wrong under glare or mud occlusion, the recognition stage had no way to recover.&lt;/p&gt;

&lt;p&gt;We moved to a two-stage pipeline:&lt;/p&gt;

&lt;p&gt;1.Localization stage — finds the character region on the container regardless of legibility, trained to be robust to occlusion and lighting rather than optimized for recognition accuracy&lt;br&gt;
2.Recognition stage — takes the localized crop and reads the ISO 6346 code, with condition-aware preprocessing (adaptive contrast/exposure correction) applied per-crop rather than globally on the full frame&lt;br&gt;
The key benefit: when recognition confidence is low, we can tell whether the problem is localization (wrong region) or legibility (right region, hard read) and route those failures differently — a wrong localization is a hard failure, but a low-confidence legibility case is a good candidate for multi-frame fusion (below) rather than an immediate reject.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5twof6pqbn191i38gk0n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5twof6pqbn191i38gk0n.png" alt=" " width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-frame fusion instead of single-shot recognition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Single-frame recognition has a hard ceiling in bad conditions — one frame with a rain streak across a character just doesn't have the information a clean frame does. Since gate cameras capture a short burst as the truck passes rather than a single still, we fuse predictions across frames instead of picking "the best" one.&lt;/p&gt;

&lt;p&gt;At a high level:&lt;/p&gt;

&lt;p&gt;for each frame in burst:&lt;br&gt;
run localization + recognition&lt;br&gt;
record per-character confidence scores&lt;br&gt;
for each character position:&lt;br&gt;
take confidence-weighted vote across all frames&lt;br&gt;
flag position as uncertain if no frame clears threshold&lt;/p&gt;

&lt;p&gt;This isn't novel in computer vision generally, but it mattered more than any single model architecture change for our rain/night failure buckets — a lot of "unreadable" single frames turn out to be very readable once you're not relying on just one of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edge inference constraints we didn't anticipate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Terminal network conditions are inconsistent — gate cameras are often on infrastructure that predates the OCR system by a decade, and round-tripping every frame to the cloud for inference isn't reliable enough for a gate that needs to clear a truck in a few seconds. That pushed us toward running inference on edge hardware near the gate, which came with its own constraints we underestimated going in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Model size and latency budgets are much tighter on edge compute than in a cloud environment, which directly limited how large our recognition backbone could be&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thermal and power constraints in outdoor gate enclosures ruled out some hardware options that looked fine on paper&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multi-frame fusion (above) has to happen with a bounded frame buffer on-device, not an arbitrarily large window, which meant tuning burst length as a real trade-off between accuracy and memory/latency, not just "more frames = better"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Where this leaves us&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;None of this makes the problem "solved" — dirty, low-light, wet-lens conditions are still where we spend the most engineering time, because they're where real terminals actually operate, especially in regions with heavy seasonal rain or minimal gate lighting infrastructure. But shifting the framing from "overall accuracy" to "accuracy per failure condition," splitting localization from recognition, and treating multi-frame fusion as a first-class part of the pipeline rather than an afterthought made the biggest measurable difference for us.&lt;/p&gt;

&lt;p&gt;If you're building or evaluating container OCR — or any OCR system meant to run outdoors, unattended, in whatever weather shows up — I'd genuinely be curious how others have approached the same rain/backlight/low-light cluster of problems. Happy to compare notes in the comments.&lt;/p&gt;




&lt;p&gt;We're a team building AI-powered port and logistics automation systems, including container OCR, smart gate, and terminal integration tooling. Follow for more engineering write-ups on the practical side of computer vision in industrial environments.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
