diff --git a/supervision/dataset/core.py b/supervision/dataset/core.py index 7f2626c55..ce7e0edb5 100644 --- a/supervision/dataset/core.py +++ b/supervision/dataset/core.py @@ -584,7 +584,7 @@ def as_folder_structure(self, root_directory_path: str) -> None: class_id = ( classification.class_id[0] if classification.confidence is None - else classification.get_top_k(1)[0] + else classification.get_top_k(1)[0][0] ) class_name = self.classes[class_id] image_path = os.path.join(root_directory_path, class_name, image_name)