Removed issue of length sentence

This commit is contained in:
Adonai Vera
2024-02-02 22:19:40 -05:00
parent aaf3621841
commit ebe2785287
2 changed files with 6 additions and 4 deletions
+4 -3
View File
@@ -1002,7 +1002,8 @@ class Detections:
self, threshold: float = 0.5, class_agnostic: bool = False
) -> Detections:
"""
Perform non-maximum suppression on the current set of object detections or segmentation prediction.
Perform non-maximum suppression on the current set
of object detections or segmentation prediction.
Args:
threshold (float, optional): The intersection-over-union threshold
@@ -1031,8 +1032,8 @@ class Detections:
predictions = np.hstack((self.xyxy, self.confidence.reshape(-1, 1)))
else:
assert self.class_id is not None, (
"Detections class_id must be given for NMS to be executed. If you intended"
" to perform class agnostic NMS set class_agnostic=True."
"Detections class_id must be given for NMS to be executed. If you"
" intended to perform class agnostic NMS set class_agnostic=True."
)
predictions = np.hstack(
(
+2 -1
View File
@@ -113,7 +113,8 @@ def mask_non_max_suppression(
non-maximum suppression.
Raises:
AssertionError: If `iou_threshold` is not within the closed range from `0` to `1`.
AssertionError: If `iou_threshold` is not within the closed
range from `0` to `1`.
"""
assert 0 <= iou_threshold <= 1, (
"Value of `iou_threshold` must be in the closed range from 0 to 1, "