{"id":18206683,"url":"https://github.com/willyfh/farl-face-segmentation","last_synced_at":"2025-04-10T06:13:28.732Z","repository":{"id":209047484,"uuid":"587153652","full_name":"willyfh/farl-face-segmentation","owner":"willyfh","description":"A face segmentation implementation of FarRL model (CVPR 2022) using Facer, a face analysis toolkit for modern research.","archived":false,"fork":false,"pushed_at":"2023-12-02T15:58:14.000Z","size":155,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T07:22:31.180Z","etag":null,"topics":["artificial-intelligence","computer-vision","deep-learning","face-analysis","face-parsing","face-segmentation","facer","farl","maching-learning"],"latest_commit_sha":null,"homepage":"https://openaccess.thecvf.com/content/CVPR2022/papers/Zheng_General_Facial_Representation_Learning_in_a_Visual-Linguistic_Manner_CVPR_2022_paper.pdf","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willyfh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-10T04:40:22.000Z","updated_at":"2025-03-04T08:15:42.000Z","dependencies_parsed_at":"2023-12-02T16:44:20.282Z","dependency_job_id":null,"html_url":"https://github.com/willyfh/farl-face-segmentation","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"02195d7568463ff20b46bb302695c5038f1545e6"},"previous_names":["willyfh/farl-face-segmentation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyfh%2Ffarl-face-segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyfh%2Ffarl-face-segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyfh%2Ffarl-face-segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willyfh%2Ffarl-face-segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willyfh","download_url":"https://codeload.github.com/willyfh/farl-face-segmentation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"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":["artificial-intelligence","computer-vision","deep-learning","face-analysis","face-parsing","face-segmentation","facer","farl","maching-learning"],"created_at":"2024-11-03T12:05:54.230Z","updated_at":"2025-04-10T06:13:28.711Z","avatar_url":"https://github.com/willyfh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Segmentation of FaRL Model using Facer\nA face segmentation implementation of [FarRL](https://openaccess.thecvf.com/content/CVPR2022/papers/Zheng_General_Facial_Representation_Learning_in_a_Visual-Linguistic_Manner_CVPR_2022_paper.pdf) model (CVPR 2022) using [Facer](https://github.com/FacePerceiver/facer), a face analysis toolkit for modern research.\n\nThe author of FaRL performed pre-training on [LAION-FACE](https://github.com/FacePerceiver/LAION-Face), a dataset containing a large amount of face image-text pairs. They then used the pretrained encoder, to extract the image features for training a downstream task, which also includes Face Parsing task. In this work, I utilize the FaRL model which was pretrained on the Face Parsing task, and then map the predicted labels (eyes, nose, mouth, etc.) into two separate labels, i.e., face and background.\n\n## Illustration of the FaRL Pretraining Framework\n![FaRL](https://github.com/willyfh/farl-face-segmentation/assets/5786636/b39da57e-ea69-440a-9d17-d9cc6efeab82)\n\n## Installation\n```\nconda create --name {name_env} python==3.8\nconda activate {name_env}\npip install git+https://github.com/FacePerceiver/facer.git@main\npip install timm\npip install imutils\n```\n\n## Usage\n\n```\npython face_segmentation.py --image_path sample/Shin-Eun-Soo.jpg\n```\n\nTo display the list of available arguments:\n```\npython face_segmentation.py --help\n```\n\n## Output\nFor left to right: segmented face image, extracted face mask, cropped face\n![Shin-Eun-Soo_stackedsegmentation](https://github.com/willyfh/farl-face-segmentation/assets/5786636/046c3df4-2ec3-4c06-a4c3-cc2e227df93a)\n![Shin-Tae-Yong_stackedsegmentation](https://github.com/willyfh/farl-face-segmentation/assets/5786636/d7f9d84a-223c-4c64-bc5b-b07624b1dfac)\n![Willy-Fitra-Hendria_stackedsegmentation](https://github.com/willyfh/farl-face-segmentation/assets/5786636/f3146583-8195-45be-96c7-2cbee06551ba)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillyfh%2Ffarl-face-segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillyfh%2Ffarl-face-segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillyfh%2Ffarl-face-segmentation/lists"}