Skip to content

Google Colab notebooks for training custom YOLO11n models and converting them to VELA-optimized TFLite format for deployment on Grove Vision AI V2 (Himax WiseEye2).

License

Notifications You must be signed in to change notification settings

marcory-hub/yolo11n-on-grove-vision-ai-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

YOLO11n Training and Deployment for Grove Vision AI V2

This repository contains two Google Colab notebooks, as well as sections for troubleshooting and references:

1. YOLO11n Training on Google Colab

A notebook to train a Ultralytics YOLO11n object detection model with a custom dataset on Google Colab.

Open In Colab

1.1. Setup and Dataset Preparation

  1. Dataset Structure: Organize your dataset with the following folder structure:

    🗂️ dataset
      🗂️ train
        🗂️ images
        🗂️ labels
      🗂️ valid
        🗂️ images
        🗂️ labels
      data.yaml
    

    Ensure data.yaml is present in the dataset folder.

  2. Zip the Dataset: Compress the dataset folder into a dataset.zip file. On macOS, use the following command to exclude hidden files:

    zip -r dataset.zip . -x "*.DS_Store" "__MACOSX/*" ".Trashes/*" ".Spotlight-V100/*" ".TemporaryItems/*"
  3. Google Drive Setup:

    • Create a folder named yolo in your Google Drive's MyDrive (i.e., /content/drive/MyDrive/yolo).
    • Copy the dataset.zip file into /content/drive/MyDrive/yolo.
    • Your trained YOLO model (e.g., best.pt) will also be saved here.

2. YOLO11n Full Integer Quantization and VELA Conversion for Grove Vision AI V2

This notebook handles the full integer quantization of your trained YOLO11n model and its conversion using the Arm VELA compiler for deployment on the Himax WiseEye2 (WE2) chip. The results is a full_integer_quant_vela.tflite file.

Open In Colab

  • Python 3.10 Environment: This notebook requires Python 3.10 due to dependencies on the imp module, which is deprecated in newer Python versions. The notebook sets up a virtual environment (env_yolo11) with Python 3.10.
  • Dataset Preparation: The same dataset structure and zipping (dataset.zip) as described in Section 1.1 are required for creating a calibration image set.

3. Troubleshooting

Fix class names in the Himax AI web toolkit

  • If you use the Himax AI web toolkit you may find that your custom yolo11n model detects the coco classes (person, bicycle, car, etc). This is because the classes are in the code. You find the list of class names in Himax_AI_web_toolkit/assets/index-legacy.51f14f00.js. Search for person in this file and replace them by the classes you trained your model on.

  • 4. References

Object detection with your custom yolo11n model

Detailed information

  • Detailed information can be found in this github repository YOLO11n on WE2
    • Install the Yolo11 environment at local PC
    • The output int8 vela tflite model which you can open by netron
    • The original YOLO11_on_WE2_Tutorial.ipynb on Colab

About

Google Colab notebooks for training custom YOLO11n models and converting them to VELA-optimized TFLite format for deployment on Grove Vision AI V2 (Himax WiseEye2).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published