NanoDet-Plus OpenVINO compatibility

This commit is contained in:
knoffelcut 2026-05-30 18:41:08 +02:00
parent 3f272e097e
commit 6b80061cfd

View File

@ -10,6 +10,7 @@ from frigate.detectors.detection_runners import OpenVINOModelRunner
from frigate.detectors.detector_config import BaseDetectorConfig, ModelTypeEnum
from frigate.util.model import (
post_process_dfine,
post_process_nanodet_plus,
post_process_rfdetr,
post_process_yolo,
)
@ -43,6 +44,7 @@ class OvDetector(DetectionApi):
ModelTypeEnum.yolonas,
ModelTypeEnum.yologeneric,
ModelTypeEnum.yolox,
ModelTypeEnum.nanodet_plus,
]
def __init__(self, detector_config: OvDetectorConfig):
@ -238,3 +240,9 @@ class OvDetector(DetectionApi):
object_detected[6], object_detected[5], object_detected[:4]
)
return detections
elif self.ov_model_type == ModelTypeEnum.nanodet_plus:
return post_process_nanodet_plus(
outputs[0],
self.width,
self.height,
)