Skip to content

Commit 2d2ec41

Browse files
committed
Cleanup, renames and clarification
1 parent e07cf0e commit 2d2ec41

File tree

6 files changed

+5
-6
lines changed

6 files changed

+5
-6
lines changed

luxonis_ml/data/datasets/luxonis_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ def export(
15441544
DatasetType.CLSDIR: ExporterSpec(
15451545
ClassificationDirectoryExporter, {}
15461546
),
1547-
DatasetType.FIFTYONE_CLS: ExporterSpec(
1547+
DatasetType.FIFTYONECLS: ExporterSpec(
15481548
FiftyOneClassificationExporter, {}
15491549
),
15501550
DatasetType.SEGMASK: ExporterSpec(

luxonis_ml/data/parsers/classification_directory_parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def from_split(self, class_dir: Path) -> ParserOutput:
8888
@return: Annotation generator, list of classes names, skeleton
8989
dictionary for keypoints and list of added images.
9090
"""
91-
9291
class_names = [d.name for d in class_dir.iterdir() if d.is_dir()]
9392

9493
def generator() -> DatasetIterator:

luxonis_ml/data/parsers/coco_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _is_coco_json(json_path: Path) -> bool:
7777
try:
7878
with open(json_path) as f:
7979
data = json.load(f)
80-
# COCO format requires these three fields
80+
# Distinguish between COCO and FiftyOne classification as they both have labels.json files
8181
return (
8282
isinstance(data, dict)
8383
and "images" in data

luxonis_ml/data/parsers/luxonis_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class LuxonisParser(Generic[T]):
5353
DatasetType.YOLOV8BOUNDINGBOX: YOLOv8Parser,
5454
DatasetType.YOLOV8INSTANCESEGMENTATION: YOLOv8Parser,
5555
DatasetType.YOLOV8KEYPOINTS: YOLOv8Parser,
56-
DatasetType.FIFTYONE_CLS: FiftyOneClassificationParser,
56+
DatasetType.FIFTYONECLS: FiftyOneClassificationParser,
5757
}
5858

5959
def __init__(

luxonis_ml/enums/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ class DatasetType(str, Enum):
1616
YOLOV8BOUNDINGBOX = "yolov8"
1717
YOLOV8INSTANCESEGMENTATION = "yolov8instancesegmentation"
1818
YOLOV8KEYPOINTS = "yolov8keypoints"
19-
FIFTYONE_CLS = "fiftyone-classification"
19+
FIFTYONECLS = "fiftyone-classification"

tests/test_data/test_parse_export_equivalence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def collect_segmentation_multiset(prepared_ldf: PreparedLDF):
346346
"classification": [
347347
(DatasetType.NATIVE, collect_classification_multiset),
348348
(DatasetType.CLSDIR, collect_classification_multiset),
349-
(DatasetType.FIFTYONE_CLS, collect_classification_multiset),
349+
(DatasetType.FIFTYONECLS, collect_classification_multiset),
350350
],
351351
"segmentation": [
352352
(DatasetType.SEGMASK, collect_segmentation_multiset),

0 commit comments

Comments
 (0)