caltech_dataset | R Documentation |
Caltech Datasets
Loads the Caltech-256 Object Category Dataset for image classification. It consists of 30,607 images across 256 distinct object categories. Each category has at least 80 images, with variability in image size.
caltech101_dataset(
root = tempdir(),
transform = NULL,
target_transform = NULL,
download = FALSE
)
caltech256_dataset(
root = tempdir(),
transform = NULL,
target_transform = NULL,
download = FALSE
)
root |
Character. Root directory for dataset storage. The dataset will be stored under |
transform |
Optional function to transform input images after loading. Default is |
target_transform |
Optional function to transform labels. Default is |
download |
Logical. Whether to download the dataset if not found locally. Default is |
The Caltech-101 and Caltech-256 collections are classification datasets made of color images with varying sizes. They cover 101 and 256 object categories respectively and are commonly used for evaluating visual recognition models.
The Caltech-101 dataset contains around 9,000 images spread over 101 object categories plus a background class. Images have varying sizes.
Caltech-256 extends this to about 30,000 images across 256 categories.
An object of class caltech101_dataset
, which behaves like a torch dataset.
Each element is a named list with:
x
: A H x W x 3 integer array representing an RGB image.
y
: An Integer representing the label.
An object of class caltech256_dataset
, which behaves like a torch dataset.
Each element is a named list with:
x
: A H x W x 3 integer array representing an RGB image.
y
: An Integer representing the label.
Other classification_dataset:
cifar10_dataset()
,
eurosat_dataset()
,
fer_dataset()
,
fgvc_aircraft_dataset()
,
flowers102_dataset()
,
mnist_dataset()
,
oxfordiiitpet_dataset()
,
tiny_imagenet_dataset()
## Not run:
caltech101 <- caltech101_dataset(download = TRUE)
first_item <- caltech101[1]
first_item$x # Image array
first_item$y # Integer label
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.