INaturalist — Torchvision 0.22 documentation (original) (raw)

class torchvision.datasets.INaturalist(root: Union[str, Path], version: str = '2021_train', target_type: Union[List[str], str] = 'full', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False, loader: Optional[Callable[[Union[str, Path]], Any]] = None)[source]

iNaturalist Dataset.

Parameters:

__getitem__(index: int) → Tuple[Any, Any][source]

Parameters:

index (int) – Index

Returns:

(image, target) where the type of target specified by target_type.

Return type:

tuple

category_name(category_type: str, category_id: int) → str[source]

Parameters:

Returns:

the name of the category