mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-05 10:28:51 +03:00
NanoDet-Plus OpenVINO compatibility
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user