{"id":13419627,"url":"https://github.com/somewacko/deconvfaces","last_synced_at":"2025-03-15T05:32:00.794Z","repository":{"id":41311970,"uuid":"57179587","full_name":"somewacko/deconvfaces","owner":"somewacko","description":"Generating faces with deconvolution networks","archived":false,"fork":false,"pushed_at":"2021-06-08T20:08:11.000Z","size":1840,"stargazers_count":893,"open_issues_count":2,"forks_count":130,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-07-31T22:50:45.849Z","etag":null,"topics":["animation","deep-learning","keras"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/somewacko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-27T03:11:22.000Z","updated_at":"2024-07-30T03:58:56.000Z","dependencies_parsed_at":"2022-08-19T02:51:28.246Z","dependency_job_id":null,"html_url":"https://github.com/somewacko/deconvfaces","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somewacko%2Fdeconvfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somewacko%2Fdeconvfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somewacko%2Fdeconvfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somewacko%2Fdeconvfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somewacko","download_url":"https://codeload.github.com/somewacko/deconvfaces/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690111,"owners_count":20331726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","deep-learning","keras"],"created_at":"2024-07-30T22:01:18.629Z","updated_at":"2025-03-15T05:32:00.787Z","avatar_url":"https://github.com/somewacko.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Generating Faces with Deconvolution Networks\n\n![Example generations](img/example.gif)\n\nThis repo contains code to train and interface with a deconvolution network adapted from [this paper][Chairs] to generate faces using data from the [Radboud Faces Database][RaFD]. Requires [Keras][Keras], [NumPy][NumPy], [SciPy][SciPy], and [tqdm][tqdm] with Python 3 to use.\n\n## Training New Models\n\nTo train a new model, simply run:\n\n    python3 faces.py train path/to/data\n    \nYou can specify the number of deconvolution layers with `-d` to generate larger images, assuming your GPU has the memory for it. You can play with the batch size and the number of kernels per layer (using `-b` and `-k` respectively) until it fits in memory, although this may result in worse results or longer training.\n\nUsing 6 deconvolution layers with a batch size of 8 and the default number of kernels per layer, a model was trained on an Nvidia Titan X card (12 GB) to generate 512x640 images in a little over a day.\n\n## Generating Images\n\nTo generate images using a trained model, you can specify parameters in a yaml file and run:\n\n    python3 faces.py generate -m path/to/model -o output/directory -f path/to/params.yaml\n\nThere are four different modes you can use to generate images:\n\n* `single`, produce a single image.\n* `random`, produce a set of random images.\n* `drunk`, similar to random, but produces a more contiguous sequence of images.\n* `interpolate`, animate between a set of specified keyframes.\n\nYou can find examples of these files in the `params` directory, which should give you a good idea of how to format these and what's available.\n\n## Examples\n\nInterpolating between identities and emotions:\n\n[![Interpolating between identities and emotions](http://img.youtube.com/vi/UdTq_Q-WgTs/0.jpg)](https://www.youtube.com/watch?v=UdTq_Q-WgTs)\n\nInterpolating between orientations: (which the model is unable to learn)\n\n[![Interpolating between orientation](http://img.youtube.com/vi/F4OFkN3EURk/0.jpg)](https://www.youtube.com/watch?v=F4OFkN3EURk)\n\nRandom generations (using \"drunk\" mode):\n\n[![Random generations](http://img.youtube.com/vi/vt8zNvJNjSo/0.jpg)](https://www.youtube.com/watch?v=vt8zNvJNjSo)\n\n[Chairs]: https://arxiv.org/abs/1411.5928\n[RaFD]: http://www.socsci.ru.nl:8180/RaFD2/RaFD?p=main\n[Keras]: https://keras.io/\n[NumPy]: http://www.numpy.org/\n[SciPy]: https://www.scipy.org/\n[tqdm]: https://github.com/noamraph/tqdm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomewacko%2Fdeconvfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomewacko%2Fdeconvfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomewacko%2Fdeconvfaces/lists"}