Skip to content

Commit

Permalink
Merge pull request #165 from roboflow/fix-classification
Browse files Browse the repository at this point in the history
Fix top_k processing in as_folder_structure
  • Loading branch information
SkalskiP authored Jun 29, 2023
2 parents 9adc953 + 9aee232 commit 5fdbb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion supervision/dataset/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5fdbb70

Please sign in to comment.