
AI-based vision systems can now inspect cosmetic defects that rule-based systems struggled with. Where computer vision works on moulded parts, how to set it up, and the data, lighting and validation that decide success.
A closure line ran at hundreds of parts per minute, with four inspectors watching for short shots, flash, contamination and colour defects. Inspectors caught most defects most of the time, but fatigue, distraction and the sheer speed meant some escaped, and customer complaints followed. A traditional rule-based vision system had been tried years earlier and abandoned: it rejected too many good parts because of normal variation in colour and texture.
Modern computer vision, using deep learning, has changed what is possible in cosmetic inspection of moulded parts.
How it differs from traditional machine vision
- Rule-based vision measures defined features, such as dimensions, presence, edges and colour thresholds. It works well for consistent, well-defined checks, but struggles with natural variation and varied defect appearance.
- Deep-learning vision is trained on images of good and defective parts. It learns what normal variation looks like and what defects look like, even when they vary in shape, size and location.
Most practical systems combine both: rules for measurements, learning for cosmetic judgement.
Where it works well on moulded parts
- Short shots, flash and missing features.
- Contamination, black specks and foreign material.
- Splay, burns, streaks and other surface defects.
- Colour variation and mixed parts.
- Assembly verification, such as presence and orientation of components.
Getting the basics right
- Lighting: the most important factor. Different defects need different lighting, such as diffuse, low-angle or backlight. Poor lighting cannot be fixed in software.
- Camera resolution and position: enough pixels on the smallest defect that matters, and coverage of every critical surface.
- Part presentation: consistent position and orientation, often with simple fixturing or conveyors.
- Speed: image capture and processing within the cycle time.
Data is the real work
- Collect images of good parts across normal variation: cavities, material lots, colours and shifts.
- Collect and label images of each defect type. Rare defects may need deliberately produced samples.
- Define clearly what is acceptable and what is not, agreed with quality and the customer, with limit samples.
- Retrain the model as new defect types or variations appear.
Validating the system
Treat the vision system as a measurement system:
- Test with known good and bad parts, measuring escape rate and false reject rate.
- Compare with expert human inspection, as an attribute agreement analysis, the inspection equivalent of Gauge R&R.
- Monitor performance in production, including periodic challenge parts.
Beyond inspection
Vision data can show which cavities, times or conditions produce defects, linking inspection to process improvement. Combined with process data, it can help find root causes rather than just sorting parts, the same principle behind SPC.
Is it worth it?
Consider the cost of escapes, the cost and availability of inspectors, line speed and the variety of defects. Start with a pilot on a high-volume line with clear defect problems, measure the results, and build a business case for wider use. Prevention through better process control remains more valuable than detection, so use vision to protect customers while process improvements reduce defects at the source.


