In wood preparation, a defective log or a stone on the line is not a quality issue: it is an operational continuity issue. Stones damage debarkers and chippers, and out-of-spec logs degrade the product downstream. We implemented a computer vision inspection system over three debarking/feed lines at a pulp mill, starting from a proof of concept measured in the field.
THE CHALLENGE
Manual visual inspection does not scale: three lines, continuous pace, dust, steam and vibration conditions, and a demanding defect taxonomy defined by the internal quality instruction — Y/V-type forks, protruding knots, simple and double curvature, over-diameter, hammer ends, stones, and foreign objects.
In addition, the operation needed to know how many machines (trucks, loaders, grapples) were on each line at any moment, without manual counting.
THE SOLUTION: CLASSIFICATION ENGINE
An edge server inside the plant processes 8–10 simultaneous cameras, fully offline: inference and alerting do not depend on the Internet.
- Log detection and tracking per camera and line, with a unique event identifier: the same piece is never counted twice.
- Multi-defect classification: each piece can accumulate several classes, with confidence and region of interest recorded.
- Configurable thresholds per class, line, and camera, with audited changes and no recompilation.
- Geometric estimation (diameter, curvature) only where calibration guarantees it: measurement, uncertainty, and "not measurable" condition are reported.
- Complete evidence per event: original frame, annotated frame, and configurable clip.
- Honest degraded mode: on camera failure, obstructed image, or saturated GPU, the system reports unavailability — it never simulates an absence of anomalies.
COUNTING AND OCCUPANCY ENGINE
On the same cameras, a second engine classifies and counts the machines feeding each line:
- Presence polygons per line and exclusion zones, with unambiguous machine-to-line association.
- Multi-object tracking with ephemeral identity: reappearances or occlusions do not inflate the count.
- Instantaneous occupancy (how many are present) separated from accumulated flow (entries/exits).
- Low/normal/high thresholds per line and category, with hysteresis and minimum dwell to avoid intermittent alerts.
- Real-time dashboard, history by hour/shift/day, and CSV/XLSX export.
SECURITY AND CONTINUITY
The architecture respects the plant's IT/OT separation: network segmentation, managed firewall, VPN for remote support access, and no public exposure of streams or panels. The service includes continuous supervision of CPU/GPU/memory/disk, frame loss, offline cameras, event latency, and link usage, with model, dataset, and threshold versioning — and guaranteed rollback.
FIELD VALIDATION
Acceptance was not declared: it was measured. Per-class confusion matrix on real material, dimensional measurement compared against manual reference measurement, blind manual counting per line and time window for the occupancy engine, and robustness tests with camera failure, link failure, restart, and saturation. The pilot run was executed together with the process area, with sample review by the customer's expert and per-class threshold tuning until convergence.
Real data, real results