{"id":19742425,"url":"https://github.com/dreamsoftin/facetool","last_synced_at":"2026-04-02T01:18:04.771Z","repository":{"id":40607824,"uuid":"376542549","full_name":"dreamsoftin/FaceTool","owner":"dreamsoftin","description":"Simple Python script to crop and align faces","archived":false,"fork":false,"pushed_at":"2021-06-17T07:41:56.000Z","size":1413,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T06:43:49.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dreamsoftin.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}},"created_at":"2021-06-13T12:48:31.000Z","updated_at":"2023-06-14T04:11:42.000Z","dependencies_parsed_at":"2022-09-20T12:02:55.574Z","dependency_job_id":null,"html_url":"https://github.com/dreamsoftin/FaceTool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dreamsoftin/FaceTool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamsoftin%2FFaceTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamsoftin%2FFaceTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamsoftin%2FFaceTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamsoftin%2FFaceTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamsoftin","download_url":"https://codeload.github.com/dreamsoftin/FaceTool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamsoftin%2FFaceTool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-12T01:31:31.089Z","updated_at":"2026-04-02T01:18:04.750Z","avatar_url":"https://github.com/dreamsoftin.png","language":"Python","readme":"# FaceTool\n\nA simple python package to crop and align faces. Uses Mediapipe for face detection\n\n|Input |Output|\n--- | --- |\n|![before](assets/before.jpg \"before\")|![after](assets/after.jpg \"before\")|\n|![before](assets/before2.jpg \"before\")|![after](assets/after2.jpg \"before\")|\n---\n|Output |ZoomFactor 1| ZoomFactor 4| Offset -200|\n--- | --- | --- | ----\n|![before](assets/after3.jpg \"before\")|![after_zoom_1](assets/after_zoom_1.jpg \"after_zoom_1\")|![after_zoom_4](assets/after_zoom_4.jpg \"after_zoom_4\")|![after_offset_200](assets/after_offset_200.jpg \"after_offset_200\")\n---\n## Requirements\n* Python 3.6\n* MediaPipe\n* OpenCV\n\ninstall all dependencies\n```bash\npip install -r requirements.txt\n```\n---\n## Usage\n\n```PYTHON\nfacetool = FaceTool(debug=False)\n#Crop and Align, Returns 3 Parameters (face_count, faces array)\nface_count, faces, message = facetool.crop_and_align(image, size=512, zoom_factor=2, offset_y=-10)\n\nif face_count \u003e 0:\n    # face are sorted by area\n    # takes the face with largest area.\n    cv2.imshow(\"cropped_image_0\", faces[0].image)\n```\n\n---\nAcknowledgements\n----------------\nThe alignment code is partially Based on the tutorial by [datahacker.rs](http://datahacker.rs/010-how-to-align-faces-with-opencv-in-python/)\n\nThis repository contains some stock photos from [Pexels].\n\n[Pexels]: https://www.pexels.com/","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamsoftin%2Ffacetool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamsoftin%2Ffacetool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamsoftin%2Ffacetool/lists"}