| vggface2_dataset | R Documentation |
The VGGFace2 dataset is a large-scale face recognition dataset containing images of celebrities from a wide range of ethnicities, professions, and ages. Each identity has multiple images with variations in context, pose, age, and illumination.
vggface2_dataset(
root = tempdir(),
split = "val",
transform = NULL,
target_transform = NULL,
download = FALSE
)
root |
Character. Root directory where the dataset will be stored under |
split |
One of |
transform |
Optional. A function that takes an image and returns a transformed version (e.g., normalization, cropping). |
target_transform |
Optional. A function that transforms the label. |
download |
Logical. If TRUE, downloads the dataset to |
A torch dataset object vggface2_dataset:
x: RGB image array.
y: Integer label (1…N) for the identity.
ds$classes is a named list mapping integer labels to a list with:
name: Character name of the person.
gender: "Male" or "Female".
Other classification_dataset:
caltech_dataset,
cifar10_dataset(),
eurosat_dataset(),
fer_dataset(),
fgvc_aircraft_dataset(),
flowers102_dataset(),
image_folder_dataset(),
lfw_dataset,
mnist_dataset(),
oxfordiiitpet_dataset(),
places365_dataset(),
tiny_imagenet_dataset(),
whoi_plankton_dataset(),
whoi_small_coralnet_dataset()
## Not run:
#Load the training set
ds <- vggface2_dataset(download = TRUE)
item <- ds[1]
item$x # image array RGB
item$y # integer label
ds$classes[item$y] # list(name=..., gender=...)
#Load the test set
ds <- vggface2_dataset(download = TRUE, train = FALSE)
item <- ds[1]
item$x # image array RGB
item$y # integer label
ds$classes[item$y] # list(name=..., gender=...)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.