EQFace: An implementation of EQFace: A Simple Explicit Quality Network for Face Recognition

Overview

EQFace: A Simple Explicit Quality Network for Face Recognition

The first face recognition network that generates explicit face quality online. It enables a lot of applications where face quality is used.

Face Quality Result

License

The code of EQFace is released under the MIT License. There is no limitation for both academic and commercial usage.

Requirements

  • Pytorch 1.8.1

Training Data

  1. Download MS1Mv2
  2. Extract image files by rec2image.py
  3. Generate the training file list
cd dataset
python generate_file_list.py

Test

  1. Download pretrained model
  2. run test_quality.py
python test_quality.py --backbone backbone.pth --quality quality.path --file test_faces

Training

Training pipeline

  1. Step 1: set config.py, then run python train_feature.py
    ...
    BACKBONE_RESUME_ROOT = ''
    HEAD_RESUME_ROOT = ''
    TRAIN_FILES = './dataset/face_train_ms1mv2.txt'
    BACKBONE_LR = 0.05
    PRETRAINED_BACKBONE = ''
    PRETRAINED_QUALITY = ''
    ...
  1. Step 2: set config.py, then run python train_quality.py
    ...
    BACKBONE_RESUME_ROOT = './backbone_resume.pth'
    HEAD_RESUME_ROOT = './head_resume.pth'
    TRAIN_FILES = './dataset/face_train_ms1mv2.txt'
    BACKBONE_LR = 0.05
    PRETRAINED_BACKBONE = ''
    PRETRAINED_QUALITY = ''
    ...
  1. Step 3: set config.py, then run python train_feature.py
    ...
    BACKBONE_RESUME_ROOT = ''
    HEAD_RESUME_ROOT = ''
    TRAIN_FILES = './dataset/face_train_ms1mv2.txt'
    BACKBONE_LR = 0.05
    PRETRAINED_BACKBONE = ''
    PRETRAINED_QUALITY = ''

    PRETRAINED_BACKBONE = 'pretrained_backbone_resume.pth'
    PRETRAINED_QUALITY = 'pretrained_qulity_resume.pth'
    ...

Performance Benchmark

Face verification on still image and TF video datasets 1:1 verification on IJB-B and IJB-C datasets 1:N identification on IJB-B and IJB-C datasets

Citation

  • If you think this work is useful for you, please cite

    @inproceedings{EQFace,
    title = {EQFace: A Simple Explicit Quality Network for Face Recognition},
    author = {Liu, Rushuai and Tan, Weijun},
    booktitle = {CVPRW},
    year = {2021}
    }
    
