CocoDataset#

class CocoDataset[source]#

An instance of PyTorch VisionData the represents the COCO128 dataset.

Parameters
rootstr

Path to the root directory of the dataset.

namestr

Name of the dataset.

trainbool

if True train dataset, otherwise test dataset

transformCallable, optional

A function/transforms that takes in an image and a label and returns the transformed versions of both. E.g, transforms.Rotate

target_transformCallable, optional

A function/transform that takes in the target and transforms it.

transformsCallable, optional

A function/transform that takes in an PIL image and returns a transformed version. E.g, transforms.RandomCrop

__init__(root: str, name: str, train: bool = True, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, transforms: Optional[Callable] = None) None[source]#
__new__(*args, **kwargs)#

Attributes

CocoDataset.functions

Methods

CocoDataset.download_coco128(root)

Download coco128 and returns the root path and folder name.

CocoDataset.extra_repr()

CocoDataset.register_datapipe_as_function(...)

CocoDataset.register_function(function_name, ...)