Date: 2025-05-26
Enhancing Quality Control with Bottle Defect Detection on Matrice
Defect detection in manufacturing lines is a critical aspect of quality assurance. With AI-powered computer vision, it becomes possible to automate bottle defect identification, ensuring consistency and reducing manual inspection errors.
Our application focuses on detecting and localizing defects in bottles using a dedicated dataset. By training a model on images of bottles with visible defects, we enable precise identification of issues such as cracks, dents, and misalignments in real time.
This blog covers our approach to bottle defect detection using deep learning, including:
Dataset Preparation
Dataset Annotation
Model Training
Model Evaluation
Model Inference
Model Deployment
Dataset Preparation
The dataset for this project consists of images focused on different types of bottle defects. It includes only one category: bottle-defect. It is structured as follows:
Data Items: 3687
Training Set: 2576
Validation Set: 744
Testing Set: 367
This dataset is split in a 70:20:10
ratio to enable proper training, validation, and final testing.
Model Training
We trained a YOLO-based Instance Segmentation model to detect defects with high precision and speed. The training parameters were selected based on experimentation to achieve the best results.
Batch Size: 2
Epochs: 50
Learning Rate (lr): 0.001
Optimizer: auto
Momentum: 0.95
Weight Decay: 0.0005
Performance Metrics
The trained model was evaluated on validation and test datasets, using metrics such as precision and recall to gauge effectiveness.
Metric |
Value (test) |
Value (Val) |
---|---|---|
mAP@50 |
0.93 |
0.91 |
Precision |
0.92 |
0.931 |
Model Inference
The trained model can be exported to multiple formats for deployment on different hardware configurations.
Available formats:
PyTorch (.pt)
ONNX
TensorRT
OpenVINO
This flexibility enables real-time inspection even on edge devices in factory environments.
Model Deployment
Deploying the model on Matrice is straightforward. The platform offers real-time inference, API integration, and UI dashboards for inspection monitoring.
Applications include:
Automated inspection lines
Smart factory quality control
Production logging and alerts
Conclusion
By automating bottle defect detection, manufacturers can significantly reduce inspection time and human error while maintaining high-quality standards. With Matrice, you can bring powerful AI models into your workflow in just a few steps.
Think CV, Think Matrice
Experience 40% faster deployment and slash development costs by 80%