A simple unofficial CLI for downloading unique images of faces from www.thispersondoesnotexist.com.
There already exist at least two repositories for that:
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.
- Tracking file (seen.pkl) is always saved (even when an error occurs).
Run the following command in your virtual env.
pip install git+https://github.com/plachert/fake-faces-generatorVerify installation:
(venv) foo@bar:~$ python
>>> import fake_faces_generator
>>> fake_faces_generator.__version__
'0.1.1'
>>>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