All Projects → 1996scarlet → Faster Mobile Retinaface

1996scarlet / Faster Mobile Retinaface

Licence: gpl-3.0
[CVPR 2020] Reimplementation of RetinaFace, faster and stronger.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Faster Mobile Retinaface

Mobileface
A face recognition solution on mobile device.
Stars: ✭ 669 (+471.79%)
Mutual labels:  face-detection, mobilenet
Proctoring Ai
Creating a software for automatic monitoring in online proctoring
Stars: ✭ 155 (+32.48%)
Mutual labels:  face-detection, mobilenet
Caire
Content aware image resize library
Stars: ✭ 9,783 (+8261.54%)
Mutual labels:  face-detection
Deepface
Face analysis mainly based on Caffe. At this time, face analysis tasks like detection, alignment and recognition have been done.
Stars: ✭ 1,465 (+1152.14%)
Mutual labels:  face-detection
A Convolutional Neural Network Cascade For Face Detection
TensorFlow implementation of "A Convolutional Neural Network Cascade for Face Detection", CVPR 2015
Stars: ✭ 106 (-9.4%)
Mutual labels:  face-detection
1zlab face track robot
二自由度云台实现人脸追踪。 首先是使用一款名字叫做IP摄像头的APP 采集手机摄像头的图像,在手机上建立一个视频流服务器。在局域网下,PC通过IP还有端口号获取图像。使用OpenCV的人脸检测的API获取人脸在画面中的位置,根据人脸位置距离画面中心的x轴与y轴的偏移量(offset) ,通过P比例控制(PID控制中最简单的一种)控制二自由度云台上臂与下臂的旋转角度,将角度信息通过串口通信UART发送给ESP32单片机(不限于ESP32,STM32,Arduino都可以)解析执行对应的操作,从而使得人脸尽可能处在画面的正中间。
Stars: ✭ 103 (-11.97%)
Mutual labels:  face-detection
Face recognition
The world's simplest facial recognition api for Python and the command line
Stars: ✭ 42,549 (+36266.67%)
Mutual labels:  face-detection
Agender
Real-time estimation of gender and age
Stars: ✭ 95 (-18.8%)
Mutual labels:  face-detection
Sightseq
Computer vision tools for fairseq, containing PyTorch implementation of text recognition and object detection
Stars: ✭ 116 (-0.85%)
Mutual labels:  mobilenet
Tensorflow Mtcnn
C++ and python Inference only for MTCNN face detector on Tensorflow. Based on davidsandberg's facenet project:
Stars: ✭ 106 (-9.4%)
Mutual labels:  face-detection
Mobilenet Yolo
MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB🔥🔥🔥
Stars: ✭ 1,566 (+1238.46%)
Mutual labels:  face-detection
Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (-9.4%)
Mutual labels:  face-detection
Tiny Faces Pytorch
Finding Tiny Faces in PyTorch
Stars: ✭ 105 (-10.26%)
Mutual labels:  face-detection
Sphereface
Implementation for <SphereFace: Deep Hypersphere Embedding for Face Recognition> in CVPR'17.
Stars: ✭ 1,483 (+1167.52%)
Mutual labels:  face-detection
Clapper
A GNOME media player built using GJS with GTK4 toolkit and powered by GStreamer with OpenGL rendering.
Stars: ✭ 103 (-11.97%)
Mutual labels:  gstreamer
Deepgaze
Computer Vision library for human-computer interaction. It implements Head Pose and Gaze Direction Estimation Using Convolutional Neural Networks, Skin Detection through Backprojection, Motion Detection and Tracking, Saliency Map.
Stars: ✭ 1,552 (+1226.5%)
Mutual labels:  face-detection
Awslambdaface
Perform deep neural network based face detection and recognition in the cloud (via AWS lambda) with zero model configuration or tuning.
Stars: ✭ 98 (-16.24%)
Mutual labels:  face-detection
Ghostnet
CV backbones including GhostNet, TinyNet and TNT, developed by Huawei Noah's Ark Lab.
Stars: ✭ 1,744 (+1390.6%)
Mutual labels:  mobilenet
Sod
An Embedded Computer Vision & Machine Learning Library (CPU Optimized & IoT Capable)
Stars: ✭ 1,460 (+1147.86%)
Mutual labels:  face-detection
Tenginekit
TengineKit - Free, Fast, Easy, Real-Time Face Detection & Face Landmarks & Face Attributes & Hand Detection & Hand Landmarks & Body Detection & Body Landmarks & Iris Landmarks & Yolov5 SDK On Mobile.
Stars: ✭ 2,103 (+1697.44%)
Mutual labels:  face-detection

