CenterFace(size of 7.3MB) is a practical anchor-free face detection and alignment method for edge devices.

Overview

CenterFace

Introduce

CenterFace(size of 7.3MB) is a practical anchor-free face detection and alignment method for edge devices.

image

Recent Update

  • 2019.09.13 CenterFace is released.

Environment

  • OpenCV 4.1.0
  • Numpy
  • Python3.6+

Accuracy

  • Results on val set of WIDER FACE:
Model Version Easy Set Medium Set Hard Set
FaceBoxes 0.840 0.766 0.395
FaceBoxes3.2× 0.798 0.802 0.715
RetinaFace-mnet 0.896 0.871 0.681
LFFD-v1 0.910 0.881 0.780
LFFD-v2 0.837 0.835 0.729
CenterFace 0.935 0.924 0.875
CenterFace-small 0.931 0.924 0.870
  • Results on test set of WIDER FACE:
Model Version Easy Set Medium Set Hard Set
FaceBoxes 0.839 0.763 0.396
FaceBoxes3.2× 0.791 0.794 0.715
RetinaFace-mnet 0.896 0.871 0.681
LFFD-v1 0.910 0.881 0.780
LFFD-v2 0.837 0.835 0.729
CenterFace 0.932 0.921 0.873
  • RetinaFace-mnet is short for RetinaFace-MobileNet-0.25 from excellent work insightface.
  • LFFD-v1 is from prefect work LFFD.
  • CenterFace/CenterFace-small evaluation is under MULTI-SCALE, FLIP.
  • For SIO(Single Inference on the Original) evaluation schema, CenterFace also produces 92.2% (Easy), 91.1% (Medium) and 78.2% (Hard) for validation set.
  • Results on FDDB:
Model Version Disc ROC curves score
RetinaFace-mnet [email protected]
LFFD-v1 [email protected]
LFFD-v2 [email protected]
CenterFace [email protected]
CenterFace-small [email protected]

Inference Latency

  • Latency on NVIDIA RTX 2080TI:
Resolution-> 640×480 1280×720(704) 1920×1080(1056)
RetinaFace-mnet 5.40ms 6.31ms 10.26ms
LFFD-v1 7.24ms 14.58ms 28.36ms
CenterFace 5.5ms 6.4ms 8.7ms
CenterFace-small 4.4ms 5.7ms 7.3ms

Results: Face as Point

image

image

image

Discussion

Welcome to join in QQ Group(229042802) for more discussion, including but not limited to face detection, face anti-spoofing and so on.

Author

Citation

If you benefit from our work in your research and product, please consider to cite the following related papers:

