diff --git a/docs/docs/configuration/detectors.md b/docs/docs/configuration/detectors.md index b03b39e8d..0c19fe4b0 100644 --- a/docs/docs/configuration/detectors.md +++ b/docs/docs/configuration/detectors.md @@ -116,7 +116,6 @@ model: height: 300 input_tensor: nhwc input_pixel_format: bgr - model_type: ssd labelmap_path: /openvino-model/coco_91cl_bkgr.txt ``` @@ -128,7 +127,7 @@ detectors: type: openvino device: AUTO model: - path: ///yolox_tiny.xml + path: /path/to/yolox_tiny.xml model: width: 416 @@ -136,7 +135,7 @@ model: input_tensor: nchw input_pixel_format: bgr model_type: yolox - labelmap_path: ///coco_80cl.txt + labelmap_path: /path/to/coco_80cl.txt ``` ### Intel NCS2 VPU and Myriad X Setup diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 65a0491e7..146bfa51d 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -105,6 +105,9 @@ model: # Optional: Object detection model input tensor format # Valid values are nhwc or nchw (default: shown below) input_tensor: nhwc + # Optional: Object detection model type, currently only used with the OpenVINO detector + # Valid values are ssd or yolox (default: shown below) + model_type: ssd # Optional: Label name modifications. These are merged into the standard labelmap. labelmap: 2: vehicle diff --git a/frigate/detectors/plugins/openvino.py b/frigate/detectors/plugins/openvino.py index 8074782f5..16c81d5d5 100644 --- a/frigate/detectors/plugins/openvino.py +++ b/frigate/detectors/plugins/openvino.py @@ -39,7 +39,6 @@ class OvDetector(DetectionApi): try: tensor_shape = self.interpreter.output(self.output_indexes).shape logger.info(f"Model Output-{self.output_indexes} Shape: {tensor_shape}") - logger.info(f"Model Output-{self.output_indexes} Shape: {tensor_shape}") self.output_indexes += 1 except: logger.info(f"Model has {self.output_indexes} Output Tensors") @@ -93,9 +92,9 @@ class OvDetector(DetectionApi): ] i += 1 return detections - elif(self.ov_model_type == ModelTypeEnum.yolox): out_tensor = infer_request.get_output_tensor() + # [x, y, h, w, box_score, class_no_1, ..., class_no_80], results = out_tensor.data results[..., :2] = (results[..., :2] + self.grids) * self.expanded_strides results[..., 2:4] = np.exp(results[..., 2:4]) * self.expanded_strides @@ -117,7 +116,6 @@ class OvDetector(DetectionApi): for object_detected in ordered: if i < 20: - # [x, y, h, w, box_score, class_no_1, ..., class_no_80], detections[i] = [ object_detected[6], # Label ID object_detected[5], # Confidence @@ -126,8 +124,6 @@ class OvDetector(DetectionApi): (object_detected[1]+(object_detected[3]/2))/self.h, # y_max (object_detected[0]+(object_detected[2]/2))/self.w, # x_max ] - #logger.info(object_detected) - #logger.info(detections[i]) i += 1 else: break