2024-08-30 12:25 PM
hello,
I want to deploy an object detection application on the STM32H747 board. I used YOLOv5n; can I use FP-AI-Vision like in the example from the tutorial "How to use transfer learning to perform image classification on STM32".
Best Regard
Solved! Go to Solution.
2024-09-04 10:34 AM
Hello,
With your COCO dataset, on one side you have the images, on the other the annotations as a json file.
A COCO structure is usually as follow:
<dataset_dir>/
images/train/
<imagename0>.<ext>
<imagename1>.<ext>
<imagename2>.<ext>
...
annotations/
train_labels.json
val_labels.json
test_labels.json
...
In your yaml file you should have:
coco_format:
images_path: <dataset_dir>/images/train
json_annotations_file_path: <dataset_dir>/train_labels.json
export_dir: coco_darknet/train
On your log, it looks like the son_annotations_file_path field is missing
Best Regards
2024-09-03 08:33 AM
Hello,
The Yolov5n is not well adapted in term of complexity to the STM32H7.
It is why we have developed more tiny object detector such as the YoloLC or the ST SSD mobilenet v1 available through our model zoo: https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/object_detection/pretrained_models
You can easily retrain them thanks to the training script and deploy them on the STM32H747 Discovery kit directly using deployment scripts.
It is recommended to use this method rather than the FP-AI-VISION1 package.
The yolov5n is a perfect match for our next generation STM32N6: https://blog.st.com/stm32n6/.
Stay tuned.
2024-09-03 08:45 AM
you can use FP-AI-Vision as a starting point. However, deploying YOLOv5n on the STM32H747 will require careful optimization, including model quantization, potential architecture adjustments, and possible modifications to FP-AI-Vision.
2024-09-03 10:12 AM
Hello,
Thank you for your response.
I tried using Model Zoo, but I encountered the errors shown in the attached figure. I haven't been able to solve them.
Best regards,
2024-09-03 11:22 AM
Hello,
Can you share a higher resolution picture with the last part of the error ?
Did you try the default yaml file to train the ST ssd mobilenet v1 model ?
You just need to change the dataset section with the path to the dataset and possibly the classes.
Keep the model_path empty has the model will be generated.
Then simply do:
python .\stm32ai_main.py
2024-09-03 01:50 PM
2024-09-03 11:39 PM
Hello,
It seems your dataset is not loaded properly as you can see 0it in the trace.
Note that the dataset for object detection shall be with the YOLO Darknet format. There are scripts to convert datasets in COCO or Pascal VOC format to YOLO Darknet format in https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main/object_detection/datasets
2024-09-04 09:21 AM
2024-09-04 10:34 AM
Hello,
With your COCO dataset, on one side you have the images, on the other the annotations as a json file.
A COCO structure is usually as follow:
<dataset_dir>/
images/train/
<imagename0>.<ext>
<imagename1>.<ext>
<imagename2>.<ext>
...
annotations/
train_labels.json
val_labels.json
test_labels.json
...
In your yaml file you should have:
coco_format:
images_path: <dataset_dir>/images/train
json_annotations_file_path: <dataset_dir>/train_labels.json
export_dir: coco_darknet/train
On your log, it looks like the son_annotations_file_path field is missing
Best Regards
2024-09-17 09:16 AM
hello mr ST employee
so i managed to convert the pascal dataset to darknet . but when i tried to train it . i had various errors about CUDNN when i reached the phase of 1/1000 epoque
so do you have any idea how to solve this error??