Food101 — Torchvision 0.22 documentation (original) (raw)

class torchvision.datasets.Food101(root: ~typing.Union[str, ~pathlib.Path], split: str = 'train', transform: ~typing.Optional[~typing.Callable] = None, target_transform: ~typing.Optional[~typing.Callable] = None, download: bool = False, loader: ~typing.Callable[[~typing.Union[str, ~pathlib.Path]], ~typing.Any] = <function default_loader>)[source]

The Food-101 Data Set.

The Food-101 is a challenging data set of 101 food categories with 101,000 images. For each class, 250 manually reviewed test images are provided as well as 750 training images. On purpose, the training images were not cleaned, and thus still contain some amount of noise. This comes mostly in the form of intense colors and sometimes wrong labels. All images were rescaled to have a maximum side length of 512 pixels.

Parameters:

Special-members:

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

Parameters:

index (int) – Index

Returns:

Sample and meta data, optionally transformed by the respective transforms.

Return type:

(Any)