WIP yolov9

This commit is contained in:
Nicolas Mowen 2025-02-06 08:42:21 -07:00
parent bc96db8612
commit a831fc2bef
2 changed files with 5 additions and 0 deletions

View File

@ -35,6 +35,7 @@ class InputDTypeEnum(str, Enum):
class ModelTypeEnum(str, Enum):
ssd = "ssd"
yolox = "yolox"
yolov9 = "yolov9"
yolonas = "yolonas"

View File

@ -79,6 +79,10 @@ class ONNXDetector(DetectionApi):
x_max / self.w,
]
return detections
elif self.onnx_model_type == ModelTypeEnum.yolov9:
# see https://github.com/MultimediaTechLab/YOLO/blob/main/yolo/utils/bounding_box_utils.py#L338
logger.info(f"the output shape is {tensor_output[0][0].shape} which has {tensor_output[0][0][0]}")
return np.zeros((20, 6), np.float32)
else:
raise Exception(
f"{self.onnx_model_type} is currently not supported for rocm. See the docs for more info on supported models."