anime-face-detector-yolov3
An anime face detector (YOLOv3 with a Darknet-53 backbone), one of the pretrained models of hysts/anime-face-detector. It detects near-frontal anime faces and is used together with anime-face-detector-hrnetv2 for 28-point facial landmark estimation. It is the default detector of the package; for slightly higher accuracy at a higher compute cost, see the Faster R-CNN variant below.
The model was trained by hysts in 2021 using mmdetection. model.safetensors contains the exact weights of the original release (mmdet_anime-face_yolov3.pth, v0.0.1); the source file name and its sha256 are recorded in the safetensors metadata. Since v0.1.0 the anime-face-detector package runs this model in plain PyTorch, without the mmdetection runtime.
Usage
pip install anime-face-detector
import cv2
from anime_face_detector import create_detector
detector = create_detector("yolov3")
image = cv2.imread("input.jpg")
preds = detector(image) # bounding boxes and 28 landmark points per face
License
The weights are released under the MIT License, like the code in the GitHub repository. They were trained by hysts; as stated in the license, they are provided as is, without warranty of any kind, including with respect to the provenance of the training data.
Related models
- hysts/anime-face-detector-faster-rcnn: a more accurate, heavier face detector
- hysts/anime-face-detector-hrnetv2: the facial landmark model