{"id":20900038,"url":"https://github.com/the404hacking/2d-and-3d-face-alignment","last_synced_at":"2026-04-20T08:33:30.450Z","repository":{"id":109047288,"uuid":"107321047","full_name":"The404Hacking/2D-and-3D-face-alignment","owner":"The404Hacking","description":"This repository implements a demo of the networks described in \"How far are we from solving the 2D \u0026 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)\" paper.","archived":false,"fork":false,"pushed_at":"2017-10-17T20:37:02.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T20:11:54.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/The404Hacking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-17T20:36:50.000Z","updated_at":"2017-10-17T20:37:03.000Z","dependencies_parsed_at":"2023-04-08T19:09:57.914Z","dependency_job_id":null,"html_url":"https://github.com/The404Hacking/2D-and-3D-face-alignment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/The404Hacking/2D-and-3D-face-alignment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The404Hacking%2F2D-and-3D-face-alignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The404Hacking%2F2D-and-3D-face-alignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The404Hacking%2F2D-and-3D-face-alignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The404Hacking%2F2D-and-3D-face-alignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The404Hacking","download_url":"https://codeload.github.com/The404Hacking/2D-and-3D-face-alignment/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The404Hacking%2F2D-and-3D-face-alignment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32040221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-18T11:17:43.927Z","updated_at":"2026-04-20T08:33:30.421Z","avatar_url":"https://github.com/The404Hacking.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How far are we from solving the 2D \\\u0026 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)\n\nThis repository implements a demo of the networks described in \"How far are we from solving the 2D \\\u0026 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)\" paper. Please visit [our](https://www.adrianbulat.com) webpage or read bellow for instructions on how to run the code and access the dataset.\n\n**Training code: \u003chttps://www.github.com/1adrianb/face-alignment-training\u003e**\n\n**:fire: Python code available: \u003chttps://www.github.com/1adrianb/face-alignment\u003e**\n\nNote: If you are interested in a binarized version, capable of running on devices with limited resources please also check \u003chttps://github.com/1adrianb/binary-face-alignment\u003e for a demo.\n\n\u003cp align='center'\u003e\n\u003cimg src='https://www.adrianbulat.com/images/image-z-examples.png' title='3D-FAN-Full example' style='max-width:600px'\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n## Requirments\n\n- Install the latest [Torch7](http://torch.ch/docs/getting-started.html) version (for Windows, please follow the instructions available [here](https://github.com/torch/distro/blob/master/win-files/README.md))\n- Install python 2.7.x\n\n### Lua packages\n\n- [cutorch](https://github.com/torch/cutorch)\n- [nn](https://github.com/torch/nn)\n- [cunn](https://github.com/torch/cunn)\n- [nngraph](https://github.com/torch/nngraph)\n- [cudnn](https://github.com/soumith/cudnn.torch)\n- [xlua](https://github.com/torch/xlua)\n- [image](https://github.com/torch/image)\n- [paths](https://github.com/torch/paths)\n- [fb.python](https://github.com/facebook/fblualib/blob/master/fblualib/python/README.md)\n\nNote: if you are having troubles compiling thpp (required for fb.python) against the latest version of torch7 please use the version available here: [https://github.com/1adrianb/thpp](https://github.com/1adrianb/thpp)\n\n### Python packages\n\n- [numpy](http://www.numpy.org/)\n- [matplotlib](https://matplotlib.org/)\n- [dlib](https://pypi.python.org/pypi/dlib) (required for face detection, if no bbox are provided)\n\nPlease note that dlib performs poorly for faces found in challenging poses or difficult lighting conditions and it's provided only as a simple demo. For optimal performance we recommend using other deeplearning based face detection methods.\n\n## Setup\n\nClone the github repository and install all the dependencies mentiones above.\n\n```bash\ngit  clone https://github.com/1adrianb/2D-and-3D-face-alignment\ncd 2D-and-3D-face-alignment\n```\n\n## Usage\n\nIn order to run the demo please download the required models available bellow and the associated data.\n\n```bash\nth main.lua\n```\n\nIn order to see all the available options please run:\n\n```bash\nth main.lua --help\n```\n\n## Docker image\n\nFor convenience, a Dockerfile is provided to build images with cuda support and cudnn v5.1:\n\n```bash\ndocker build -t facealignment .\n```\n\nAlternatively you can use the image available on [docker hub](https://hub.docker.com/r/1adrianb/facealignment-torch/):\n\n```bash\nnvidia-docker run -it 1adrianb/facealignment-torch\n```\n\nIn order to keep the image small the data and the models are not included and will have to be downloaded separately.\n\nDocker image based on the [cuda-torch](https://hub.docker.com/r/kaixhin/cuda-torch/) by kaixhin.\n\n## Pretrained models\n\n[2D-FAN](https://www.adrianbulat.com/downloads/FaceAlignment/2D-FAN-300W.t7) - trained on 300W-LP and finetuned on iBUG training set.\n\n[3D-FAN](https://www.adrianbulat.com/downloads/FaceAlignment/3D-FAN.t7) - trained on 300W-LP\n\n[2D-to-3D-FAN](https://www.adrianbulat.com/downloads/FaceAlignment/2D-to-3D-FAN.tar.gz) - trained on 300W-LP\n\n[3D-FAN-depth](https://www.adrianbulat.com/downloads/FaceAlignment/3D-FAN-depth.t7) - trained on 300W-LP\n\n## Citation\n\n```\n@inproceedings{bulat2017far,\n  title={How far are we from solving the 2D \\\u0026 3D Face Alignment problem? (and a dataset of 230,000 3D facial landmarks)},\n  author={Bulat, Adrian and Tzimiropoulos, Georgios},\n  booktitle={International Conference on Computer Vision},\n  year={2017}\n}\n```\n\n## Dataset\n\nYou can download the annotations alongside the images used by visiting [our page](https://www.adrianbulat.com/face-alignment).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe404hacking%2F2d-and-3d-face-alignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe404hacking%2F2d-and-3d-face-alignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe404hacking%2F2d-and-3d-face-alignment/lists"}