OpenCV Capture, Label, Train

December 2025

Outcome:
● Working defect-inspection desktop pipeline

OpenCV Capture, Label, Train is a Python desktop toolkit for injection moulding defect inspection, bringing image capture, mandatory labelling, YOLO training, and live inference into one practical software pipeline.

It was developed as part of a broader research project completed during my master’s degree at Loughborough University, and supported by AAV Plastics. The wider project investigated whether training a neural network on multiple injection-moulded components could improve robustness to domain shift and enable defect detection on previously unseen part geometries. This software was the practical delivery vehicle for that work, turning the research method into a usable inspection pipeline.

OpenCV Hero 3

The project responds to a real manufacturing constraint. Manual inspection is time-consuming and subjective, while rule-based vision systems often need reconfiguration for each mould tool or component. The software therefore supports a controlled offline workflow, with fixed imaging conditions, structured dataset handling, and a forced-labelling process to keep annotations complete across multiple parts.

The pipeline is split into capture and annotation, model training, and inference. That modular structure improves traceability between raw images, labels, trained models, and evaluation outputs, while also matching the practical stages of an industrial inspection workflow. To support the broader research aim, the validation approach uses component-level hold-out, so entire part geometries can be excluded from training when testing generalisation.

This is a working research software package rather than a production inspection platform, but it established a solid base for proof-of-principle model training and future validation on unseen components.

The code is available on GitHub.
Inference Output
Inference Output
Scroll to Top