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..5ed1df1b03 100644 --- a/inference/core/workflows/core_steps/fusion/detections_consensus/v1.py +++ b/inference/core/workflows/core_steps/fusion/detections_consensus/v1.py @@ -589,12 +589,7 @@ def merge_detections( def get_majority_class(detections: sv.Detections) -> Tuple[str, int]: class_counts = Counter( - [ - (str(class_name), int(class_id)) - for class_name, class_id in zip( - detections["class_name"], detections.class_id - ) - ] + zip(map(str, detections["class_name"]), map(int, detections.class_id)) ) return class_counts.most_common(1)[0][0]