Skip to content

Robin-WZQ/AGFD-20K

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 

Repository files navigation

A Generated Face Dataset: AGFD-20K

Can we use generated human faces to train a model? If the model can generate faces that are realistic enough, how can we use it to generate faces we want? What is the mapping between prompt and vary human faces?

Besides, many times we need to construct a good test dataset to test the robustness of the trained model. But selecting images carefully from searching engines is laborious and also facing the problem of cleaning (due to the low quality of the data like unrelated, low-resolution, unbalanced, etc.). How the diffusion model can help us solve this problem?

What's more, fake faces detection is also a essential topic of AI safety. We can generate target faces directly through deep generative models, but just as important is how do we detect them? For example, our logo is A FAKE FACE!

In the past 3 years, we have seen the explosive growth of the Diffusion Model, it now can generate brilliant pictures according to user's prompts. Here I test the diffusion model in the capacity of generating realistic human faces. And purposes of this project are the following two points:

  1. Construct a not bad fake faces dataset;
  2. Use these data to do something interesting. I don't know if it helps anyone, but it works for me 🤣🤣🤣

The principles I followed in generating faces are:

  • Realistic (use Realistic_Vision_V2.0:1 by SG_161222)
  • High-resolution (the resolution of all images are 512*512)
  • Vary & Balanced (support vary faces and keep good data distribution)

Here is the generated face data and corresponding descriptions:

Attribute Specific Features Male Female Special Prompt
Age Child (0-5) 300 300 1 y.o., 3 y.o.
Teenager (5-18) 600 600 8 y.o., 15 y.o.
Young people (18-40) 300 300 25 y.o., 35 y.o.
Middle aged (40-60) 300 300 45 y.o., 55 y.o.
Old people (60+) 600 600 60,80,100 y.o., Grandma,Grandpa
Emotion Smile 600 600 smiling, laughing
Angry 600 600 Angry, pissed-off face, yelling
Occlusion Only glasses 600 600 glasses,sunglasses,swimming goggles,skiing goggles,
Only mask 300 300 (masked:1.2), antigas mask
Only make up 300 300 highly make up, eyeshadow,heavy black eyeliner, joker, Halloween makeup
Only hands 300 300 put Hand in front of face,put Hand in front of hair
Complex 300 300 glasses,(masked:1.2),Halloween makeup,put Hand in front of face,put Hand in front of hair
Illumination Under water 300 300 under water
Strong light 300 300 (sun behind:1.2), strong sun shine
Dark 300 300 in the night, dark light, (very dark scene:1.2)
Large pose Left & right 2000 2000 side view
Up 300 300 (looking up:1.3)
Hair Blond 300 300 blond hair
Bangs 300 300 (Bangs:1.2)
Bald 300 300 Bald
Others Moustache 300 - moustache,sideburns,goatee,front view
Open Mouse 600 600 (talking loudly:1.4),smile,neutral
Close Eyes 600 600 (sleepy,close eyes:1.4)
ALL Origin 20K 20K -

All the pictures can be downloaded at

Link1: Baidu Disk [extract code: tqxd].

Link2: terabox

Usage

I use this template to get good generation results:

  • Prompt:

RAW photo, a close up portrait photo of [year] y.o [sex], [human race],[special prompt],(high detailed skin:1.2), 8k uhd, dslr, high quality, film grain, Fujifilm XT3.

  • Negative Prompt:

(deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck.

  • Hyper-parameter:

DPM++ 2M Karras with 20 steps

CFG Scale 7

Instruction

A reference containing Portraits and Keywords that you can use with Stable Diffusion.

  • 👨‍👩‍👧‍👦 Age

    1 y.o., 3 y.o., boy 1 y.o., 3 y.o., girl
    young_child_small young_child_girl_small

    8 y.o., 15 y.o., boy 8 y.o., 15 y.o., girl
    teenager_man_small teenager_woman_small

    25 y.o., 35 y.o., man 25 y.o., 35 y.o., woman
    young_adult_man_small young_adult_woman_small

    45 y.o., 55 y.o., man 45 y.o., 55 y.o., woman
    old_adult_man_small old_adult_woman_small

    60,80,100 y.o., man, grandpa 60,80,100 y.o., woman, grandma
    Old_man_small old_woman_small
  • 😃 Emotion

    smiling, laughing, man smiling, laughing, woman
    smile_man_small smile_woman_small

    Angry, pissed-off face, yelling, man Angry, pissed-off face, yelling, woman
    angry_man png_small angry_woman_small
  • 🥸 Occlusion

    glasses,sunglasses,swimming goggles,skiing goggles, man glasses,sunglasses,swimming goggles,skiing goggles, woman
    glasses_man_small glasses_Woman_small

    (masked:1.2), antigas mask, man (masked:1.2), antigas mask, woman
    mask_man_small mask_woman_small

    highly make up, eyeshadow,heavy black eyeliner, joker, Halloween makeup, man highly make up, eyeshadow,heavy black eyeliner, joker, Halloween makeup, woman
    makeup_man_small makeup_woman_small

    put Hand in front of face, put Hand in front of hair, man put Hand in front of face, put Hand in front of hair, woman
    hand_man_small hand_Woman_small

    glasses,(masked:1.2), Halloween makeup,put Hand in front of face, put Hand in front of hair, man glasses,(masked:1.2), Halloween makeup,put Hand in front of face, put Hand in front of hair, woman
    complex_man_small complex_woman_small
  • 🔆 Illumination

    under water, man under water, woman
    under_water_man_small under_water_woman_small

    (sun behind:1.2), strong sun shine, man (sun behind:1.2), strong sun shine, woman
    sun_behind_man_small sun_behind_woman_small

    in the night, dark light, (very dark scene:1.2), man in the night, dark light, (very dark scene:1.2), woman
    dark_man_small dark_woman_small
  • 🔭 Large pose

    side view, man side view, woman
    sideview_man_small sideview_woman_small

    (looking up:1.3), man (looking up:1.3), woman
    up_man_small up_woman_small
  • 🦱 Hair

    blond hair, man blond hair, woman
    blond_man_small blond_woman_small

    (Bangs:1.2), man (Bangs:1.2), woman
    bang_man_small bang_woman_small

    Bald, man Bald, woman
    bald_man_small bald_woman_small
  • 🧑‍💻 Others

    moustache,sideburns,goatee,front view, man moustache,sideburns,goatee,front view, woman
    mustache_man_small cannot generate 💔

    (talking loudly:1.4),smile,neutral, man (talking loudly:1.4),smile,neutral, woman
    oen_mouse_man_small open_mouse_woman_small

    (sleepy,close eyes:1.4), man (sleepy,close eyes:1.4), woman
    close_eye_man_small close_eyes_woman_small

Acknowledgement

Thanks the creator of the model for his brilliant work and also thanks his reference models.

Realistic_Vision_V2.0:1 by SG_161222

Future Work

  • Although the realistic ability of this version model to generate pictures is enhanced, the generalization is weakened. As reported in MidJourney-Styles-and-Keywords, the Mid-v5 has a better ability to process finer facial details. I will keep focusing on the generated model and use better model to generated more controllable human faces.

Citation

@repo{2023agfd20k,
    title={A Generated Face Dataset: AGFD-20K},
    author={Zhongqi Wang},
    howpublished = {\url{https://github.com/Robin-WZQ/AGFD-20K}},
    year={2023}
}

About

A Generated Face Dataset: AGFD-20K. A Realistic, High-resolution, Vary & Balanced face dataset, generated by stable diffusion.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published