Data Preparation
Overview
LuxonisTrain supports multiple methods for loading data, providing flexibility to use different dataset formats. Here are the supported options:- Data Directory: Use a data directory formatted in one of the supported structures. For more details, refer to the LuxonisParser.
- LuxonisDataset Format: Utilize an existing dataset in the custom LuxonisDataset format. For further guidance, see the LuxonisDataset documentation.
- Custom Loader: Implement a custom loader to meet specific data handling needs. To learn how to create and use custom loaders, visit the Customizations section.
Data Directory
Preparing Your Data
To use the LuxonisParser tool, you need to prepare your dataset in the following structure:- Organize your dataset in one of the supported formats.
- Place your dataset in a directory accessible to the training script.
- Update the dataset_dir parameter in your configuration file to point to the dataset directory.
dataset_dir
can be one of the following:- Local path to the dataset directory.
- URL to a remote dataset: The dataset will be downloaded to a "data" directory in the current working directory.
s3://bucket/path/to/directory
for AWS S3gs://bucket/path/to/directory
for Google Cloud Storageroboflow://workspace/project/version/format
for RoboFlow- workspace: Name of the workspace the dataset belongs to.
- project: Name of the project the dataset belongs to.
- version: Version of the dataset.
- format: One of
coco
,darknet
,voc
,yolov4pytorch
,mt-yolov6
,createml
,tensorflow
,folder
, orpng-mask-semantic
.
Yaml
1loader:
2 params:
3 dataset_name: "coco_test"
4 dataset_dir: "roboflow://team-roboflow/coco-128/2/coco"
LuxonisDataset
To use the LuxonisDataset as a source of the data, specify the following in the config file:Yaml
1loader:
2 params:
3 # Name of the dataset
4 dataset_name: "dataset_name"
5
6 # Storage type: one of 'local' (default), 's3', or 'gcs'
7 bucket_storage: "local"
inspect
command. The inspect
command shows the images and their corresponding annotations in the dataset.Command Line
1luxonis_train inspect --config configs/detection_light_model.yaml