Face Detection @ 500-1000 FPS

Image of PR

Language grade: Python License CVPR

100% Python3 reimplementation of RetinaFace, a solid single-shot face localisation framework in CVPR 2020.

  • Replaced CUDA based anchor generator functions with NumPy APIs.
  • Stored runtime anchors via dict to avoid duplicate counting.
  • Optimized NMS algorithm through vector calculation methods.
  • Reduced FPN layers and anchor density for middle-close range detection.
  • Used low-level Mxnet APIs to speed up the inference process.

Getting Start

Requirements

  • Install GStreamer for reading videos (Optional)
  • Mxnet >= 1.5.0 (preferably CUDA based package)
  • Python >= 3.6
  • opencv-python

While not required, for optimal performance, it is highly recommended to run the code using a CUDA enabled GPU.

Running for Video Files

gst-launch-1.0 -q filesrc location=$YOUR_FILE_PATH !\
  qtdemux ! h264parse ! avdec_h264 !\
  video/x-raw, width=640, height=480 ! videoconvert !\
  video/x-raw, format=BGR ! fdsink | python3 face_detector.py

Real-Time Capturing via Webcam

gst-launch-1.0 -q v4l2src device=/dev/video0 !\
  video/x-raw, width=640, height=480 ! videoconvert !\
  video/x-raw, format=BGR ! fdsink | python3 face_detector.py

Some Tips

  • Be Careful About ! and |
  • Decoding the H.264 (or other format) stream using CPU can cost much. I'd suggest using your NVIDIA GPU for decoding acceleration. See Issues#5 and nvbugs for more details.
  • For Jetson-Nano, following Install MXNet on a Jetson to prepare your envoriment.

Methods and Experiments

For middle-close range face detection, appropriately removing FPN layers and reducing the density of anchors could count-down the overall computational complexity. In addition, low-level APIs are used at preprocessing stage to bypass unnecessary format checks. While inferencing, runtime anchors are cached to avoid repeat calculations. More over, considerable speeding up can be obtained through vector acceleration and NMS algorithm improvement at post-processing stage.

Experiments have been carried out via GTX 1660Ti with CUDA 10.2 on KDE-Ubuntu 19.10.

Scale RetinaFace Faster RetinaFace Speed Up
0.1 2.854ms 2.155ms 32%
0.4 3.481ms 2.916ms 19%
1.0 5.743ms 5.413ms 6.1%
2.0 22.351ms 20.599ms 8.5%

Results of several scale factors at VGA resolution show that our method can speed up by 32%. As real resolution increases, the proportion of feature extraction time spent in the measurement process will increase significantly, which causes our acceleration effect to be diluted.

Plantform Inference Postprocess Throughput Capacity
9750HQ+1660TI 0.9ms 1.5ms 500~1000fps
Jetson-Nano 4.6ms 11.4ms 80~200fps

Theoretically speaking, throughput capacity can reach the highest while the queue is bigger enough.

Citation

@inproceedings{deng2019retinaface,
    title={RetinaFace: Single-stage Dense Face Localisation in the Wild},
    author={Deng, Jiankang and Guo, Jia and Yuxiang, Zhou and Jinke Yu and Irene Kotsia and Zafeiriou, Stefanos},
    booktitle={arxiv},
    year={2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].