Module for data related objects, such as OTXDataset, OTXDataModule, and Transforms.


OTXDataModule(task, config)

LightningDataModule extension for OTX pipeline.


Factory class for OTXDataset.


Factory class for transform.

class otx.core.data.OTXDataModule(task: OTXTaskType, config: DataModuleConfig)[source]#

Bases: LightningDataModule

LightningDataModule extension for OTX pipeline.


predict_dataloader() DataLoader[source]#

Get test dataloader.

setup(stage: str) None[source]#

Setup for each stage.

teardown(stage: str) None[source]#

Teardown for each stage.

test_dataloader() DataLoader[source]#

Get test dataloader.

train_dataloader() DataLoader[source]#

Get train dataloader.

val_dataloader() DataLoader[source]#

Get val dataloader.

property hparams_initial: AttributeDict#

The collection of hyperparameters saved with save_hyperparameters(). It is read-only.

The reason why we override is that we have some custom resolvers for DictConfig. Some resolved Python objects has not a primitive type, so that is not loggable without errors. Therefore, we need to unresolve it this time.

property tile_config: TileConfig#

Tiling configuration. It is a shortcut for self.config.tile_config.

class otx.core.data.OTXDatasetFactory[source]#

Bases: object

Factory class for OTXDataset.

classmethod create(task: OTXTaskType, dm_subset: DatasetSubset, mem_cache_handler: MemCacheHandlerBase, cfg_subset: SubsetConfig, cfg_data_module: DataModuleConfig) OTXDataset[source]#

Create OTXDataset.

class otx.core.data.TransformLibFactory[source]#

Bases: object

Factory class for transform.

classmethod generate(config: SubsetConfig) Transforms[source]#

Create transforms from factory.