From eefc5ddf7dda31cbc8d9c31f85886ca74fd13f9c Mon Sep 17 00:00:00 2001 From: SkalskiP Date: Mon, 27 Feb 2023 22:09:41 +0100 Subject: [PATCH] fix redundant assert --- supervision/detection/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervision/detection/core.py b/supervision/detection/core.py index e768def5..35edf1e9 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -236,7 +236,7 @@ class Detections: ) def with_nms(self, threshold: float = 0.5) -> Detections: - assert (self.confidence is not None, f"Detections confidence must be given for NMS to be executed.") + assert self.confidence is not None, f"Detections confidence must be given for NMS to be executed." indices = non_max_suppression(self.xyxy, self.confidence, threshold=threshold) return self[indices]