View source: R/datasets_findingemo.R
| download_findingemo_data | R Documentation |
Downloads the FindingEmo-Light dataset using the official PyPI package. This dataset contains 25k images with emotion annotations including valence, arousal, and discrete emotion labels, focusing on complex naturalistic scenes with multiple people in social settings.
download_findingemo_data(
target_dir,
max_images = NULL,
randomize = FALSE,
skip_existing = TRUE,
force = FALSE
)
target_dir |
Character. Directory to download the dataset to. |
max_images |
Integer. Maximum number of images to download (optional). |
randomize |
Logical. If TRUE and max_images is specified, randomly select images for download. Useful for creating test/benchmark subsets (default: FALSE). |
skip_existing |
Logical. Whether to skip download if dataset already exists (default: TRUE). |
force |
Logical. Force download even if dataset exists (default: FALSE). |
This function requires the findingemo-light Python package to be
installed. Use setup_modules() to install required dependencies
before calling this function.
The FindingEmo dataset is described in: Mertens, L. et al. (2024). "FindingEmo: An Image Dataset for Emotion Recognition in the Wild". NeurIPS 2024 Datasets and Benchmarks Track.
The dataset uses a flat directory structure with all images stored directly in the images/ subdirectory, annotations.csv and urls.json at the root level.
**Note**: For copyright reasons, the dataset provides URLs and annotations only. Images are downloaded on-demand from their original sources.
A list containing:
success: Logical indicating if download was successful
message: Character string with status message
target_dir: Path to downloaded data
annotation_file: Path to annotation file (if successful)
urls_file: Path to URLs file (if successful)
image_count: Number of images downloaded (if any)
annotations: Full annotations data.frame (raw)
evaluation_data: Data.frame filtered to downloaded images
with columns suitable for evaluation workflows (id, truth, image_file,
image_path, valence, arousal, emo8_label, emotion)
evaluation_csv: Path to saved CSV of evaluation_data
matched_count: Number of annotations matched to downloaded images
load_findingemo_annotations, setup_modules
## Not run:
# First install required modules
setup_modules()
# Download dataset to local directory
result <- download_findingemo_data("./findingemo_data")
if (result$success) {
cat("Dataset downloaded to:", result$target_dir)
cat("Images downloaded:", result$image_count)
}
# Download random subset for testing/benchmarking
result <- download_findingemo_data(
target_dir = "./findingemo_test",
max_images = 100,
randomize = TRUE
)
# Download subset with flat directory structure (always used)
result <- download_findingemo_data(
target_dir = "./findingemo_subset",
max_images = 50
)
# Force re-download
result <- download_findingemo_data(
target_dir = "./findingemo_data",
force = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.