imagenet_classes: ImageNet Class Labels

View source: R/dataset-imagenet.R

imagenet_classesR Documentation

ImageNet Class Labels

Description

Utilities for resolving ImageNet-1k class identifiers to their corresponding human readable labels. The labels are retrieved from the same source used by PyTorch's reference implementation.

Usage

imagenet_classes(class_id = 1:1000)

imagenet_1k_classes(class_id = 1:1000)

imagenet_21k_df(class_id = 1:21843)

imagenet_21k_classes(class_id)

Arguments

class_id

Integer vector of 1-based class identifiers.

Value

A character vector with 1000 entries representing the ImageNet-1k class labels.

A data.frame containing columns id and label representing the ImageNet-21k class identifiers and labels. By default, returns all 21.8K rows.

A character vector with the labels associated with class_id.

See Also

Other class_resolution: caltech_classes(), coco_classes(), pascal_voc_classes()


torchvision documentation built on Oct. 14, 2026, 1:09 a.m.