Developers Blog

A Walkthrough of Object Detection Tasks with Brain Builder for AITRIOS

作成者: AITRIOS Communications Team|2025/09/08 11:14:35
  • Identify Fruits: Detect apples, bananas, and oranges in images for sorting or inventory purposes.
  • Harvest Monitoring: Count and track fruit yield in orchards or farms.
  • Log in to Brain Builder for AITRIOS and click New Project.
  • Select the Detector model type.
  • Name your project (e.g., “Fruit Detector”) and add a description.
  • Use your captured dataset with images containing apples, bananas, and oranges.
  • Ensure the images represent real-world scenarios, such as fruits on conveyor belts, in baskets, or on store shelves.
  • Annotate the Images using Brain Builder:
    • Draw bounding boxes around each fruit and label them according to your specific case. In our example, we will use the following annotations: “Apple,” “Banana,” and “Orange.”
  • Use annotated images in KITTI format:
  • Make sure you have a ZIP in the proper format and upload
  • Navigate to the Training tab and configure the duration settings:
    • Quick: For testing the setup quickly.
    • Balanced: For good results without excessive time.
    • Thorough: For maximum accuracy when time allows.
  • Start training the model. Brain Builder will evaluate multiple AI models and optimize the best one for your dataset.
  • After training, review the metrics:
    • Precision: Check how accurately the model identifies apples, bananas, and oranges without false detections.
    • Recall: Ensure the model detects all the fruits in the images.
 

The Precision and Recall Metrics

  • The Precision Metric tries to answer the question: "Of all the objects I detected, how many were correcty detected?"
  • The Recall Metric tries to answer the question: “Of all the objects that exist, how many did I detect?”
  • The options to set are:
    • The Confidence Threshold
      • What It Does: Determines the minimum confidence level for detections to be considered valid (range: 0.1 to 1).
      • How to Adjust:
        • Lower threshold → Accepts more uncertain cases → Increases Recall (fewer missed detections).
        • Higher threshold → Rejects uncertain cases → Increases Precision (fewer false detections).
      • Default Value: 0.5, but should be adjusted based on your dataset and goals.
    • The IoU (Intersection over Union) Threshold
      • What It Does: Measures the overlap between the AI's detection box and the ground truth. Determines whether a detection is a True Positive.
      • How to Adjust:
        • Higher threshold → Requires more overlap → Ensures stricter accuracy.
        • Lower threshold → Allows less overlap → Captures more detections, even if less precise.
  • Run the command below which will open a window displaying the camera feed:
  • Watch as your Raspberry Pi AI camera runs your model in real-time, performing tasks from object detection to classification all completely on the camera freeing up your Raspberry Pi.
 

Tips for Success

  1. Balanced data: Ensure your dataset has a similar number of apples, bananas, and oranges to prevent bias.
  2. Augmentation: Add variations to your dataset, such as different angles and lighting, to improve robustness.
  3. Iterate: Use test results to refine your model by adding more labeled data or adjusting training settings.

Ready to Build?

With Brain Builder for AITRIOS, creating and deploying an Object Detection AI model is simple and efficient.

Start today and bring AI-powered quality control to your production line!