-
Notifications
You must be signed in to change notification settings - Fork 19
Description
The current save_model_proto implementation in edgeai-tensorlab supports many legacy detectors (SSD, RetinaNet, YOLOv3, YOLOX, YOLOv7, etc.), but completely lacks .prototxt meta-arch generation for the modern YOLOv8 and YOLOv9 models that are already supported in Texas Instruments’ edgeai-mmdetection fork and can be successfully exported to ONNX.
As a result, even though users can train YOLOv8/YOLOv9 models with edgeai-mmdetection and export them to ONNX using the provided scripts, the final step of generating the required *.prototxt file for TIDL compilation fails with an unsupported model error or silently produces nothing. This blocks deployment on TI edge AI devices (AM62A, AM69A, etc.).
The solution I'd like
Add detection branches and dedicated proto generation functions for:
- YOLOv8 (including detect, seg, pose, classify, obb variants if applicable)
- YOLOv9 (detect and any future variants)
Similar to the existing _save_mmyolo_proto_yolov7, implement something like:
elif is_yolov8:
feature_names = prepare_model_for_layer_outputs(...)
_save_mmyolo_proto_yolov8(cfg, model, input_size, output_filename, ...)
elif is_yolov9:
feature_names = prepare_model_for_layer_outputs(...)
_save_mmyolo_proto_yolov9(cfg, model, input_size, output_filename, ...)These functions should populate TIDLMetaArch → tidl_yolo with the correct:
code_type = CODE_TYPE_YOLO_V8 or CODE_TYPE_YOLO_V9 (or reuse CODE_TYPE_YOLO_V5 if compatible)
Anchor/stride configuration (anchor-less, strides from head)
Proper NMS and confidence thresholds used by Ultralytics/MMDeploy backends
Output tensor layout matching the ONNX export from edgeai-mmdetection
Additional context
YOLOv8 and YOLOv9 are fully supported in edgeai-mmdetection (training scripts, config files, and ONNX export via tools/export_onnx.py work).
Example ONNX export command that succeeds:
python ./tools/torch2onnx.py ${DEPLOY_CONFIG} ${CONFIG_FILE} ${CHECKPOINT_FILE} ${DEMO_IMG_PATH} --work-dir ${EXPORT_PATH} --simplifyThe only missing piece is the .prototxt generation required by the TIDL import tool.
This limitation currently prevents all users who want to run the latest YOLO models on TI edge devices.