{"id":27612798,"url":"https://github.com/thesouthfrog/stylealign","last_synced_at":"2025-04-23T01:56:33.176Z","repository":{"id":37612270,"uuid":"200377174","full_name":"TheSouthFrog/stylealign","owner":"TheSouthFrog","description":"[ICCV 2019]Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Transition","archived":false,"fork":false,"pushed_at":"2023-03-24T22:27:54.000Z","size":7258,"stargazers_count":183,"open_issues_count":11,"forks_count":27,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-23T01:56:23.017Z","etag":null,"topics":["data-augmentation","face-alignment","facial-landmarks","representation-learning","semi-supervised-learning"],"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/TheSouthFrog.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}},"created_at":"2019-08-03T13:12:50.000Z","updated_at":"2024-11-18T03:01:47.000Z","dependencies_parsed_at":"2023-01-21T08:03:01.159Z","dependency_job_id":null,"html_url":"https://github.com/TheSouthFrog/stylealign","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/TheSouthFrog%2Fstylealign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSouthFrog%2Fstylealign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSouthFrog%2Fstylealign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSouthFrog%2Fstylealign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheSouthFrog","download_url":"https://codeload.github.com/TheSouthFrog/stylealign/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354304,"owners_count":21416751,"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":["data-augmentation","face-alignment","facial-landmarks","representation-learning","semi-supervised-learning"],"created_at":"2025-04-23T01:56:32.272Z","updated_at":"2025-04-23T01:56:33.169Z","avatar_url":"https://github.com/TheSouthFrog.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Translation\n\n[Shengju Qian](http://thesouthfrog.com/about.me/),\n[Keqiang Sun](https://keqiangsun.github.io/),\n[Wayne Wu](https://wywu.github.io),\n[Chen Qian](https://scholar.google.com/citations?user=AerkT0YAAAAJ\u0026hl=en),\nand [Jiaya Jia](http://jiaya.me/)\n\n[International Conference on Computer Vision (ICCV), 2019](http://iccv2019.thecvf.com/)\n\nThis repository contains the implementation of our ICCV 2019 paper, '[Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Translation](https://arxiv.org/pdf/1908.06440.pdf)'.\nThe proposed method investigates how to boost the performance of facial landmark detector in limited training resources, using synthetic data in a style-translation manner.\n\n![aug](fig/aug.png)\n\n**Results(NME/%) on WFLW dataset**\n\n| Method | Fullset | Pose | Expression | Illumination | Make-up | Occlusion | Blur |\n| :-----------------: | :-----------: | :------: | :------: | :------: | :------: | :------: | :------: |\n| DVLN | 6.08 | 11.54 | 6.78 | 5.73 | 5.98 | 7.33 | 6.88 |\n| LAB | 5.27 | 10.24 | 5.51 | 5.23 | 5.15 | 6.79 | 6.32 |\n| SAN | 5.22 | 10.39 | 5.71 | 5.19 | 5.49 | 6.83 | 5.80 |\n| WING | 5.11 | 8.75 | 5.36 | 4.93 | 5.41 | 6.37 | 5.81 |\n| ResNet-18 | 6.09 | 10.76 | 6.97 | 5.83 | 6.19 | 7.15 | 6.67 |\n| **AVS(ResNet-18)** | 5.25 | 9.10 | 5.83 | 4.93 | 5.47 | 6.26 | 5.86 |\n| **AVS(LAB)** | **4.76** | **8.21** | **5.14** | **4.51** | **5.00** | **5.76** | **5.43** |\n| **AVS(SAN)** | **4.39** | **8.42** | **4.68** | **4.24** | **4.37** | **5.60** | **4.86** |\n\nWe provide a synthetic WFLW dataset generated by this method here [Google Drive](https://drive.google.com/file/d/1bddYn6zQHFORKqZXm5vYTwB4Mn2UKwGb/view?usp=sharing) or [Baidu Drive](https://pan.baidu.com/s/1cJl_sL7NoQFApomTTv6-ew).\n\nIn the provided dataset, each image is augmented with eight different styles in the original WFLW dataset. You may\ndownload from this link and are able to produce similar to re-produce the results reported in our paper.\n\nFor example, you can train a SAN(CVPR 2018) model using our [script](https://github.com/TheSouthFrog/stylealign/tree/master/landmark_detection).\n\n### Avaliable Implementation\n\n[Tensorflow](https://github.com/TheSouthFrog/stylealign)\n\n[Pytorch(Minimal)](https://github.com/TheSouthFrog/stylealign/tree/master/pytorch_code)\n\n[Facial Landmark Detection(SAN)](https://github.com/TheSouthFrog/stylealign/tree/master/landmark_detection)\n\n______\n\nThe instruction of tensorflow implementation is provided in the following:\n\n### Prerequisites and Installation\n- Python 3.6\n- Tensorflow 1.2.1\n- CUDA 8.0 and CuDNN 5.1\n\n#### Getting Started\n**Clone this repository:**\n```bash\ngit clone git@github.com:TheSouthFrog/stylealign.git\ncd stylealign\n```\n**Install dependencies using Anaconda:**\n ```bash\nconda create -n stylealign python=3.6\nsource activate stylealign\npip install -r requirements.txt\n```\nNote this implementation, we use [variational u-net](https://github.com/CompVis/vunet/tree/tf12legacy) as network structure as it produces sharper results.\n\nAs it uses a deprecated API of data dependent initialization which requires legacy version of CUDA 8.0 and CuDNN 5.1 without backward compatibility.\n\n**Prepare Dataset**\n - You may the original cropped WFLW dataset here [Google Drive](https://drive.google.com/file/d/1nZmjlwVSJxI8_W27LpjPJa6K_M_gmTXS/view?usp=sharing) or [Baidu Drive](https://pan.baidu.com/s/1fzizdQ3FRBRwfJjGRvw8gA).\n - Unzip downloaded files. Remember to change the ***data_dir*** and ***image_list*** to your image directory and annotation file, respectively.\n\n### Running the code:\nAssume that you have installed multiple versions of CUDA and CuDNN.\nBy switching the environment to run our code, you need to find out the directory where you have installed the right version and run(for example):\n\n```bash\nexport LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64\n```\n\nThen run:\n\n```bash\nCUDA_VISIBLE_DEVICES=gpu_id python main.py --config config/exp_0001.yaml\n```\n\n**Generate style-augmented samples**\n\n```bash\nCUDA_VISIBLE_DEVICES=gpu_id python main.py --checkpoint XXXXXX --config config/test_0001.yaml\n```\n\nFor acceleration, we use the transfer pass to perform testing, where every image in a batch(batch size: ***n***) outputs ***n*** samples under different styles in this batch(n\u003csup\u003e2\u003c/sup\u003e in single pass).\n\n```gen_landmark.py``` is used to generate seperated images and corresponding labels of synthetic images according to transfer images and given order in original annotation files.\n- ```--label_file```: The annotation file that used for testing.\n- ```--checkpoint_iter```: Trained Iteration of the testing checkpoint.\n- ```--batch_size```: Testing batch size.\n- ```--gen_dir``` and ```--out_dir```: Testing directory and Output directory.\n\n### Contact\nIf you have any questions, please feel free to contact the authors.\nShengju Qian sjqian@cse.cuhk.edu.hk\n\n### Citation\n\nIf you use our code, please consider citing our paper:\n\n```\n@inproceedings{qian2019aggregation,\n  title={Aggregation via Separation: Boosting Facial Landmark Detector with Semi-Supervised Style Translation},\n  author={Qian, Shengju and Sun, Keqiang and Wu, Wayne and Qian, Chen and Jia, Jiaya},\n  journal={ICCV},\n  year={2019}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesouthfrog%2Fstylealign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesouthfrog%2Fstylealign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesouthfrog%2Fstylealign/lists"}