What is a Classification Model?
- Good: Boards that meet all quality standards.
- Bad: Boards with visible defects or issues.
- Lack: Missing components or parts on the board.
- Board: Blurred image of the board.
- Empty: No board detected in the image.
- Background: Images that include irrelevant areas of the scene.
How to Use the Classification AI Model
1. Create a New Project
- Log in to Brain Builder for AITRIOS and select New Project.
- Name your project (e.g., “Solder Point Monitoring”) and provide a brief description.
2. Create a New Dataset
- Select the “Create Dataset” button.
- In our case, we will use the “Classifier” data type.
3. Upload Data
- Balance your dataset: Ensure you have enough images for each category (at least 50–100 per class is a good starting point).
- You can upload images by class or upload a ZIP file that contains the images with the labels as the top-level folder names. We will use a ZIP file in this format:
4. Train the Learning Classifier
- Select “Start Upload” to start the training process. The learning classifier will:
- Evaluate your dataset against multiple AI models.
- Learn to classify the boards into the predefined categories.
- Depending on the size of your dataset and the specs of your machine this could take from a few minutes to a few hours.
- Review the results of the Learning Classifier. The possible results are "Still Learning", "Low", "Good" or "Great". You want to aim for a “Great” score. If you get a lower score, try adding more images.
Why Start with a Learning Classifier?
A Learning Classifier is a dynamic model that actively improves its predictions during training by testing against your dataset and refining itself. This step is crucial for several reasons:
- Model adaptation: The Learning Classifier tailors its predictions based on the nuances of your dataset, ensuring it understands specific features like soldering quality or missing components.
- Accuracy foundation: By starting with a Learning Classifier, you establish a baseline model that is well-optimized for your task. The Static Classifier then locks in this trained behavior.
- Customization: The Learning Classifier identifies and adjusts to variations in the dataset, such as lighting conditions, angles, or minor manufacturing inconsistencies.
Once the Learning Classifier has been fully trained and evaluated, the Static Classifier locks these results for consistent deployment, avoiding further changes or drifts in predictions.
5. Train the Static Classifier
- Go to the Training tab and configure your training preferences:
- Duration - Choose based on your needs*:
- Quick: for rapid prototyping.
- Balanced: for good results with moderate time.
- Thorough: for maximum accuracy.
- Performance - Select a priority*:
- Highest Average Accuracy: for balanced results.
- Highest Accuracy: prioritizes correct detections by relaxing criteria.
- Lowest Occurrence Rate of False Positives: reduces false positives with stricter criteria.
- Start the training process. Brain Builder will test multiple AI models and optimize the best one for your dataset.
6. Test the Results
- Review the evaluation metrics:
- Accuracy: How well the model predicts each class.
- Confusion Matrix: Check for common misclassifications (for example, confusing “Good” with “Bad” or “Background”).
- Fine-tune your dataset, if necessary, by adding more images for underrepresented categories or re-labeling unclear samples.
7. Export the Model
- Once everything looks good you are ready to export your model. This will be a ZIP file named after your project.
8. Deploying to the Raspberry Pi AI Camera
- Watch as your Raspberry Pi AI Camera runs your model in real-time, performing tasks from object recognition to classification all completely on the camera freeing up your Raspberry Pi board.
Tips for Success
- Diverse data: Include images of boards from different angles, lighting conditions, and conveyor belt positions.
- Handle ambiguities: Ensure clear labeling, especially for edge cases like partially defective boards.
- Iterative improvement: Use test results to refine your dataset and retrain the model for better accuracy.
Use Case Spotlight: Board Classification
- Automated inspection: The model processes live images of boards on a conveyor belt.
- Real-time classification:
- Marks boards as Good or Bad based on soldering quality or missing components.
- Identifies empty slots as Empty or misaligned objects as Background.
- Detects incomplete boards as Lack.
- Improved efficiency: Reduces human error and speeds up the inspection process.
- Quality Control: Detect product defects on the production line, ensuring precision without slowing down operations.
- Environmental Monitoring: Use Brain Builder for AITRIOS to track wildlife or monitor crop health in remote locations.
- Inventory and Object Tracking: Set up real-time tracking of items in a warehouse to help keep inventory levels accurate.
Ready to Build?
With Brain Builder for AITRIOS, creating and deploying a Classification AI model is simple and efficient.
Start today and bring AI-powered quality control to your production line!