diff --git a/inference/core/workflows/core_steps/fusion/detections_consensus/v1.py b/inference/core/workflows/core_steps/fusion/detections_consensus/v1.py index 196c5425a1..df00323f4c 100644 --- a/inference/core/workflows/core_steps/fusion/detections_consensus/v1.py +++ b/inference/core/workflows/core_steps/fusion/detections_consensus/v1.py @@ -658,7 +658,7 @@ def get_largest_bounding_box(detections: sv.Detections) -> Tuple[int, int, int, def get_intersection_mask(detections: sv.Detections) -> np.ndarray: - return np.all(detections.mask, axis=0) + return np.logical_and.reduce(detections.mask, axis=0) def get_union_mask(detections: sv.Detections) -> np.ndarray: