image
imagewidth (px)
224
512
label
class label
7 classes
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry
0angry

Summary

DiffusionFER is the large-scale text-to-image prompt database for face-related tasks. It contains about 1M(ongoing) images generated by Stable Diffusion using prompt(s) and other parameters.

DiffusionFER is available at πŸ€— Hugging Face Dataset.

Downstream Tasks and Leaderboards

This DiffusionFER dataset can be utilized for the following downstream tasks.

  • Face detection
  • Facial expression recognition
  • Text-to-emotion prompting

In addition, the virtual subjects included in this dataset provide opportunities to perform various vision tasks related to face privacy.

Data Loading

DiffusionFER can be loaded via both Python and Git. Please refer Hugging Face Datasets.

from datasets import load_dataset

dataset = load_dataset("FER-Universe/DiffusionFER")
git lfs install
git clone https://huggingface.co/datasets/FER-Universe/DiffusionFER

Pre-trained model

You can easily download and use pre-trained Swin Transformer model with the Diffusion_Emotion_S dataset.

Later, Transformer models with the Diffusion_Emotion_M or Diffusion_Emotion_L will be released.

from transformers import AutoFeatureExtractor, AutoModelForImageClassification

extractor = AutoFeatureExtractor.from_pretrained("kdhht2334/autotrain-diffusion-emotion-facial-expression-recognition-40429105176")

model = AutoModelForImageClassification.from_pretrained("kdhht2334/autotrain-diffusion-emotion-facial-expression-recognition-40429105176")

Or just clone the model repo

git lfs install
git clone https://huggingface.co/kdhht2334/autotrain-diffusion-emotion-facial-expression-recognition-40429105176

Sample Gallery

β–ΌHappy

Gallery(happy)

β–ΌAngry

Gallery(happy)

Subsets

DiffusionFER supports a total of three distinct splits. And, each split additionally provides a face region cropped by face detector.

  • DifussionEmotion_S (small), DifussionEmotion_M (medium), DifussionEmotion_L (large).
Subset Num of Images Size Image Directory
DifussionEmotion_S (original) 1.5K 647M DifussionEmotion_S/
DifussionEmotion_S (cropped) 1.5K 322M DiffusionEmotion_S_cropped/
DifussionEmotion_M (original) N/A N/A DifussionEmotion_M/
DifussionEmotion_M (cropped) N/A N/A DiffusionEmotion_M_cropped/
DifussionEmotion_L (original) N/A N/A DifussionEmotion_L/
DifussionEmotion_L (cropped) N/A N/A DiffusionEmotion_L_cropped/

Dataset Structure

We provide DiffusionFER using a modular file structure. DiffusionEmotion_S, the smallest scale, contains about 1,500 images and is divided into folders of a total of 7 emotion classes. The class labels of all these images are included in dataset_sheet.csv.

  • In dataset_sheet.csv, not only 7-emotion class but also valence-arousal value are annotated.
# Small version of DB
./
β”œβ”€β”€ DifussionEmotion_S
β”‚   β”œβ”€β”€ angry
β”‚   β”‚   β”œβ”€β”€ aaaaaaaa_6.png
β”‚   β”‚   β”œβ”€β”€ andtcvhp_6.png
β”‚   β”‚   β”œβ”€β”€ azikakjh_6.png
β”‚   β”‚   β”œβ”€β”€ [...]
β”‚   β”œβ”€β”€ fear
β”‚   β”œβ”€β”€ happy
β”‚   β”œβ”€β”€ [...]
β”‚   └── surprise
└── dataset_sheet.csv
  • Middle size DB will be uploaded soon.
# Medium version of DB
(ongoing)
  • TBD
# Large version of DB
(ongoing)

Prompt Format

Basic format is as follows: "Emotion, Race Age style, a realistic portrait of Style Gender, upper body, Others".

  • ex) one person, neutral emotion, white middle-aged style, a realistic portrait of man, upper body

Examples of format categories are listed in the table below.

Category Prompt(s)
Emotion neutral emotion
happy emotion, with open mouth, smiley
sad emotion, with tears, lowered head, droopy eyebrows
surprise emotion, with open mouth, big eyes
fear emotion, scared, haunted
disgust emotion, frown, angry expression with open mouth
angry emotion, with open mouth, frown eyebrow, fierce, furious
Race white
black
latin
Age teen
middle-aged
old
Gender man
woman
Style gentle
handsome
pretty
cute
mature
punky
freckles
beautiful crystal eyes
big eyes
small nose
...
Others 4K
8K
cyberpunk
camping
ancient
medieval Europe
...

Prompt Engineering

You can improve the performance and quality of generating default prompts with the settings below.

{
  "negative prompt": "sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, backlight, (duplicate:1.331), (morbid:1.21), (mutilated:1.21), mutated hands, (poorly drawn hands:1.331), (bad anatomy:1.21), (bad proportions:1.331), extra limbs, (disfigured:1.331), (missing arms:1.331), (extra legs:1.331), (fused fingers:1.61051), (too many fingers:1.61051), (unclear eyes:1.331), bad hands, missing fingers, extra digit",
  "steps": 50,
  "sampling method": "DPM++ 2M Karras"
  "Width": "512",
  "Height": "512",
  "CFG scale": 12.0,
  "seed": -1,
}

Annotations

The DiffusionFER contains annotation process both 7-emotion classes and valence-arousal values.

Annotation process

This process was carried out inspired by the theory of the two research papers below.

Who are the annotators?

Daeha Kim and Dohee Kang

Additional Information

Dataset Curators

DiffusionFER is created by Daeha Kim and Dohee Kang.

Acknowledgments

This repository is heavily inspired by DiffusionDB, with some format references. Thank you for your interest in DiffusionDB.

Licensing Information

The DiffusionFER is available under the CC0 1.0 License. NOTE: The primary purpose of this dataset is research. We are not responsible if you take any other action using this dataset.

Contributions

If you have any questions, feel free to open an issue or contact Daeha Kim.

Downloads last month
4
Edit dataset card