frameworks.ultralytics.services.data.utils¶
utils
¶
Functions:
| Name | Description |
|---|---|
detect_inference_type_from_experiment |
Detects the inference type from the types of all attached dataset versions. |
generate_data_yaml |
|
prepare_classification_data |
Prepares and organizes a dataset collection for Ultralytics classification tasks. |
detect_inference_type_from_experiment(experiment)
¶
Detects the inference type from the types of all attached dataset versions. Ensures all attached datasets are of the same type, otherwise raises an error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Experiment
|
The experiment to inspect. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
InferenceType |
InferenceType
|
The common inference type of all attached datasets. |
generate_data_yaml(dataset_collection)
¶
prepare_classification_data(dataset_collection)
¶
Prepares and organizes a dataset collection for Ultralytics classification tasks.
This function iterates over each dataset in the provided DatasetCollection, organizing them
using the ClassificationDatasetPreparator to structure the dataset for use with Ultralytics classification.
Each dataset is moved into a new directory, with the structure suitable for Ultralytics training.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
DatasetCollection
|
The original dataset collection to be prepared for classification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DatasetCollection |
DatasetCollection[CocoDataset]
|
A dataset collection where each dataset has been organized and prepared for Ultralytics classification tasks. |