oxford_pet
OxfordPetSegmentationDataModule(data_path, idx_to_class, name='oxford_pet_segmentation_datamodule', dataset=SegmentationDatasetMulticlass, batch_size=32, test_size=0.3, val_size=0.3, seed=42, num_workers=6, train_transform=None, test_transform=None, val_transform=None, **kwargs)
¶
Bases: SegmentationMulticlassDataModule
OxfordPetSegmentationDataModule.
Parameters:
-
data_path
(
str
) –path to the oxford pet dataset
-
idx_to_class
(
dict
) –dict with corrispondence btw mask index and classes: {1: class_1, 2: class_2, ..., N: class_N} except background class which is 0.
-
name
(
str
, default:'oxford_pet_segmentation_datamodule'
) –Defaults to "oxford_pet_segmentation_datamodule".
-
dataset
(
type[SegmentationDatasetMulticlass]
, default:SegmentationDatasetMulticlass
) –Defaults to SegmentationDataset.
-
batch_size
(
int
, default:32
) –batch size for training. Defaults to 32.
-
test_size
(
float
, default:0.3
) –Defaults to 0.3.
-
val_size
(
float
, default:0.3
) –Defaults to 0.3.
-
seed
(
int
, default:42
) –Defaults to 42.
-
num_workers
(
int
, default:6
) –number of workers for data loading. Defaults to 6.
-
train_transform
(
Compose | None
, default:None
) –Train transform. Defaults to None.
-
test_transform
(
Compose | None
, default:None
) –Test transform. Defaults to None.
-
val_transform
(
Compose | None
, default:None
) –Validation transform. Defaults to None.
Source code in quadra/datamodules/generic/oxford_pet.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
|
download_data()
¶
Download the dataset if it is not already downloaded.
Source code in quadra/datamodules/generic/oxford_pet.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|