Comments
  • 训练自己的数据集时遇到了问题

    训练自己的数据集时遇到了问题

    File "train_quality.py", line 179, in train() File "train_quality.py", line 127, in train confidence = QUALITY(fc) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, **kwargs) File "/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 155, in forward outputs = self.parallel_apply(replicas, inputs, kwargs) File "/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 165, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in parallel_apply output.reraise() File "/opt/conda/lib/python3.6/site-packages/torch/_utils.py", line 395, in reraise raise self.exc_type(msg) RuntimeError: Caught RuntimeError in replica 0 on device 0.

    File "/opt/conda/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker output = module(*input, **kwargs) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, **kwargs) File "/tmp/facequality/models/model_resnet.py", line 110, in forward x = self.qualtiy(x) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, **kwargs) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/container.py", line 117, in forward input = module(input) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, **kwargs) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 91, in forward return F.linear(input, self.weight, self.bias) File "/opt/conda/lib/python3.6/site-packages/torch/nn/functional.py", line 1676, in linear output = input.matmul(weight.t()) RuntimeError: mat1 dim 1 must match mat2 dim 0

    opened by dingweichao123 2
  • License?

    License?

    Thanks for sharing this very interesting work. Right now, no license has been included in the repo, meaning all rights are reserved (https://opensource.stackexchange.com/questions/1720/what-can-i-assume-if-a-publicly-published-project-has-no-license), and it cannot be used by others.

    Could you perhaps consider including some form of open-source license?

    opened by yhenon 2
  • No Checkpoint Found at 'quality.path' Please Have a Check or Continue to Train from Scratch

    No Checkpoint Found at 'quality.path' Please Have a Check or Continue to Train from Scratch

    Hi, I've downloaded your pretrained model from google drive, but when i run test_quality.py, it returns mentioned error. what should I do to solve it? should I train it from scratch? thanks in advance

    opened by hamid-mp 1
  • Learning rate scheduler doesn't match as stated in the paper.

    Learning rate scheduler doesn't match as stated in the paper.

    In the paper, you said that it would be decayed by 10 after 30, 60, 90 epoch for total of 100 epochs. But in the code, I saw that you were using CosineAnnealingRate, which doesn't have the effect as the above. And also, I saw that u pass T_max hard-code 10 epochs (10 * len(train_loader)) -> is this intentional? Cause this would make the LR varies in a cyclical way. Thank you for reading and answering.

    opened by v-trungdt21 0
  • About training in step 2 anhd step 3

    About training in step 2 anhd step 3

    I see the config in step 2 is: ... BACKBONE_RESUME_ROOT = './backbone_resume.pth' HEAD_RESUME_ROOT = './head_resume.pth' TRAIN_FILES = './dataset/face_train_ms1mv2.txt' BACKBONE_LR = 0.05 PRETRAINED_BACKBONE = '' PRETRAINED_QUALITY = '' ... So where can i get the backbone_resume.pth and head_resume.pth And where can i get pretrained_backbone_resume.pth and pretrained_qulity_resume.pth in step 3? ... BACKBONE_RESUME_ROOT = '' HEAD_RESUME_ROOT = '' TRAIN_FILES = './dataset/face_train_ms1mv2.txt' BACKBONE_LR = 0.05 PRETRAINED_BACKBONE = '' PRETRAINED_QUALITY = '' PRETRAINED_BACKBONE = 'pretrained_backbone_resume.pth' PRETRAINED_QUALITY = 'pretrained_qulity_resume.pth' ...

    opened by huytuong010101 0
  • How to train with another backbone?

    How to train with another backbone?

    Thank you for perfect repository <3 I see that you provided code to training model Arcface using Resnet backbone? So I want to train with MobileFacenet backbone. Can you help me resolve this problem? Thank you <3

    opened by huytuong010101 0
  • about Implementation

    about Implementation

    Hello,I am very interested in your work.and I want to ask some questions, why is the implementation of the code inconsistent with the description in the paper, such as training parameters, learning rate strategy, etc.

    opened by WWWJL 7
Owner
DeepCam Shenzhen
DeepCam Shenzhen
When Age-Invariant Face Recognition Meets Face Age Synthesis: A Multi-Task Learning Framework (CVPR 2021 oral)

MTLFace This repository contains the PyTorch implementation and the dataset of the paper: When Age-Invariant Face Recognition Meets Face Age Synthesis

Hzzone 120 Jan 5, 2023
textspotter - An End-to-End TextSpotter with Explicit Alignment and Attention

An End-to-End TextSpotter with Explicit Alignment and Attention This is initially described in our CVPR 2018 paper. Getting Started Installation Clone

Tong He 323 Nov 10, 2022
Polaris is a Face recognition attendance system .

Support Me ?? About Polaris ?? Polaris is a system based on facial recognition with a futuristic GUI design, Can easily find people informations store

XN3UR0N 215 Dec 26, 2022
Isearch (OSINT) 🔎 Face recognition reverse image search on Instagram profile feed photos.

isearch is an OSINT tool on Instagram. Offers a face recognition reverse image search on Instagram profile feed photos.

Malek salem 20 Oct 25, 2022
A facial recognition device is a device that takes an image or a video of a human face and compares it to another image faces in a database.

A facial recognition device is a device that takes an image or a video of a human face and compares it to another image faces in a database. The structure, shape and proportions of the faces are compared during the face recognition steps.

Pavankumar Khot 4 Mar 19, 2022
📷 Face Recognition using Haar-Cascade Classifier, OpenCV, and Python

Face-Recognition-System Face Recognition using Haar-Cascade Classifier, OpenCV and Python. This project is based on face detection and face recognitio

null 1 Jan 10, 2022
Opencv face recognition desktop application

Opencv-Face-Recognition Opencv face recognition desktop application Program developed by Gustavo Wydler Azuaga - 2021-11-19 Screenshots of the program

Gus 1 Nov 19, 2021
nofacedb/faceprocessor is a face recognition engine for NoFaceDB program complex.

faceprocessor nofacedb/faceprocessor is a face recognition engine for NoFaceDB program complex. Tech faceprocessor uses a number of open source projec

NoFaceDB 3 Sep 6, 2021
A curated list of resources for text detection/recognition (optical character recognition ) with deep learning methods.

awesome-deep-text-detection-recognition A curated list of awesome deep learning based papers on text detection and recognition. Text Detection Papers

null 2.4k Jan 8, 2023
Text recognition (optical character recognition) with deep learning methods.

What Is Wrong With Scene Text Recognition Model Comparisons? Dataset and Model Analysis | paper | training and evaluation data | failure cases and cle

Clova AI Research 3.2k Jan 4, 2023
Sign Language Recognition service utilizing a deep learning model with Long Short-Term Memory to perform sign language recognition.

Sign Language Recognition Service This is a Sign Language Recognition service utilizing a deep learning model with Long Short-Term Memory to perform s

Martin Lønne 1 Jan 8, 2022
A simple python program to record security cam footage by detecting a face and body of a person in the frame.

SecurityCam A simple python program to record security cam footage by detecting a face and body of a person in the frame. This code was created by me,

null 1 Nov 8, 2021
Pre-Recognize Library - library with algorithms for improving OCR quality.

PRLib - Pre-Recognition Library. The main aim of the library - prepare image for recogntion. Image processing can really help to improve recognition q

Alex 80 Dec 30, 2022
ERQA - Edge Restoration Quality Assessment

ERQA - a full-reference quality metric designed to analyze how good image and video restoration methods (SR, deblurring, denoising, etc) are restoring real details.

MSU Video Group 27 Dec 17, 2022
A python screen recorder for low-end computers, provides high quality video output.

RecorderX - v1.0 A screen recorder made in Python with the help of OpenCv, it has ability to record your screen in high quality. No matter what your P

Priyanshu Jindal 4 Nov 10, 2021
MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition

MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition Python 2.7 Python 3.6 MORAN is a network with rectification mechanism for

Canjie Luo 595 Dec 27, 2022
Handwriting Recognition System based on a deep Convolutional Recurrent Neural Network architecture

Handwriting Recognition System This repository is the Tensorflow implementation of the Handwriting Recognition System described in Handwriting Recogni

Edgard Chammas 346 Jan 7, 2023
Code for the paper STN-OCR: A single Neural Network for Text Detection and Text Recognition

STN-OCR: A single Neural Network for Text Detection and Text Recognition This repository contains the code for the paper: STN-OCR: A single Neural Net

Christian Bartz 496 Jan 5, 2023
Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. This Neural Network (NN) model recognizes the text contained in the images of segmented words.

Handwritten-Text-Recognition Handwritten Text Recognition (HTR) system implemented with TensorFlow (TF) and trained on the IAM off-line HTR dataset. T

null 27 Jan 8, 2023