@inproceedings{CenterFace,
title={CenterFace: Joint Face Detection and Alignment Using Face as Point},
author={Xu, Yuanyuan and Yan, Wan and Sun, Haixin and Yang, Genke and Luo, Jiliang},
booktitle={arXiv:1911.03599},
year={2019}
}
Issues
  • why not tvm or onnxruntime

    why not tvm or onnxruntime

    仓库里的python代码是基于cv2.dnn的,我尝试着去用onnxruntime,但模型代码没有给,有些参数不知道设,如果作者有时间的话,可以放下tvm和onnxruntime的推理demo

    opened by DCC-lzhy 11
  • 测试速度-420ms/张

    测试速度-420ms/张

    您好,我在macos上,从摄像头读取图片测试,时间大约是420ms。这个速度正常吗。 image

    opened by zhanglaplace 10
  • The Tensorrt inference does not release memory after execution

    The Tensorrt inference does not release memory after execution

    When using tensorrt model for video, it keeps eating more and more GPU memory until causing OOM.

    [TensorRT] ERROR: ../rtSafe/safeRuntime.cpp (25) - Cuda Error in allocate: 2 (out of memory)
    [TensorRT] ERROR: FAILED_ALLOCATION: std::exception
    
    opened by xxxpsyduck 10
  • Threshold

    Threshold

    Your demos are very impressive. What scoreThresh and nmsThresh did you set to create these? The default ones?

    opened by doublex 6
  • Bad Accuracy..Real world accuracy is half

    Bad Accuracy..Real world accuracy is half

    I have tested this model on my own 5000 images and the accuracy seems to be half of the claimed.

    5 faces detected in the following is a disaster. https://ibb.co/PCL0qNv

    opened by dexception 5
  • prj-tensorrt demo.py reshape issue

    prj-tensorrt demo.py reshape issue

    Hi, I am using this repo's code together with the zhihu tutorial provided here. https://zhuanlan.zhihu.com/p/106774468 Thank you for opensource the code in the first hand and I have some problem. Because I am using tensorrt 7.0.0.11, I use the given onnx model to regenerate the trt file. However, when I run the demo.py code provided in the prj-tensorrt folder, I get the following error ValueError: cannot reshape array of size 4177920 into shape (1,1,120,160) This error remains there after I change the onnx model to onnx_1920_1080 follow the code from the zhihu tutorial, only the size change from some other value to this 4177920. do you have any suggestion on how to solve this reshape value error? Thanks in advance.

    opened by Harryqu123 4
  • Add GPU Implementation | To Test Speed

    Add GPU Implementation | To Test Speed

    Good work but it is taking 7 CPU cores on a live camera. I would like to see the performance difference if this application was using GPU.

    opened by ashuezy 3
  • centerface.onnx model

    centerface.onnx model

    Good job!And the centerface.onnx contained face alignment??

    opened by wanjinchang 3
  • FDDB结果很差?

    FDDB结果很差?

    mnn模型在FDDB上表现很差,测试方法有问题? 可以分享一下你的评测结果吗?

    opened by sharepointer 3
  • Update centerface.py

    Update centerface.py

    you will find the following errors that the gpu‘s’ memory would be exhausted if you run the code in a loop so i try amend the code to make sure the program is normal

    我把初始化的一部分代码提出来了,以防循环执行该代码时,发生显存溢出的问题

    opened by sxj731533730 0
  • Slow non max suppression

    Slow non max suppression

    Hi,

    Thanks for the great work.

    Unfortunately nonmaxsuppression makes the tensorrt implementation so slow.

    Thanks

    opened by Source82 0
  • Window10 onnx->tensorrt centerface

    Window10 onnx->tensorrt centerface

    image

    look https://github.com/ttanzhiqiang/onnx_tensorrt_project

    opened by ttanzhiqiang 0
  • How to get Landmarks Confidence

    How to get Landmarks Confidence

    Thanks for your work

    Any insights on how to use the decode or the heatmaps to get landmarks/keypoints confidence/visibility scores?

    Thanks.

    opened by avn3r 0
  • Test on widerface but stop at the third image.

    Test on widerface but stop at the third image.

    I run prj-python/demo.py to test on widerface, but the script stop after finished the third image. Could you please tell me the reason?

    opened by Watebear 3
  • 请问 关于pytorch的代码有计划开源么,谢谢

    请问 关于pytorch的代码有计划开源么,谢谢

    请问 关于pytorch的代码有计划开源么,谢谢

    opened by ltm920716 0
  • Don't support type Convolution on GPU, I need help?

    Don't support type Convolution on GPU, I need help?

    Hello, I am using your centerface. In wind10 Environment. MNN MODEL for testing, MNN corresponding cuda version 11.1, cudn8.0.4, running very slow, as shown below: Don't support type ConvolutionDepthwise, 504 Don't support type Convolution, 507 Don't support type Convolution, 509 Don't support type Deconvolution, 512 Don't support type Convolution, 515 Don't support type Raster Don't support type Raster Don't support type BinaryOp, 518 Don't support type Raster Don't support type Deconvolution, 519 Don't support type Convolution, 522 Don't support type Raster Don't support type Raster Don't support type BinaryOp, 525 Don't support type Raster Don't support type Deconvolution, 526 Don't support type Convolution, 529 Don't support type Raster Don't support type Raster Don't support type BinaryOp, 532 Don't support type Raster Don't support type Convolution, 533 Don't support type Convolution, 536 Don't support type Sigmoid, 537 Don't support type Convolution, 538 Don't support type Convolution, 539 Don't support type Convolution, 540; Can you tell me how to modify centerface.cpp C++ code?

    opened by w136111526 0
  • landmark的groundtruth问题

    landmark的groundtruth问题

    请问, landmark公式中的cx,cy, boxw,boxh,是降采样之后的中心点坐标和边界框宽高吗

    opened by geoffzhang 0
  • How to use it when image orientation is portrait?

    How to use it when image orientation is portrait?

    Dear @ywlife,

    Thanks for the awesome work. I have question related with input format. The model seems to assume images in landscape mode (generically image width larger than image height).

    What modification should be done for it to work in portrait mode (upright orientation with image height larger than image width)?

    Cheers, M

    opened by mlourencoeb 0
Owner
StarClouds
StarClouds
img2pose: Face Alignment and Detection via 6DoF, Face Pose Estimation

