otx.core.data.adapter.classification_dataset_adapter#

Classification Dataset Adapter.

Classes

ClassificationDatasetAdapter(task_type[, ...])

Classification adapter inherited from BaseDatasetAdapter.

SelfSLClassificationDatasetAdapter(task_type)

SelfSLClassification adapter inherited from ClassificationDatasetAdapter.

class otx.core.data.adapter.classification_dataset_adapter.ClassificationDatasetAdapter(task_type: TaskType, train_data_roots: str | None = None, train_ann_files: str | None = None, val_data_roots: str | None = None, val_ann_files: str | None = None, test_data_roots: str | None = None, test_ann_files: str | None = None, unlabeled_data_roots: str | None = None, unlabeled_file_list: str | None = None, cache_config: Dict[str, Any] | None = None, encryption_key: str | None = None, **kwargs)[source]#

Bases: BaseDatasetAdapter

Classification adapter inherited from BaseDatasetAdapter.

It converts DatumaroDataset -> DatasetEntity for multi-class, multi-label, and hierarchical-label classification tasks

get_label_schema() LabelSchemaEntity[source]#

Get Label Schema.

get_otx_dataset() DatasetEntity[source]#

Convert DatumaroDataset to DatasetEntity for Classification.

class otx.core.data.adapter.classification_dataset_adapter.SelfSLClassificationDatasetAdapter(task_type: TaskType, train_data_roots: str | None = None, train_ann_files: str | None = None, val_data_roots: str | None = None, val_ann_files: str | None = None, test_data_roots: str | None = None, test_ann_files: str | None = None, unlabeled_data_roots: str | None = None, unlabeled_file_list: str | None = None, cache_config: Dict[str, Any] | None = None, encryption_key: str | None = None, **kwargs)[source]#

Bases: ClassificationDatasetAdapter

SelfSLClassification adapter inherited from ClassificationDatasetAdapter.

It creates fake annotations to work with DatumaroDataset w/o labels and converts it to DatasetEntity for Self-SL classification pretraining

get_otx_dataset() DatasetEntity[source]#

Convert DatumaroDataset to DatasetEntity for Self-SL Classification.