{"id":15066212,"url":"https://github.com/hysts/anime-face-detector","last_synced_at":"2025-04-04T10:09:16.748Z","repository":{"id":42159853,"uuid":"422685613","full_name":"hysts/anime-face-detector","owner":"hysts","description":"Anime Face Detector using mmdet and mmpose","archived":false,"fork":false,"pushed_at":"2023-06-15T05:31:42.000Z","size":13159,"stargazers_count":415,"open_issues_count":11,"forks_count":24,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-10-30T03:43:02.173Z","etag":null,"topics":["anime","computer-vision","face-detection","face-landmark-detection","pytorch"],"latest_commit_sha":null,"homepage":"","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/hysts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-10-29T19:04:15.000Z","updated_at":"2024-10-27T16:09:07.000Z","dependencies_parsed_at":"2024-10-13T02:01:18.544Z","dependency_job_id":"46ac7406-b5af-4352-af25-0e0811c486bb","html_url":"https://github.com/hysts/anime-face-detector","commit_stats":{"total_commits":65,"total_committers":3,"mean_commits":"21.666666666666668","dds":0.03076923076923077,"last_synced_commit":"7bcc2aee925c650c22e7303e19839fd2d10ccd2d"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hysts%2Fanime-face-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hysts%2Fanime-face-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hysts%2Fanime-face-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hysts%2Fanime-face-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hysts","download_url":"https://codeload.github.com/hysts/anime-face-detector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157283,"owners_count":20893220,"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":["anime","computer-vision","face-detection","face-landmark-detection","pytorch"],"created_at":"2024-09-25T01:03:47.303Z","updated_at":"2025-04-04T10:09:16.729Z","avatar_url":"https://github.com/hysts.png","language":"Python","funding_links":[],"categories":["Projects","Python"],"sub_categories":["Diffusion models"],"readme":"# Anime Face Detector\n[![PyPI version](https://badge.fury.io/py/anime-face-detector.svg)](https://pypi.org/project/anime-face-detector/)\n[![Downloads](https://pepy.tech/badge/anime-face-detector)](https://pepy.tech/project/anime-face-detector)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/hysts/anime-face-detector/blob/main/demo.ipynb)\n[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-orange)](https://huggingface.co/spaces/hysts/anime-face-detector)\n[![MIT License](https://img.shields.io/badge/license-MIT-green)](https://opensource.org/licenses/MIT)\n[![GitHub stars](https://img.shields.io/github/stars/hysts/anime-face-detector.svg?style=flat-square\u0026logo=github\u0026label=Stars\u0026logoColor=white)](https://github.com/hysts/anime-face-detector)\n\nThis is an anime face detector using\n[mmdetection](https://github.com/open-mmlab/mmdetection)\nand [mmpose](https://github.com/open-mmlab/mmpose).\n\n![](https://raw.githubusercontent.com/hysts/anime-face-detector/main/assets/output.jpg)\n(To avoid copyright issues, the above demo uses images generated by the\n[TADNE](https://thisanimedoesnotexist.ai/) model.)\n\nThe model detects near-frontal anime faces and predicts 28 landmark points.\n![](https://raw.githubusercontent.com/hysts/anime-face-detector/main/assets/landmarks.jpg)\n\nThe result of k-means clustering of landmarks detected in real images:\n![](https://raw.githubusercontent.com/hysts/anime-face-detector/main/assets/cluster_pts.png)\n\nThe mean images of real images belonging to each cluster:\n![](https://raw.githubusercontent.com/hysts/anime-face-detector/main/assets/cluster_mean.jpg)\n\n## Installation\n\n```bash\npip install openmim\nmim install mmcv-full\nmim install mmdet\nmim install mmpose\n\npip install anime-face-detector\n```\n\nThis package is tested only on Ubuntu.\n\n## Usage\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/hysts/anime-face-detector/blob/main/demo.ipynb)\n\n```python\nimport cv2\n\nfrom anime_face_detector import create_detector\n\ndetector = create_detector('yolov3')\nimage = cv2.imread('assets/input.jpg')\npreds = detector(image)\nprint(preds[0])\n```\n\n```\n{'bbox': array([2.2450244e+03, 1.5940223e+03, 2.4116030e+03, 1.7458063e+03,\n        9.9987185e-01], dtype=float32),\n 'keypoints': array([[2.2593938e+03, 1.6680436e+03, 9.3236601e-01],\n        [2.2825300e+03, 1.7051841e+03, 8.7208068e-01],\n        [2.3412151e+03, 1.7281011e+03, 1.0052248e+00],\n        [2.3941377e+03, 1.6825046e+03, 5.9705663e-01],\n        [2.4039426e+03, 1.6541921e+03, 8.7139702e-01],\n        [2.2625220e+03, 1.6330233e+03, 9.7608268e-01],\n        [2.2804077e+03, 1.6408495e+03, 1.0021354e+00],\n        [2.2969380e+03, 1.6494972e+03, 9.7812974e-01],\n        [2.3357908e+03, 1.6453258e+03, 9.8418534e-01],\n        [2.3475276e+03, 1.6355408e+03, 9.5060223e-01],\n        [2.3612463e+03, 1.6262626e+03, 9.0553057e-01],\n        [2.2682278e+03, 1.6631940e+03, 9.5465249e-01],\n        [2.2814783e+03, 1.6616484e+03, 9.0782022e-01],\n        [2.2987590e+03, 1.6692812e+03, 9.0256405e-01],\n        [2.2833625e+03, 1.6879142e+03, 8.0303693e-01],\n        [2.2934949e+03, 1.6909009e+03, 8.9718056e-01],\n        [2.3021218e+03, 1.6863715e+03, 9.3882143e-01],\n        [2.3471826e+03, 1.6636573e+03, 9.5727938e-01],\n        [2.3677822e+03, 1.6540554e+03, 9.4890594e-01],\n        [2.3889211e+03, 1.6611255e+03, 9.5125675e-01],\n        [2.3575544e+03, 1.6800433e+03, 8.5919142e-01],\n        [2.3688926e+03, 1.6800665e+03, 8.3275074e-01],\n        [2.3804905e+03, 1.6761322e+03, 8.4160626e-01],\n        [2.3165366e+03, 1.6947096e+03, 9.1840971e-01],\n        [2.3282458e+03, 1.7104808e+03, 8.8045174e-01],\n        [2.3380054e+03, 1.7114034e+03, 8.8357794e-01],\n        [2.3485500e+03, 1.7080273e+03, 8.6284375e-01],\n        [2.3378748e+03, 1.7118135e+03, 9.7880816e-01]], dtype=float32)}\n```\n\n### Pretrained models\n\n[Here](https://github.com/hysts/anime-face-detector/releases/tag/v0.0.1) are the pretrained models.\n(They will be automatically downloaded when you use them.)\n\n## Demo (using [Gradio](https://github.com/gradio-app/gradio))\n[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-orange)](https://huggingface.co/spaces/hysts/anime-face-detector)\n\n### Run locally\n```bash\npip install gradio\ngit clone https://github.com/hysts/anime-face-detector\ncd anime-face-detector\n\npython demo_gradio.py\n```\n\n## Citation\nIf you find this repo useful for your research, please consider citing it:\n```bibtex\n@misc{anime-face-detector,\n  author = {hysts},\n  title = {Anime Face Detector},\n  year = {2021},\n  howpublished = {\\url{https://github.com/hysts/anime-face-detector}}\n}\n```\n\n## Links\n### General\n- https://github.com/open-mmlab/mmdetection\n- https://github.com/open-mmlab/mmpose\n\n### Anime face detection\n- https://github.com/zymk9/yolov5_anime [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-orange)](https://huggingface.co/spaces/hysts/yolov5_anime)\n- https://github.com/qhgz2013/anime-face-detector\n- https://github.com/cheese-roll/light-anime-face-detector\n- https://github.com/nagadomi/lbpcascade_animeface [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-orange)](https://huggingface.co/spaces/hysts/lbpcascade_animeface)\n\n### Anime face landmark detection\n- https://github.com/kanosawa/anime_face_landmark_detection [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-orange)](https://huggingface.co/spaces/hysts/anime_face_landmark_detection)\n\n### Others\n- https://www.gwern.net/Faces\n- https://thisanimedoesnotexist.ai\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhysts%2Fanime-face-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhysts%2Fanime-face-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhysts%2Fanime-face-detector/lists"}