Caltech-256 Dataset
caltech256_detection_dataset(
root = tempdir(),
transform = NULL,
target_transform = NULL,
download = FALSE
)
Character. Root directory for dataset storage. The dataset will be stored under root/caltech256
.
Optional function to apply to each image after loading (e.g., resizing, normalization).
Optional function to transform the target label.
Logical. If TRUE
, downloads and extracts the dataset if it's not already present. Default is FALSE
.
An object of class caltech256_detection_dataset
, which behaves like a torch dataset.
Each element is a named list:
A 3 x W x H integer array representing an RGB image.
A character string representing the class label.
Loads the Caltech-256 Object Category Dataset, which consists of 30,607 images from 256 distinct object categories. Each category has at least 80 images, with significant variability in object position, scale, and background. #'
if (FALSE) { # \dontrun{
caltech256 <- caltech256_detection_dataset(download = TRUE)
first_item <- caltech256[1]
first_item$x # Image array
first_item$y # Class label, e.g., "ak47"
} # }