{"id":20256573,"url":"https://github.com/interdigitalinc/hrfae","last_synced_at":"2025-04-07T17:12:11.226Z","repository":{"id":43521075,"uuid":"254092610","full_name":"InterDigitalInc/HRFAE","owner":"InterDigitalInc","description":"Official implementation for paper High Resolution Face Age Editing","archived":false,"fork":false,"pushed_at":"2023-01-12T08:26:12.000Z","size":2869,"stargazers_count":302,"open_issues_count":16,"forks_count":65,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T14:14:28.114Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2005.04410","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InterDigitalInc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-08T13:16:35.000Z","updated_at":"2025-03-26T04:41:56.000Z","dependencies_parsed_at":"2023-02-09T10:46:21.952Z","dependency_job_id":null,"html_url":"https://github.com/InterDigitalInc/HRFAE","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/InterDigitalInc%2FHRFAE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterDigitalInc%2FHRFAE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterDigitalInc%2FHRFAE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterDigitalInc%2FHRFAE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InterDigitalInc","download_url":"https://codeload.github.com/InterDigitalInc/HRFAE/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694877,"owners_count":20980733,"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":[],"created_at":"2024-11-14T10:47:15.969Z","updated_at":"2025-04-07T17:12:11.208Z","avatar_url":"https://github.com/InterDigitalInc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## HRFAE: High Resolution Face Age Editing\r\n\r\nOfficial implementation for paper [High Resolution Face Age Editing](https://arxiv.org/pdf/2005.04410.pdf).\r\n\r\n![Teaser image](./arch.png)\r\n\r\n## Dependencies\r\n\r\n* Python 3.7\r\n* Pytorch 1.1\r\n* Numpy\r\n* Opencv\r\n* TensorboardX\r\n* Tensorboard_logger\r\n\r\nYou can also create a new environment for this repo by running\r\n```\r\nconda env create -f env.yml\r\n```\r\n\r\n## Load and test pretrained network \r\n\r\n1. You can download the pretrained model by running:\r\n    ```\r\n    cd ./logs/001\r\n    ./download.sh\r\n    ```\r\n\r\n2. Upload test images in the folder `/test/input` and run the test file. The output images will be saved in the folder `/test/output`. You can change the desired target age with `--target_age`.\r\n    ```\r\n    python test.py --config 001 --target_age 65\r\n    ```\r\n\r\n## Train a new model\r\n\r\n1. Pretrained age classifier\r\n\r\n    To get age information, we use an age classifier pretrained on [IMDB-WIKI](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/) dataset. We use the model released from paper [Deep expectation of real and apparent age from a single image without facial landmarks](https://data.vision.ee.ethz.ch/cvl/publications/papers/articles/eth_biwi_01299.pdf) by Rothe et al. \r\n\r\n    To prepare the model, you need to download the original [caffe model](https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/static/dex_imdb_wiki.caffemodel) and convert it to PyTorch format. We use the converter [caffemodel2pytorch](https://github.com/vadimkantorov/caffemodel2pytorch) released by Vadim Kantorov. Then name the PyTorch model as `dex_imdb_wiki.caffemodel.pt` and put it in the folder `/models`.\r\n\r\n\r\n2. Preparing your dataset\r\n\r\n    Download [FFHQ](https://github.com/NVlabs/ffhq-dataset) dataset and unzip it to the `/data/ffhq` directory. \r\n    \r\n    Download [age label](https://partage.imt.fr/index.php/s/DbSk4HzFkeCYXDt) to the `/data` directory.\r\n\r\n    You can also train the model with your own dataset. Put your images in the `/data` directory. With the pretrained classifier, you can create a new label file with the age of each image. \r\n\r\n3. Training\r\n    \r\n    You can modify the training options of the config file in `configs` directory.\r\n    ```\r\n    python train.py --config 001 \r\n    ```\r\n\r\n## Google Colab\r\n\r\nWe also provide a colab version for quick test. To run it using Google Colab, please click [here](https://colab.research.google.com/github/InterDigitalInc/HRFAE/blob/master/test.ipynb). \r\n\r\n## Citation\r\n```\r\n@article{yao2020high,\r\n    title   = {High Resolution Face Age Editing},\r\n    author  = {Xu Yao and Gilles Puy and Alasdair Newson and Yann Gousseau and Pierre Hellier},\r\n    journal = {CoRR},\r\n    volume  = {abs/2005.04410},\r\n    year    = {2020},\r\n}\r\n```\r\n## License\r\n\r\nCopyright © 2020, InterDigital R\u0026D France. All rights reserved.\r\n\r\nThis source code is made available under the license found in the LICENSE.txt in the root directory of this source tree.\r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterdigitalinc%2Fhrfae","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterdigitalinc%2Fhrfae","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterdigitalinc%2Fhrfae/lists"}