Deploying to OneVision
Once you have a satisfactory defect detection model, it's time to deploy it to your production environment.
Step 1: Compare Model Versions (If You Have Multiple)
If you've created multiple versions of your defect detection model:
- Use the version selector to switch between versions
- Compare their performance metrics:
- Overall detection accuracy (mAP)
- Per-defect detection rates
- False positive rates
- Inference speed (if available)
- Test each version with the same set of images
- Choose the version that best balances accuracy and performance for your needs
Comparing different versions of your defect detection model
Step 2: Export Your Defect Detection Model
Export your best-performing defect detection model:
- Select your preferred version from the version dropdown
- Click the Download button in the top toolbar
- Choose the appropriate export format based on your deployment target:
- OneVision Package: For deploying to your OneVision quality control system
- ONNX: For cross-platform compatibility
- TensorFlow SavedModel: For TensorFlow-based environments
- PyTorch Model: For PyTorch-based applications
- Configure any export-specific settings:
- For defect detection, consider enabling quantization for faster inference if accuracy isn't compromised
- Set confidence thresholds appropriate for your quality control requirements
- Download the exported model package
Exporting your defect detection model
Step 3: Deploy to Your Quality Control System
Option 1: Deploy to OneVision
If you're using OneVision for quality control:
- Select "Deploy to OneVision" instead of download
- Choose your target OneVision instance
- Configure how defects should be handled:
- Alert thresholds for different defect types
- Integration with your production line systems
- Visualization settings for operators
- Start the deployment
- Verify that the model is working correctly in your OneVision environment
Option 2: Custom Integration
For other quality control systems:
- Export the model in your preferred format
- Integrate the model with your quality inspection software:
- Set up proper image preprocessing to match training conditions
- Configure detection thresholds for each defect type
- Implement appropriate alert mechanisms for detected defects
- Create visualization tools to help operators understand model detections
- Set up logging to track detected defects for quality control metrics
Important for Defect Detection: Always implement appropriate confidence thresholds based on your quality control requirements. Lower thresholds catch more defects but may increase false positives.
Deploying your defect detection model to a production environment
Step 4: Validate in Production
Before fully relying on your automated defect detection:
- Run a validation period where both the model and human inspectors check products
- Track key metrics:
- Detection rate: Percentage of actual defects caught by the model
- False positive rate: Non-defects incorrectly flagged
- Processing time: How quickly the model analyzes each product
- Adjust confidence thresholds based on validation results
- Create a feedback mechanism where inspectors can flag incorrect detections
- Use this feedback to collect data for future model improvements
Validating model performance in the production environment