

transform (callable, optional): A function/transform that takes in an PIL image and returns a transformed version.

annFile (string): Path to json annotation file. Args: root (string): Root directory where images are downloaded to. It requires the `COCO API to be installed `_.

class CocoCaptions ( CocoDetection ): """`MS Coco Captions `_ Dataset. convert ( "RGB" ) def _load_target ( self, id : int ) -> List : return self. keys ())) def _load_image ( self, id : int ) -> Image. _init_ ( root, transforms, transform, target_transform ) from co import COCO self. """ def _init_ ( self, root : str, annFile : str, transform : Optional = None, target_transform : Optional = None, transforms : Optional = None, ) -> None : super (). transforms (callable, optional): A function/transform that takes input sample and its target as entry and returns a transformed version. E.g, ``transforms.PILToTensor`` target_transform (callable, optional): A function/transform that takes in the target and transforms it. Class CocoDetection ( VisionDataset ): """`MS Coco Detection `_ Dataset.
