From 4318b5aee1c3946707d6a0f6d49c8d0fa2ab5f22 Mon Sep 17 00:00:00 2001 From: Indrek Mandre Date: Fri, 9 Feb 2024 10:46:06 +0200 Subject: [PATCH] detectors: increase yolov8 postprocessing score trershold to 0.5 --- frigate/detectors/yolo_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frigate/detectors/yolo_utils.py b/frigate/detectors/yolo_utils.py index 02442ab65..7a8f48e4b 100644 --- a/frigate/detectors/yolo_utils.py +++ b/frigate/detectors/yolo_utils.py @@ -22,7 +22,7 @@ def preprocess(tensor_input, model_input_shape, model_input_element_type): # cv2.dnn.blobFromImage is faster than numpying it return cv2.dnn.blobFromImage(tensor_input[0], 1.0 / 255, (model_input_shape[3], model_input_shape[2]), None, swapRB=False) -def yolov8_postprocess(model_input_shape, tensor_output, box_count = 20, score_threshold = 0.3, nms_threshold = 0.5): +def yolov8_postprocess(model_input_shape, tensor_output, box_count = 20, score_threshold = 0.5, nms_threshold = 0.5): model_box_count = tensor_output.shape[2] probs = tensor_output[0, 4:, :] all_ids = np.argmax(probs, axis=0)