Bottle Cap Defect Detection

Hello everyone,
Objective: We are researching how to achieve accurate defect detection using a small number of high-quality defect-rich samples. Our focus is on detecting defects on bottle caps, such as black spots, hairlines, silk marks, and chipped edges.
Challenges: The mainstream object detection models we are using are not performing well. They require a large number of training samples and struggle with high-resolution images, often confusing shadows with black spots.
Question: What are some possible solutions to improve detection accuracy? Which model would be more suitable for our use case?

if I had that task, I’d look into synthetic data, i.e. computer graphics. get a 3D model, with volume information because the plastic is likely somewhat translucent, and then digitally damage the model, then render it.

also, you might wanna source training data from production runs. you’re collecting all those pictures, right? if the detection is set sensitively enough that it never accepts a bad part, then you must be getting a very dense stream of bad-looking parts, that you can label/annotate and send into the training.

perhaps construct the model to emit a feature vector or feature map instead of a single verdict. then the model can tell you what it’s thinking of each part, and that’ll give you insight into its operation. if that results (via training) in rich distinctive feature vectors, you could then even allow operators to adjust sensitivity to individual appearance deviations, either through a SVM on the feature vectors, or by retraining just the last layer, on the locally collected pictures, which ought to be reasonably fast, even at an operator console.