From cf294189180cbff0d702eb35c890bc6309c4de49 Mon Sep 17 00:00:00 2001 From: Murat Raimbekov Date: Fri, 9 Jan 2026 00:17:04 +0600 Subject: [PATCH] Fix type mismatch in `ConfusionMatrix` default parameter (#23138) --- ultralytics/utils/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/utils/metrics.py b/ultralytics/utils/metrics.py index b819a942..56f792e9 100644 --- a/ultralytics/utils/metrics.py +++ b/ultralytics/utils/metrics.py @@ -315,7 +315,7 @@ class ConfusionMatrix(DataExportMixin): matches (dict): Contains the indices of ground truths and predictions categorized into TP, FP and FN. """ - def __init__(self, names: dict[int, str] = [], task: str = "detect", save_matches: bool = False): + def __init__(self, names: dict[int, str] = {}, task: str = "detect", save_matches: bool = False): """Initialize a ConfusionMatrix instance. Args: