fix redundant assert

This commit is contained in:
SkalskiP
2023-02-27 22:09:41 +01:00
parent 96d8badf1a
commit eefc5ddf7d
+1 -1
View File
@@ -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]