Skip to content

Commit e7a5a99

Browse files
authored
Fix Parser Docs (#365)
1 parent f3af7d7 commit e7a5a99

File tree

1 file changed

+157
-34
lines changed

1 file changed

+157
-34
lines changed

luxonis_ml/data/README.md

Lines changed: 157 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -387,53 +387,176 @@ for img, labels in loader:
387387
The supported formats are:
388388

389389
- **COCO** - We support COCO JSON format in two variants:
390+
391+
- [FiftyOne layout](https://docs.voxel51.com/user_guide/export_datasets.html#cocodetectiondataset-export)
392+
```plaintext
393+
dataset_dir/
394+
├── train/
395+
│ ├── data/
396+
│ │ ├── img1.jpg
397+
│ │ ├── img2.jpg
398+
│ │ └── ...
399+
│ └── labels.json
400+
├── validation/
401+
│ ├── data/
402+
│ └── labels.json
403+
└── test/
404+
├── data/
405+
└── labels.json
406+
```
390407
- [RoboFlow](https://roboflow.com/formats/coco-json)
391-
- [FiftyOne](https://docs.voxel51.com/user_guide/export_datasets.html#cocodetectiondataset-export)
408+
```plaintext
409+
dataset_dir/
410+
├── train/
411+
│ ├── img1.jpg
412+
│ ├── img2.jpg
413+
│ └── ...
414+
│ └── _annotations.coco.json
415+
├── valid/
416+
└── test/
417+
```
418+
392419
- [**Pascal VOC XML**](https://roboflow.com/formats/pascal-voc-xml)
420+
421+
```plaintext
422+
dataset_dir/
423+
├── train/
424+
│ ├── img1.jpg
425+
│ ├── img1.xml
426+
│ └── ...
427+
├── valid/
428+
└── test/
429+
```
430+
393431
- [**YOLO Darknet TXT**](https://roboflow.com/formats/yolo-darknet-txt)
432+
433+
```plaintext
434+
dataset_dir/
435+
├── train/
436+
│ ├── img1.jpg
437+
│ ├── img1.txt
438+
│ ├── ...
439+
│ └── _darknet.labels
440+
├── valid/
441+
└── test/
442+
```
443+
394444
- [**YOLOv4 PyTorch TXT**](https://roboflow.com/formats/yolov4-pytorch-txt)
445+
446+
```plaintext
447+
dataset_dir/
448+
├── train/
449+
│ ├── img1.jpg
450+
│ ├── img2.jpg
451+
│ ├── ...
452+
│ ├── _annotations.txt
453+
│ └── _classes.txt
454+
├── valid/
455+
└── test/
456+
```
457+
395458
- [**MT YOLOv6**](https://roboflow.com/formats/mt-yolov6)
459+
460+
```plaintext
461+
dataset_dir/
462+
├── images/
463+
│ ├── train/
464+
│ │ ├── img1.jpg
465+
│ │ ├── img2.jpg
466+
│ │ └── ...
467+
│ ├── valid/
468+
│ └── test/
469+
├── labels/
470+
│ ├── train/
471+
│ │ ├── img1.txt
472+
│ │ ├── img2.txt
473+
│ │ └── ...
474+
│ ├── valid/
475+
│ └── test/
476+
└── data.yaml
477+
```
478+
396479
- [**CreateML JSON**](https://roboflow.com/formats/createml-json)
480+
481+
```plaintext
482+
dataset_dir/
483+
├── train/
484+
│ ├── img1.jpg
485+
│ ├── img2.jpg
486+
│ └── ...
487+
│ └── _annotations.createml.json
488+
├── valid/
489+
└── test/
490+
```
491+
397492
- [**TensorFlow Object Detection CSV**](https://roboflow.com/formats/tensorflow-object-detection-csv)
493+
494+
```plaintext
495+
dataset_dir/
496+
├── train/
497+
│ ├── img1.jpg
498+
│ ├── img2.jpg
499+
│ ├── ...
500+
│ └── _annotations.csv
501+
├── valid/
502+
└── test/
503+
```
504+
398505
- [**SOLO**](https://docs.unity3d.com/Packages/[email protected]/manual/Schema/SoloSchema.html)
399-
- **Classification Directory** - A directory with subdirectories for each class
400506

401-
```plaintext
402-
dataset_dir/
403-
├── train/
404-
│ ├── class1/
405-
│ │ ├── img1.jpg
406-
│ │ ├── img2.jpg
407-
│ │ └── ...
408-
│ ├── class2/
409-
│ └── ...
410-
├── valid/
411-
└── test/
412-
```
507+
```plaintext
508+
dataset_dir/
509+
├── train/
510+
│ ├── metadata.json
511+
│ ├── sensor_definitions.json
512+
│ ├── annotation_definitions.json
513+
│ ├── metric_definitions.json
514+
│ └── sequence.<SequenceNUM>/
515+
│ ├── step<StepNUM>.camera.jpg
516+
│ ├── step<StepNUM>.frame_data.json
517+
│ └── (OPTIONAL: step<StepNUM>.camera.semantic segmentation.jpg)
518+
├── valid/
519+
└── test/
520+
```
413521

414-
- **Segmentation Mask Directory** - A directory with images and corresponding masks.
522+
- **Classification Directory** - A directory with subdirectories for each class
415523

416-
```plaintext
417-
dataset_dir/
418-
├── train/
419-
│ ├── img1.jpg
420-
│ ├── img1_mask.png
421-
│ ├── ...
422-
│ └── _classes.csv
423-
├── valid/
424-
└── test/
425-
```
524+
```plaintext
525+
dataset_dir/
526+
├── train/
527+
│ ├── class1/
528+
│ │ ├── img1.jpg
529+
│ │ ├── img2.jpg
530+
│ │ └── ...
531+
│ ├── class2/
532+
│ └── ...
533+
├── valid/
534+
└── test/
535+
```
426536

427-
The masks are stored as grayscale PNG images where each pixel value corresponds to a class.
428-
The mapping from pixel values to class is defined in the `_classes.csv` file.
537+
- **Segmentation Mask Directory** - A directory with images and corresponding masks.
429538

430-
```csv
431-
Pixel Value, Class
432-
0, background
433-
1, class1
434-
2, class2
435-
3, class3
436-
```
539+
```plaintext
540+
dataset_dir/
541+
├── train/
542+
│ ├── img1.jpg
543+
│ ├── img1_mask.png
544+
│ ├── ...
545+
│ └── _classes.csv
546+
├── valid/
547+
└── test/
548+
```
549+
550+
The masks are stored as grayscale PNG images where each pixel value corresponds to a class.
551+
The mapping from pixel values to class is defined in the `_classes.csv` file.
552+
553+
```csv
554+
Pixel Value, Class
555+
0, background
556+
1, class1
557+
2, class2
558+
3, class3
559+
```
437560

438561
### Dataset Creation
439562

0 commit comments

Comments
 (0)