{"id":18459529,"url":"https://github.com/harlanhong/face-depth-network","last_synced_at":"2025-04-08T06:31:47.470Z","repository":{"id":40359495,"uuid":"507479435","full_name":"harlanhong/Face-Depth-Network","owner":"harlanhong","description":"The component of DaGAN (CVPR 2022)","archived":false,"fork":false,"pushed_at":"2022-06-27T07:46:10.000Z","size":553,"stargazers_count":22,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T07:12:20.399Z","etag":null,"topics":["cvpr","depth","face","gan"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/harlanhong.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":"2022-06-26T04:46:22.000Z","updated_at":"2025-01-18T08:42:15.000Z","dependencies_parsed_at":"2022-09-05T12:40:33.955Z","dependency_job_id":null,"html_url":"https://github.com/harlanhong/Face-Depth-Network","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/harlanhong%2FFace-Depth-Network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harlanhong%2FFace-Depth-Network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harlanhong%2FFace-Depth-Network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harlanhong%2FFace-Depth-Network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harlanhong","download_url":"https://codeload.github.com/harlanhong/Face-Depth-Network/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792029,"owners_count":20996876,"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":["cvpr","depth","face","gan"],"created_at":"2024-11-06T08:23:30.984Z","updated_at":"2025-04-08T06:31:46.820Z","avatar_url":"https://github.com/harlanhong.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## :book: The Face Depth Network of ``Depth-Aware Generative Adversarial Network for Talking Head Video Generation'' (CVPR 2022)\n\u003cp align=\"center\"\u003e\n  \u003csmall\u003e:fire: If DaGAN is helpful in your photos/projects, please help to :star: it or recommend it to your friends. Thanks:fire:\u003c/small\u003e\n\u003c/p\u003e\n\n\u003e [[Paper](https://arxiv.org/abs/2203.06605)] \u0026emsp; [[Project Page](https://harlanhong.github.io/publications/dagan.html)] \u0026emsp; [[Demo](https://huggingface.co/spaces/HarlanHong/DaGAN)] \u0026emsp; [[Poster Video](https://www.youtube.com/watch?v=nahsJNjWzGo\u0026t=1s)]\u003cbr\u003e\n\u003c!-- \u003e [Fa-Ting Hong](https://harlanhong.github.io), [Longhao Zhang](https://dblp.org/pid/236/7382.html), [Li Shen](https://scholar.google.co.uk/citations?user=ABbCaxsAAAAJ\u0026hl=en), [Dan Xu](https://www.danxurgb.net) \u003cbr\u003e --\u003e\n\u003c!-- \u003e The Hong Kong University of Science and Technology, Alibaba Cloud --\u003e\n\u003e [Fa-Ting Hong](https://harlanhong.github.io), [Longhao Zhang](), [Li Shen](), [Dan Xu](https://www.danxurgb.net) \u003cbr\u003e\n\u003e The Hong Kong University of Science and Technology\n### Cartoon Sample\nhttps://user-images.githubusercontent.com/19970321/162151632-0195292f-30b8-4122-8afd-9b1698f1e4fe.mp4\n\n### Human Sample\nhttps://user-images.githubusercontent.com/19970321/162151327-f2930231-42e3-40f2-bfca-a88529599f0f.mp4\n\n### Image Dataset\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/pointcloud.jpg\"\u003e\n\u003c/p\u003e\n\n\n\n## :wrench: Dependencies and Installation\n\n- Python \u003e= 3.7 (Recommend to use [Anaconda](https://www.anaconda.com/download/#linux) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html))\n- [PyTorch \u003e= 1.7](https://pytorch.org/)\n- Option: NVIDIA GPU + [CUDA](https://developer.nvidia.com/cuda-downloads)\n- Option: Linux\n\n### ⚙️ Setup\n\n1. Clone repo\n\n    ```bash\n    git clone https://github.com/harlanhong/DaGAN-Head.git\n    cd CVPR2022-Head\n    ```\n\n2. Install dependent packages\n\n    ```bash\n    conda install pytorch=0.4.1 torchvision=0.2.1 -c pytorch\n    pip install tensorboardX==1.4\n    conda install opencv=3.3.1   # just needed for evaluation\n    ```\n    Or you can use the environment of [DaGAN](https://github.com/harlanhong/CVPR2022-DaGAN) directly\n## :zap: Quick Inference\n\n### Pre-trained checkpoint\nThe pre-trained checkpoint of face depth network and our DaGAN checkpoints can be found under following link: [OneDrive](https://hkustconnect-my.sharepoint.com/:f:/g/personal/fhongac_connect_ust_hk/EjfeXuzwo3JMn7s0oOPN_q0B81P5Wgu_kbYJAh7uSAKS2w?e=KaQcPk).\n\n**Inference!**\nTo run a demo, download checkpoint and run the following command to predict scaled disparity for a single image with:\n\n\n```shell\npython test_simple.py --image_path assets/test_image.jpg --model_name tmp/You_Model/models/weights_19\n```\n\n## ⏳ Training\n\n\n### Datasets\n \n1) **Splits**. The train/test/validation splits are upload on the [One drive](https://hkustconnect-my.sharepoint.com/:f:/g/personal/fhongac_connect_ust_hk/Eq3AeGskIzlBnb6qiAsrGPoBM0Euv5yX9k3dtanIRgatcg?e=8gsxdr)\n\n### Train on VoxCeleb\nTo train a model on specific dataset run:\n```\nCUDA_VISIBLE_DEVICES=0 python train.py --batch_size 32  --heigh 256 --width 256 --dataset vox  --sample_num 100000 --model_name taking_head_10w --data_path vox2\n\n```\n\n\n### Training on your own dataset\nYou can train on a custom monocular or stereo dataset by writing a new dataloader class which inherits from `MonoDataset` – see the `CELEBDataset` class in `datasets/celeb_dataset.py` for an example.\n\n\n## :scroll: Acknowledgement\n\n Our Face-Depth-Network implementation is borrowed from [Monodepth2](https://github.com/nianticlabs/monodepth2). We appreciate the authors of Monodepth2 for making their codes available to public.\n\n## :scroll: BibTeX\n\n```\n@inproceedings{hong2022depth,\n            title={Depth-Aware Generative Adversarial Network for Talking Head Video Generation},\n            author={Hong, Fa-Ting and Zhang, Longhao and Shen, Li and Xu, Dan},\n            journal={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},\n            year={2022}\n          }\n```\n\n### :e-mail: Contact\n\nIf you have any question, please email `fhongac@cse.ust.hk`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharlanhong%2Fface-depth-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharlanhong%2Fface-depth-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharlanhong%2Fface-depth-network/lists"}