{"id":16517327,"url":"https://github.com/vietanhdev/deep-head-pose-2","last_synced_at":"2025-07-10T10:34:05.763Z","repository":{"id":79025087,"uuid":"289843428","full_name":"vietanhdev/deep-head-pose-2","owner":"vietanhdev","description":"Deep head pose model with ShuffleNetV2, EfficientNet backbonds and Landmark estimation.","archived":false,"fork":false,"pushed_at":"2021-10-29T15:53:35.000Z","size":23427,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-01T21:11:24.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vietanhdev.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":"2020-08-24T06:11:52.000Z","updated_at":"2023-02-23T04:40:32.000Z","dependencies_parsed_at":"2023-06-17T17:15:54.442Z","dependency_job_id":null,"html_url":"https://github.com/vietanhdev/deep-head-pose-2","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/vietanhdev%2Fdeep-head-pose-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fdeep-head-pose-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fdeep-head-pose-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vietanhdev%2Fdeep-head-pose-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vietanhdev","download_url":"https://codeload.github.com/vietanhdev/deep-head-pose-2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233704839,"owners_count":18717028,"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-10-11T16:29:55.821Z","updated_at":"2025-01-13T06:41:57.923Z","avatar_url":"https://github.com/vietanhdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deep Head Pose 2 - Keras Tensorflow 2\n\n[![Deep Head Pose 2](screenshots/deepheadpose2.png)](https://www.youtube.com/watch?v=SNHnsuNkBkQ)\n\n## I. Introduction\n\n- This repository contains an implementation of [Deep Head Pose](https://arxiv.org/pdf/1710.00925v5.pdf) based on original code from [Oreobird/tf-keras-deep-head-pose](https://github.com/Oreobird/tf-keras-deep-head-pose) with following changes:\n    + Use [ShuffleNetV2](https://arxiv.org/abs/1807.11164) or [EfficientNet-B0](https://arxiv.org/abs/1905.11946) as backbone network. \n    The ideal of using ShuffleNetV2 comes from [this Pytorch implementation](https://github.com/OverEuro/deep-head-pose-lite).\n    + Rewrite data generator for multi-threading.\n    + Add 5-point landmark as an output branch.\n    + Support 3 datasets: BIWI, AFLW2000, 300W_LP. \n        + All datasets are converted to uniform format (png files for images and JSON files for labels).\n        + Use [Retina Face](https://github.com/deepinsight/insightface) for generating bounding box and landmark label automatically for BIWI dataset.\n        + Re-label landmark points for AFLW2000. The final dataset can be downloaded from [here](https://1drv.ms/u/s!Av71xxzl6mYZgddGNOolzhRWvELnlQ?e=qf4aVF).\n    + Write image augmentation code using multiple methods: blur, crop, add padding, sharpen, dropout, flip, adjust color and constrast...\n\n- The original Pytorch version: https://github.com/natanielruiz/deep-head-pose\n\n- Pretrained model for:\n    + ShuffleNet V2: [models/shufflenet_v2.h5](models/shufflenet_v2.h5).\n    + EfficientNet: \u003chttps://1drv.ms/u/s!Av71xxzl6mYZgddGNOolzhRWvELnlQ?e=TCd055\u003e.\n\n## I. Environment:\n\n- We use Tensorflow 2.0.0.\n- Install environment from `environment.yml` file using Anaconda and Miniconda and activate that environment.\n\n## II. Dataset preparation\n\n- 1. Download [300W_LP](http://www.cbsr.ia.ac.cn/users/xiangyuzhu/projects/3DDFA/main.htm), [BIWI](http://www.vision.ee.ethz.ch/en/datasets/) and [AFLW2000](http://cvlab.cse.msu.edu/lfw-and-aflw2000-datasets.html) datasets and put into `data/300W_LP`, `data/BIWI`, `data/AFLW2000` respectively.\n- 2. Use following scripts to generate data from those datasets: `make_data_300W_LP.py`, `make_data_BIWI.py`, `make_data_AFLW2000.py`. You can download final AFLW2000 from [here](https://drive.google.com/open?id=1XJXl0rmJ4gDqA8ZFLsSa-Ettbx4zjS26).\n- 3. Run  `sh split_data_set.sh` to split dataset. This script will take 2000 images from 300W_LP and 2000 images from BIWI dataset to build validation set at `data/val_set` and remaining parts of these dataset to build training set at `data/train_set`. We use AFLW2000 as testing set.\n\n## III. Training and testing\n\n### Training\n\n- Modify config files at `config_shufflenetv2.json` and `config_efficientnet.json` to use for training and testing.\n\n- Example of commands for training:\n\n```\npython train.py -c config_shufflenetv2.json\n```\n\nOr \n\n```\npython train.py -c config_efficientnet.json\n```\n\n### Testing\n\n```\npython test.py -c config_shufflenetv2.json\n```\n\nOr \n\n```\npython test.py -c config_efficientnet.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietanhdev%2Fdeep-head-pose-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvietanhdev%2Fdeep-head-pose-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvietanhdev%2Fdeep-head-pose-2/lists"}