Skip to content

plachert/fake-faces-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fake Faces Generator

A simple unofficial CLI for downloading unique images of faces from www.thispersondoesnotexist.com.

Description

There already exist at least two repositories for that:

  1. ThisPersonDoesNotExistAPI by David-Lor
  2. Forked from ThisPersonDoesNotExistAPI repo by Alonso Silva

Both existing repositories appear to focus on generating a relatively small sample of images intended for test purposes. However, aiming to acquire thousands of fake images for GAN training, I developed a CLI optimized for this specific purpose. Of course you may as well use FFHQ dataset for that, but it seemed like a fun project so why not give it a go? The optimization involved leveraging aiohttp and implementing backoff strategies. By tweaking the parameters e.g. concurrency limit or the parameters of backoff policy I was able to download 10k unique images in less than an hour.

Version 0.1.1

  • Tracking file (seen.pkl) is always saved (even when an error occurs).

Installing

Run the following command in your virtual env.

pip install git+https://github.com/plachert/fake-faces-generator

Verify installation:

(venv) foo@bar:~$ python
>>> import fake_faces_generator
>>> fake_faces_generator.__version__
'0.1.1'
>>>

How to use

Run the following command to generate 100 images in ./generated_faces (the directory will be created, you can provide any existing or non existing directory):

fake_faces_generator ./generated_faces 100

Licence

License: MIT

About

A simple CLI for downloading unique images from thispersondoesnotexist.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages