SEQ CARS196#
Classes#
- class datasets.seq_cars196.MyCars196(root, train=True, transform=None, target_transform=None)[source]#
Bases:
Dataset
- N_CLASSES = 196#
Overrides the CIFAR100 dataset to change the getitem function.
- PREPROCESSING_TRANSFORM = Compose( Resize(size=224, interpolation=bicubic, max_size=None, antialias=True) CenterCrop(size=(224, 224)) )#
- class datasets.seq_cars196.SequentialCars196(args)[source]#
Bases:
ContinualDataset
Sequential CARS196 Dataset. The images are loaded from deeplake, resized to 224x224, and store locally.
- MEAN = (0.0, 0.0, 0.0)#
- STD = (1.0, 1.0, 1.0)#
- TEST_TRANSFORM = Compose( ToTensor() Normalize(mean=(0.0, 0.0, 0.0), std=(1.0, 1.0, 1.0)) )#
- TRANSFORM = Compose( RandomHorizontalFlip(p=0.5) ToTensor() Normalize(mean=(0.0, 0.0, 0.0), std=(1.0, 1.0, 1.0)) )#
Functions#
- datasets.seq_cars196.load_and_preprocess_cars196(train_str='train', names_only=False)[source]#
Loads data from deeplake and preprocesses it to be stored locally.
- Parameters:
- Returns:
If names_only is False, returns a tuple of data, targets, and class_idx_to_name
- Return type:
Tuple[torch.Tensor, torch.Tensor, dict] | dict