img2pose: Face Alignment and Detection via 6DoF, Face Pose Estimation Figure 1: We estimate the 6DoF rigid transformation of a 3D face (rendered in si

Vítor Albiero 415 Jan 18, 2022
🍅🍅🍅YOLOv5-Lite: lighter, faster and easier to deploy. Evolved from yolov5 and the size of model is only 1.7M (int8) and 3.3M (fp16). It can reach 10+ FPS on the Raspberry Pi 4B when the input size is 320×320~

YOLOv5-Lite:lighter, faster and easier to deploy Perform a series of ablation experiments on yolov5 to make it lighter (smaller Flops, lower memory, a

pogg 834 Jan 14, 2022
[TIP 2021] SADRNet: Self-Aligned Dual Face Regression Networks for Robust 3D Dense Face Alignment and Reconstruction

SADRNet Paper link: SADRNet: Self-Aligned Dual Face Regression Networks for Robust 3D Dense Face Alignment and Reconstruction Requirements python

Multimedia Computing Group, Nanjing University 58 Jan 11, 2022
Ultra-lightweight human body posture key point CNN model. ModelSize:2.3MB HUAWEI P40 NCNN benchmark: 6ms/img,

Ultralight-SimplePose Support NCNN mobile terminal deployment Based on MXNET(>=1.5.1) GLUON(>=0.7.0) framework Top-down strategy: The input image is t

null 166 Jan 7, 2022
DAFNe: A One-Stage Anchor-Free Deep Model for Oriented Object Detection

DAFNe: A One-Stage Anchor-Free Deep Model for Oriented Object Detection Code for our Paper DAFNe: A One-Stage Anchor-Free Deep Model for Oriented Obje

Steven Lang 33 Dec 13, 2021
Face Detection and Alignment using Multi-task Cascaded Convolutional Networks (MTCNN)

Face-Detection-with-MTCNN Face detection is a computer vision problem that involves finding faces in photos. It is a trivial problem for humans to sol

Chetan Hirapara 1 Nov 1, 2021
A DNN inference latency prediction toolkit for accurately modeling and predicting the latency on diverse edge devices.

Note: This is an alpha (preview) version which is still under refining. nn-Meter is a novel and efficient system to accurately predict the inference l

Microsoft 141 Jan 22, 2022
Edge-oriented Convolution Block for Real-time Super Resolution on Mobile Devices, ACM Multimedia 2021

Codes for ECBSR Edge-oriented Convolution Block for Real-time Super Resolution on Mobile Devices Xindong Zhang, Hui Zeng, Lei Zhang ACM Multimedia 202

xindong zhang 154 Jan 20, 2022
A high-performance anchor-free YOLO. Exceeding yolov3~v5 with ONNX, TensorRT, NCNN, and Openvino supported.

YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and industrial communities. For more details, please refer to our report on Arxiv.

null 5.5k Jan 22, 2022
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with ONNX, TensorRT, ncnn, and OpenVINO supported.

Introduction YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and ind

null 5.5k Jan 20, 2022
Code for CVPR 2021 paper: Anchor-Free Person Search

Introduction This is the implementationn for Anchor-Free Person Search in CVPR2021 License This project is released under the Apache 2.0 license. Inst

null 137 Jan 19, 2022
Code for CVPR2021 paper "Learning Salient Boundary Feature for Anchor-free Temporal Action Localization"

AFSD: Learning Salient Boundary Feature for Anchor-free Temporal Action Localization This is an official implementation in PyTorch of AFSD. Our paper

Tencent YouTu Research 98 Jan 11, 2022
The official implementation of the CVPR 2021 paper FAPIS: a Few-shot Anchor-free Part-based Instance Segmenter

FAPIS The official implementation of the CVPR 2021 paper FAPIS: a Few-shot Anchor-free Part-based Instance Segmenter Introduction This repo is primari

Khoi Nguyen 2 Oct 16, 2021
Yoloxkeypointsegment - An anchor-free version of YOLO, with a simpler design but better performance

Introduction 关键点版本:已完成 全景分割版本:已完成 实例分割版本:已完成 YOLOX is an anchor-free version of

null 6 Jan 18, 2022
A Transformer-Based Feature Segmentation and Region Alignment Method For UAV-View Geo-Localization

University1652-Baseline [Paper] [Slide] [Explore Drone-view Data] [Explore Satellite-view Data] [Explore Street-view Data] [Video Sample] [中文介绍] This

Zhedong Zheng 283 Jan 13, 2022
:fire: 2D and 3D Face alignment library build using pytorch

Face Recognition Detect facial landmarks from Python using the world's most accurate face alignment network, capable of detecting points in both 2D an

Adrian Bulat 5.5k Jan 14, 2022
The PyTorch improved version of TPAMI 2017 paper: Face Alignment in Full Pose Range: A 3D Total Solution.

Face Alignment in Full Pose Range: A 3D Total Solution By Jianzhu Guo. [Updates] 2020.8.30: The pre-trained model and code of ECCV-20 are made public

Jianzhu Guo 3.2k Jan 11, 2022
Face Library is an open source package for accurate and real-time face detection and recognition

Face Library Face Library is an open source package for accurate and real-time face detection and recognition. The package is built over OpenCV and us

null 51 Jan 19, 2022
Official implementation of "Dynamic Anchor Learning for Arbitrary-Oriented Object Detection" (AAAI2021).

DAL This project hosts the official implementation for our AAAI 2021 paper: Dynamic Anchor Learning for Arbitrary-Oriented Object Detection [arxiv] [c

ming71 196 Jan 11, 2022