PortMind

Result: not measured yet

How few human labels?

Draft, 2026-10-30. Not frozen yet. Nothing has been run.

The question

How few human labels does a small AI need to spot trucks on a camera it has never seen? I'll have big models draw boxes on practice photos, check a small share myself, and train a small model on the result. H* will be the fewest human checks that pass, with a range.

What counts as a truck

I'll draw one box around the whole road truck: the cab and anything attached. Pickups, vans, buses, cars, parked containers, trailers without a cab and rail wagons don't count. Far-off shapes and yard tractors get a ‘can't tell’ mark and count neither way.

Six cameras, three jobs

Practice: cast and port-entry. Tuning: viterra and viau. Exam: maisonneuve and racine. I'll choose settings on the tuning cameras and report the two exam cameras separately.

Which photos

I'll use daylight photos from February to October, covering snow and summer. Every fifth calendar day will be exam-only across all cameras. The old 680 frames and the October 2 test week are dropped. Photos already shown to me or any AI in the pilot are excluded from the exam. I'll check practice and tuning contact sheets for camera moves; only a human will check the exam cameras. The practice pool will have about 1,000 photos per camera, at most one per half hour. Tuning gets 100 from viterra and 50 from viau. A seeded script will select 100 exam photos per camera, spread across months, without using detection counts.

The small model

I'll start with YOLOX-Nano: 0.91M parameters, public COCO weights and 640-pixel input. In my pilot, 68% of the trucks I boxed were under 16 pixels at 320 wide. If tuning shows it cannot do the job, the one fallback is D-FINE-N, at 4M parameters, and I'll report the change. I'll choose one training recipe using tuning photos only, then freeze it. The burned-in timestamp will be masked. Exam-camera backgrounds will never be used for training.

The big models

I'll compare Grounding DINO, Moondream 3.1 and Gemini 3.8 Flash in a small first test, then keep two. Where they agree, the draft stands. Where they disagree, the photo is a candidate for human checking.

The human check

The planned levels are 0, 25, 50, 100, 200 and 400 checked photos. The sets are nested: the 400 include every smaller set. For each checked photo I'll correct the boxes. Unchecked photos keep the big model's draft. About 10 seconds a check is a planned estimate, to be checked against the first 50.

Where to spend the checks

Random order is the main curve. I'll also try checking where the two big models disagree, at 25, 50, 100 and 200 checks. Human-only controls at 100 and 400 will show whether the draft labels helped. That's 12 arms with 5 training seeds each, or 60 runs per sweep.

The score and the planned pass line

I'll measure AP at 50% overlap for each exam camera, then average them. I'll also report missed trucks, false alarms and count error. The planned pass line has two parts: within 5 AP points of the 400-check model, and finding at least 7 of 10 trucks with at least 8 of 10 alarms real. I'll fix that detection threshold on the tuning cameras before the exam. H* is the lowest level that passes. If none does, I'll publish ‘not achievable under this setup’. The collector's detector, the big models and agreement between human readers will be comparison lines, scored after sealing.

How the exam stays blind

People will label the exam before any training. No AI, agent or model output will appear on exam photos before the final readout. The two readers will work in shuffled order without seeing each other's labels. A second reader will independently label 40 photos, 20 per camera, then we'll resolve disagreements without AI. Poor agreement makes the result void. Agreed labels will get a public hash before any model sees those frames. I'll freeze the model and weights by hash and read the exam once.

What I’ll publish

I'll publish the protocol or its hash with a timestamp before results. Its approved commit hash will seed photo selection. Later changes will be dated amendments; none will follow the exam seal. Every arm and failed run will be reported.

What this study can’t tell you

The claim covers two exam cameras at one port, each reported separately. It says nothing about night or other ports. Both readers are close to the project, and I own it; an outside reader would make it stronger. A synthetic simulation suggests 200 exam photos can separate a 5-point drop, not a 2-point one. If either camera has fewer than 100 trucks, its result will be inconclusive.