Lbpcascade_animeface

A Face detector for anime/manga using OpenCV
Alternatives To Lbpcascade_animeface
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Openpose27,743
a month ago269otherC++
OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
Opencv4nodejs4,72962465 months ago120May 13, 2020290mitC++
Nodejs bindings to OpenCV 3 and OpenCV 4
Node Opencv4,275307638 months ago31March 10, 2020126mitC++
OpenCV Bindings for node.js
Pigo4,089234 months ago25October 04, 20222mitGo
Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go.
Face Mask Detection1,355
10 months ago20mitJupyter Notebook
Face Mask Detection system based on computer vision and deep learning using OpenCV and Tensorflow/Keras
Lbpcascade_animeface1,223
5 years ago4
A Face detector for anime/manga using OpenCV
Head Pose Estimation1,024
4 months ago25mitPython
Realtime human head pose estimation with ONNXRuntime and OpenCV.
Facetracker931
3 years ago8mitC++
Real time deformable face tracking in C++ with OpenCV 3.
Emotion Detection907
6 months ago12mitPython
Real-time Facial Emotion Detection using deep learning
Real_time_face_recognition881
7 years ago14Python
(WARNING: This repository is NO LONGER maintained ) Real time face detection and recognition base on opencv/tensorflow/mtcnn/facenet
Alternatives To Lbpcascade_animeface
Select To Compare


Alternative Project Comparisons
Readme

lbpcascade_animeface

The face detector for anime/manga using OpenCV.

Original release since 2011 at OpenCVによるアニメ顔検出ならlbpcascade_animeface.xml (in Japanese)

Usage

Download and place the cascade file into your project directory.

wget https://raw.githubusercontent.com/nagadomi/lbpcascade_animeface/master/lbpcascade_animeface.xml

Python Example

import cv2
import sys
import os.path

def detect(filename, cascade_file = "../lbpcascade_animeface.xml"):
    if not os.path.isfile(cascade_file):
        raise RuntimeError("%s: not found" % cascade_file)

    cascade = cv2.CascadeClassifier(cascade_file)
    image = cv2.imread(filename, cv2.IMREAD_COLOR)
    gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
    gray = cv2.equalizeHist(gray)
    
    faces = cascade.detectMultiScale(gray,
                                     # detector options
                                     scaleFactor = 1.1,
                                     minNeighbors = 5,
                                     minSize = (24, 24))
    for (x, y, w, h) in faces:
        cv2.rectangle(image, (x, y), (x + w, y + h), (0, 0, 255), 2)

    cv2.imshow("AnimeFaceDetect", image)
    cv2.waitKey(0)
    cv2.imwrite("out.png", image)

if len(sys.argv) != 2:
    sys.stderr.write("usage: detect.py <filename>\n")
    sys.exit(-1)
    
detect(sys.argv[1])

Run

python detect.py imas.jpg

result

Note

I am providing similar project at nagadomi/animeface-2009. animeface-2009 is my original work that was made before libcascade_animeface. The detection accuracy is higher than this project. However, installation of that is a bit complicated. Also I am providing a face cropping script using animeface-2009.

Popular Opencv Projects
Popular Face Projects
Popular Machine Learning Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Opencv
Face
Anime
Face Detector
Manga