Deep Learning on the Dismantling Line: Classifying E-Waste with ViDi and Projected Light
- Justin Eckhardt

- 17 hours ago
- 5 min read
Electronics recycling has a sorting problem that classical machine vision cannot touch. The product arriving on the belt is not a product - it is everything the industry shipped over a decade, coming back scuffed, cracked, missing parts, and in every possible orientation. We built a system for an electronics recycling operation that identifies items on a moving conveyor with a deep-learning classifier and then tells the operators what it found in the most direct way we could think of: it paints each item with its own colored light, projected from overhead, that follows the item down the belt.
Why rule-based vision loses here
Most of our vision systems are rule-based - pattern match, measure, threshold, pass or fail. That works when the part is engineered and repeatable. A dismantling line is the opposite case. The items are used consumer electronics - chargers, phones, laptops, tablets - and no two arrive alike. Cables coil differently every time. Housings are scratched, stickered, or partly disassembled. Orientation is whatever gravity chose. Writing geometric rules for that stream is a losing game: every rule you add to catch one presentation breaks another.
This is the case where deep-learning classification earns its license fee. Cognex ViDi learns the appearance of a category from examples instead of rules, and tolerates exactly the damage, dirt, and orientation chaos that breaks conventional tools. We paired the ViDi green classify tool with VisionPro inside the Cognex Designer runtime environment.
System anatomy
The hardware is deliberately simple - one camera, one PC, one projector:
A single overhead GigE color camera (a Cognex-branded Basler ace) with a 16 mm Edmund Optics fixed focal length lens, looking straight down at the conveyor. The lens was sized so the largest item in the stream - a laptop - fills the field of view.
Custom LED lighting flanking the camera, because a projector throwing colored patterns onto the belt is the enemy of consistent imaging. The inspection zone gets its own controlled light; the projection zone lives downstream of it.
A desktop PC with an NVIDIA CUDA GPU for ViDi training and runtime - deep-learning vision was a GPU workload in 2020 and it still is.
A quadrature encoder on a spring-loaded wheel riding the conveyor, from Phidgets, so the system knows exactly how far the belt has moved at all times.
A Keyence fiber array across the belt as a hardware part-present trigger, on a simple machined bracket.
An off-the-shelf consumer projector mounted overhead, pointed at the belt downstream of the camera.
A camera stand built from Vention extrusion straddling the conveyor, and a small electrical J-box for the encoder, power supplies, and fusing. There is no PLC - the PC is the controller.
The projector is the part people remember. Each trained category gets a color, chosen during training. When the classifier identifies an item, the projector paints that color onto the item itself and the colored marker tracks the item down the belt, driven by the encoder counts. Operators do not look up at a screen and mentally map a message back to the belt - the answer is sitting on the object. It is augmented reality with zero headsets and one HDMI cable.
The classification pipeline
The runtime pipeline is two ViDi stages plus a voting layer we added on top:
An analyze (segmentation) stage first separates item pixels from belt pixels. During training this is labeled with a magic-wand tool - flood-fill the conveyor, invert, and the item is masked in a few clicks per image.
A classify stage then assigns the masked region to a trained category and returns a score.
Every frame while an item travels through the field of view produces a classification guess, and each guess lands in a part buffer. The system's answer is the most common class in the buffer, not the last guess - a majority vote across a dozen viewing angles is far more stable than any single frame. An empty-belt frame clears the buffer for the next item. A score threshold keeps weak guesses out of the vote entirely.
Getting live encoder data into a vision runtime took custom code: a small C# plugin for the Designer environment that wraps the Phidget22 API and exposes the encoder as a native block with pins for position, attach state, and a position reset. The projected marker's tracking is calibrated with a single pixels-per-tick scale factor, adjustable from the settings screen, that maps belt travel to marker travel after the item leaves the camera's view.
The dataset is the project
The rule we settled on: 200 images per category, minimum, captured on the actual belt with the actual lighting. The archive for this project holds thousands of training bitmaps, and the folder structure tells the real story of deep-learning deployment - it is dataset curation, not model tuning:
Per-category capture sets of about 200 images each, items placed in varied positions and rotations.
Separate random sets - miscellaneous items and clutter that belong to no category - so the classifier learns what "none of the above" looks like instead of forcing every object into a known class.
Center-position test sets, captured after training, to check whether the model had quietly learned position bias from the capture sessions.
The hardest classes were three power-adapter variants that differ mainly in physical size and are otherwise nearly identical white bricks. Separating those took the segmentation mask (so the classifier saw only the item, at consistent scale) plus disciplined balanced capture. Training splits were randomized 50 to 75 percent, and the F-score reported after training was the go/no-go gate before pushing a new runtime workspace.
The part of this project we are proudest of is not the model - it is that the customer's own staff retrain it. The deployed application has the whole loop built in: a capture mode that saves images while filtering out empty-belt frames, the database and image-set workflow for labeling, training, color assignment for the projector, and a one-button runtime workspace update. Scope included training the operation's personnel to add future categories themselves, and the stream of items on a recycling line changes constantly - a classifier you cannot retrain on site is a classifier with an expiration date.
What carried forward
This machine taught us when to reach for deep learning - unstructured, damaged, high-variety product - and when not to: anything measured, gauged, or toleranced stays rule-based. It taught us that voting buffers beat single-shot inference on moving product, that negative classes are as important as positive ones, and that the projector-as-display pattern is criminally underused in industrial guidance. Encoder-tracked projected light turns any conveyor into a display surface for pennies per lumen.
The distilled lessons - dataset curation rules, class imbalance traps, the voting pattern, and projector guidance geometry - are in the knowledge file below, written to be dropped into an AI assistant's context. Building systems like this is our day job; if your product stream is the kind everyone says is too messy for vision, get in touch through the contact form.
Downloads
Free, no signup. The knowledge file is designed to be dropped into an AI assistant's context. No customer information in any of it.



Comments