Back to paper library
Paper notesarXiv 2021CVPR 2023

CR-FIQA

A Sense of Proportion

Original paper

CR-FIQA: Face Image Quality Assessment by Learning Sample Relative Classifiability

Paper authors

Fadi Boutros · Meiling Fang · Marcel Klemt · Biying Fu · Naser Damer

Publication
CVPR 2023Conference
First submitted to arXiv
arXiv:2112.06592
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{facerecognitioncrfiqa2021,
  title = {{CR-FIQA: Face Image Quality Assessment by Learning Sample Relative Classifiability}},
  author = {Fadi Boutros and Meiling Fang and Marcel Klemt and Biying Fu and Naser Damer},
  year = {2021},
  eprint = {2112.06592},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.06592}
}
On this page

If this photo had been in the training set, how close would it have ended up to its own class center?

That is the question CR-FIQA puts to face image quality assessment (FIQA) instead. Every face in the training set has an identity label and a matching class center, and by the end of training, one angle tells you which samples got pushed right up to their center and which never made it no matter how hard they were pushed. At test time the faces belong to people the model has never seen, with no class center to compare against, so the authors train a tiny regression head that learns to guess that number from the image itself.

Fadi Boutros, Meiling Fang, Marcel Klemt, Biying Fu and Naser Damer are all at Fraunhofer IGD in Darmstadt, Germany, and Meiling Fang and Naser Damer are also at the Technical University of Darmstadt. SER-FIQ came out of the same institute two years earlier, and it is one of this paper's main comparison targets.

Defining the Problem

Quality means usefulness for recognition

FIQA outputs a score for how useful a face is to face recognition. Under the definitions of ISO/IEC 2382-37 and the NIST face recognition evaluations, this score measures utility, which is a separate matter from whether the image looks good to a human. A nicely lit, sharply focused profile looks like a high-quality photo to a person, yet a recognition system often can't do much with it.

Scores like this have two direct uses. One is to turn away images that are too poor right at the point of capture and ask the user to retake them; the other is to pick frames suitable for matching out of a video, or to give the better images more weight when fusing several of them.

The authors split the FIQA methods of the time into two kinds.

Make labels first, then learn a regression. Compute a quality score for each training image as the answer, and train a network to predict it. The labels come from all over the place: some are human ratings, some compare the face against an image of the same person that meets the ICAO passport-photo standard and use the comparison score as the quality, and some, like SDD-FIQA, measure the Wasserstein distance between the distributions of this face's comparison scores against the same person and against different people. The trouble is that quality has no ground truth, so these labels are all human-designed proxies and easily carry errors.

Infer quality from how the recognition model reacts. No quality labels are needed; just look at how the recognition network treats the face. SER-FIQ sends the image through a network with dropout switched on many times, and the less the features wobble, the higher the quality; MagFace ties the length of the feature to recognizability; PFE has the network output a variance for each face. This kind usually works better, but the authors see a weakness they all share, in that the step that turns information inside the network into a quality score is a hand-set rule that was never learned, and it isn't necessarily the best conversion.

CR-FIQA wants both. It still learns a regression, but the answer becomes a quantity that already changes on its own while the recognition model trains, so no labels have to be made separately.

Solving the Problem

How close to its own center, how far from the neighbors

The recognition part is trained as in ArcFace. The network outputs a 512-dimensional feature xix_i, the classification layer has CC weight vectors, and the jj-th one, wjw_j, serves as the class center of class jj. Features and weights are both L2-normalized first, so xi⊤wj=cos⁡θjx_i^\top w_j=\cos\theta_j, where θj\theta_j is the angle between the feature and the center of class jj.

During training, the loss pulls each sample toward its own center and pushes it away from the other centers. The authors' hypothesis is that at convergence, high-quality samples end up very close to their own center, while low-quality ones can't be pushed that close. So they first define two quantities, Eqs. (2) and (3):

CCSxi=cos⁡θyiNNCCSxi=max⁡j≠yicos⁡θj\begin{aligned} CCS_{x_i}&=\cos\theta_{y_i}\\ NNCCS_{x_i}&=\max_{j\neq y_i}\cos\theta_j \end{aligned}

CCS (class center angular similarity) is the cosine between a sample and its own class center; NNCCS (nearest negative class center angular similarity) is its cosine with the nearest "someone else's center."

CCS alone could serve as quality, but two samples both at 0.8 are in different situations depending on whether a look-alike neighbor sits nearby. So the authors combine the two into a ratio, called the certainty ratio (CR), Eq. (4):

CRxi=CCSxiNNCCSxi+(1+ϵ)CR_{x_i}=\frac{CCS_{x_i}}{NNCCS_{x_i}+(1+\epsilon)}

NNCCS ranges over [−1,1][-1,1]; adding 1+ϵ1+\epsilon puts the denominator in [ϵ,2+ϵ][\epsilon,2+\epsilon], so it is always positive, with ϵ=10−9\epsilon=10^{-9}. The larger CCS and the smaller NNCCS, the larger CR; the ideal sample has CCS approaching 1 and NNCCS approaching −1.

The paper's Fig. 1, the CR-FIQA training flowchart. On the left is the dataset, with a stack of faces for each of Class 1, Class 2 through Class C; the images pass through a CNN to get embeddings, and the embeddings go one way to the classification layer to compute the ArcFace loss L_Arc and the other way to a green quality regression layer to compute L_CR, the two losses adding up to L. The red box at the lower left is a geometric sketch: features x1 and x2 belong to class center w1, x1 has a small angle to w1 (ccs 0.92) and x2 a large one (ccs 0.32), and the box reads CR(x1) = CCS(x1) / (NNCCS(x1) + (1 + ε)). At the upper right are six CASIA-WebFace examples. The three low-CCS ones are black-and-white, cropped or blurry faces, with CCS 0.4015, 0.4650 and 0.4432 and NNCCS 0.3411, 0.3280 and 0.3395; the three high-CCS ones are clear frontal faces, with CCS 0.9510, 0.9209 and 0.9531 and NNCCS 0.3317, 0.3962 and 0.3046. Below them is a histogram, with NNCCS (orange) concentrated between 0.3 and 0.4 and CCS (blue) between 0.75 and 0.95. The lower right gives the definitions of CCS and NNCCS.
Original Fig. 1, Boutros et al., from PDF page 2, arXiv license, scholarly quotation.

Start with the six examples at the upper right, which come from a ResNet-50 trained with ArcFace on CASIA-WebFace. Of the three low-CCS faces, one is a black-and-white profile, one has half the face cropped off, and one is very blurry; the three high-CCS faces are all clear frontal faces. Let's compute the top row:

  • Low CCS: CR=0.4015/(0.3411+1)=0.299CR=0.4015/(0.3411+1)=0.299
  • High CCS: CR=0.9510/(0.3317+1)=0.714CR=0.9510/(0.3317+1)=0.714

Now the histogram below. Across the whole CASIA-WebFace training set of about 500K images, CCS concentrates between 0.75 and 0.95, while NNCCS is squeezed into a narrow band between 0.3 and 0.4. NNCCS doesn't vary much, so CR is still decided mainly by CCS, with NNCCS doing the fine-tuning. Take two faces both at CCS 0.80, whose nearest neighbors sit at 0.30 and 0.45, and their CRs come out to 0.80/1.30=0.6150.80/1.30=0.615 and 0.80/1.45=0.5520.80/1.45=0.552, roughly 10% apart.

Does CR really behave like quality?

CR can be computed on the training set; the next step is to confirm it behaves like a good quality score. The authors use the R50(CASIA) model to compute CCS, NNCCS and CR for every image in CASIA-WebFace; then they take another ResNet-100, trained on MS1MV2, to extract CASIA-WebFace features and compare all the images pairwise. Switching to a different model for feature extraction makes the recognition performance come from a model that has never seen these images.

The evaluation uses the error-versus-reject curve (ERC). Sort by quality score from low to high, throw away the worst portion of the images, and compute the verification error on what's left. The error is the FNMR (false non-match rate), the fraction of same-person pairs judged to be different people; the threshold is set at a fixed FMR (false match rate), the fraction of different-person pairs mistaken for the same person. FMR=1e-3 means one in a thousand stranger pairs may be taken for the same person. If the quality score is accurate, discarding just a few images makes FNMR drop sharply.

The paper's Fig. 2, two ERCs. The horizontal axis is the fraction of images discarded, from 0% to 80%; the vertical axis is FNMR. The three lines are CCS (red), NNCCS (blue dotted) and CR (green dashed). (a) FMR = 1e-3: all three lines start from about 0.092; CCS and CR drop to about 0.023 by 10% and then slowly fall to about 0.012 at 80%, the two lines almost overlapping; NNCCS stays between 0.085 and 0.10 throughout and even rises slightly at the end. (b) FMR = 1e-4: starting from about 0.123, CCS and CR drop to about 0.05 by 10%; CCS jumps to about 0.06 at 35% while CR is smoother, and at 80% CR is about 0.022 and CCS about 0.027; NNCCS stays between 0.105 and 0.12.
Original Fig. 2, Boutros et al., from PDF page 4, arXiv license, scholarly quotation.

At FMR=1e-3 (left plot), discarding just the 10% of images with the lowest CCS or CR takes FNMR from 0.092 down to 0.023, three quarters fewer errors. NNCCS on its own is nearly useless for sorting; its curve stays flat, since it only knows how far the nearest neighbor is, not how far its own center is.

The right plot uses a stricter threshold, and there you can see CR is steadier than CCS. CCS suddenly jumps up a notch at 35% discarded, and CR doesn't. The authors take this as evidence that the NNCCS denominator is useful.

This experiment shows that CR is a good quality score on the training set, but the training set is also the only place it can be computed.

Test images have no class center

What actually needs a score is people the model has never seen, and for them CR can't be computed. CR-FIQA's way around this is a regression layer added to the recognition network. It takes the 512-dimensional feature and outputs a number PiP_i, which during training is pushed toward the CRxiCR_{x_i} computed at that moment. At test time the classification layer is removed, and PiP_i is the quality score.

Follow one training image through. The image goes into the backbone and comes out as a 512-dimensional feature xix_i. The feature then splits into two paths.

  1. The recognition path. xix_i is normalized and its cosine with each of the CC class centers is computed, giving CC values of cos⁡θj\cos\theta_j. CCS and NNCCS are read off these, CR is computed and used as the regression target; this step passes no gradient back. The same cosines then get ArcFace's margin added on the correct class and are multiplied by the scale to compute the cross-entropy LArc\mathcal L_{Arc}.
  2. The quality path. xix_i goes through a 512→1 fully connected layer to give PiP_i, and Smooth L1 against CR gives LCR\mathcal L_{CR}.

Smooth L1 is Eq. (5), squared when the gap is below β\beta and absolute when it is above β\beta; LCR\mathcal L_{CR} is the batch average of the ℓi\ell_i below:

ℓi={0.5 di2/β∣di∣<β∣di∣−0.5 βotherwisedi=CRxi−Pi\begin{aligned} \ell_i&=\begin{cases}0.5\,d_i^2/\beta & |d_i|<\beta\\ |d_i|-0.5\,\beta & \text{otherwise}\end{cases}\\ d_i&=CR_{x_i}-P_i \end{aligned}

The authors' reasoning is that L2's gradient is too large early in training when the gaps are big, and it blows up easily on outliers, while L1's gradient doesn't shrink late in training when the gaps are small, so the loss wobbles around one value. The paper doesn't give a value for β\beta; the official code uses 0.5.

Adding the two losses gives Eq. (6):

L=LArc+λ LCR\mathcal L=\mathcal L_{Arc}+\lambda\,\mathcal L_{CR}

The size of λ\lambda comes from a very concrete consideration. At the start of training, LCR\mathcal L_{CR} is below 2 and LArc\mathcal L_{Arc} is around 45, so with λ\lambda too small the network only cares about recognition; the authors found that values above 10 don't converge, so every experiment uses λ=10\lambda=10.

The regression head's gradient flows back into the backbone, so while learning recognition, the backbone is also required to carry information in its features about "how easy this face is to separate." And the CR target itself keeps moving, since the class centers are always shifting and each step's CR is the current version.

The official implementation and a denominator

The official repo's losses.py and train_cr_fiqa.py write the process above like this. A few lines are merged below, the variable names follow the original files (including the spelling embbedings), and the comments were added for this note:

Python
# CR_FIQA_LOSS.forward: embeddings (B, 512) -> ArcFace logits and the two CR ingredients
cos_theta = torch.mm(l2_norm(embbedings, axis=1), l2_norm(self.kernel, axis=0)).clamp(-1, 1)
with torch.no_grad():                                               # the targets carry no gradient
    distmat = cos_theta[index, label.view(-1)].detach().clone()     # CCS
    max_negative_cloned = cos_theta.detach().clone()
    max_negative_cloned[index, label.view(-1)] = -1e-12             # hide the true class
    max_negative, _ = max_negative_cloned.max(dim=1)                # NNCCS
cos_theta.acos_()
cos_theta[index] += m_hot                                           # ArcFace margin m = 0.5 on the true class
cos_theta.cos_().mul_(self.s)

# one training step
features, qs = backbone(img)                                        # qs = nn.Linear(512, 1)(features)
thetas, std, ccs, nnccs = header(features, label)
loss_qs = criterion_qs(ccs / nnccs, qs)                             # SmoothL1Loss(beta=0.5)
loss_v = criterion(thetas, label) + alpha * loss_qs                 # alpha = 10.0

The regression target is written as ccs / nnccs, and the 1+ϵ1+\epsilon in the denominator of Eq. (4) is gone.

This is more than a difference in a constant. Try A with CCS 0.80 and NNCCS 0.30, and B with CCS 0.90 and NNCCS 0.40:

  • By Eq. (4): A is 0.80/1.30=0.6150.80/1.30=0.615 and B is 0.90/1.40=0.6430.90/1.40=0.643, so B is better.
  • By the code: A is 0.80/0.30=2.670.80/0.30=2.67 and B is 0.90/0.40=2.250.90/0.40=2.25, so A is better.

Take the log of CR and differentiate with respect to NNCCS to see how large a relative change in CR each small move in NNCCS causes. Around NNCCS ≈ 0.33, the paper's version gives −1/(0.33+1)≈−0.75-1/(0.33+1)\approx-0.75 and the code's version −1/0.33≈−3-1/0.33\approx-3, roughly four times larger (this note's own calculation). In other words, the regression head trained by the official code cares more about "how close the nearest neighbor is" than the paper says.

The officially released models were probably trained this way too. In practice the denominator of Eq. (4) is at least 1 (with ten thousand or more classes, the cosine to the nearest negative class won't be negative), so CR can't exceed 1; yet issue #5 (December 2022) reported model outputs above 2, which only fits the range of ccs / nnccs.

In issue #7 (May 2023), someone pointed out directly that the paper and the code disagree. The maintainer replied, "you need to +1 if you train the model. For prediction/testing, it is not needed". In March 2024 someone followed up, asking them to point to where the code does this shift, and there has been no answer since. (The +1 is needed for training, and that training script has no +1.)

Training setup

  • CR-FIQA(S): ResNet-50 on CASIA-WebFace (about 500K images, 10K identities); the learning rate is divided by 10 at iterations 20K and 28K, stopping at 32K.
  • CR-FIQA(L): ResNet-100 on MS1MV2 (5.8M images, 85K identities); the learning rate is divided by 10 at iterations 100K and 160K, stopping at 180K.
  • Shared: ArcFace with s=64s=64 and m=0.5m=0.5; batch 512; SGD with an initial learning rate of 0.1, momentum 0.9 and weight decay 5e-4; random horizontal flips; images aligned and cropped to 112×112, pixels normalized to [−1,1][-1,1].

Discussion

How they compare, and what

All results are in a cross-model setting. CR-FIQA only assigns quality scores; the features used for verification come from four other face recognition models, ArcFace, ElasticFace, MagFace and CurricularFace, all officially released ResNet-100s trained on MS1MV2. The same quality model has to pick images for four different recognition models.

There are eight test sets. LFW, AgeDB-30, CFP-FP, CALFW and CPLFW are the usual verification benchmarks; Adience was originally an age and gender estimation dataset, about 26K images of 2,284 people under very mixed capture conditions; XQLFW derives from LFW, deliberately picking the pairs with the largest quality difference and adding synthetic degradation where needed; IJB-C is a large benchmark that mixes photos and video frames.

There are nine comparison methods: the general image-quality methods BRISQUE, RankIQA and DeepIQA, plus the face-specific RankIQ, PFE, SER-FIQ, FaceQnet, MagFace and SDD-FIQA, each in its officially released version.

The ERC threshold is set at FMR=1e-3, the operating point Frontex, the EU border agency, recommends for automated border control; the 1e-4 curves are in the supplementary material. Each ERC is then compressed into a single number, the area under the curve (AUC), and lower is better. The official ERC plotting code has a few details worth knowing when reading the numbers. A pair's quality is the lower of its two images; the discard fraction runs from 0% to 95%, and at each 5% step the FMR=1e-3 threshold is found anew on the remaining pairs; the AUC covers the whole curve. Later papers, such as DifFIQA mentioned below, call this kind of curve an EDC (error versus discard characteristic) and compute only the partial area up to 30% discarded (pAUC), divided by the FNMR with nothing discarded, on the grounds that real systems rarely throw away more than half their images.

Ablations: does the denominator help, and should they train together?

The first question is whether the NNCCS denominator helps. The authors trained CCS-FIQA(S), whose only difference is that the regression target changes from CR to CCS. The second question is whether joint training is necessary. The alternative is to take a trained ArcFace ResNet-50, freeze it, and attach just one regression layer on top to learn to predict CR or CCS, which the authors call on-top.

DatasetCRCCSCR on-topCCS on-top
Adience0.02410.02350.06510.0686
AgeDB-300.01440.01960.02650.0282
CALFW0.05210.05660.06270.0598
CFP-FP0.00900.01160.02620.0262

Compiled from the legend of Fig. 3 of the paper; ERC area with the ArcFace recognition model at FMR=1e-3, lower is better.

Both jointly trained versions beat on-top, with the area nearly three times smaller on Adience; on CALFW the gap is much smaller, 0.0521 vs. 0.0627 and 0.0566 vs. 0.0598. Comparing CR with CCS, CR is better on AgeDB-30, CALFW and CFP-FP, while on Adience CCS is actually slightly better, and the authors word their conclusion as "generally better."

The on-top gap needs careful reading. On-top trains only a single 512→1 linear layer, about 513 parameters, with the backbone untouched; joint training lets the whole backbone adapt to the regression. These experiments can't separate how much comes from "training jointly" and how much from "how many parameters can be tuned."

Main results

The table below lists only the ArcFace recognition model at FMR=1e-3, side by side with the two strongest rivals:

DatasetSER-FIQMagFaceCR(S)CR(L)
Adience0.02230.02070.02410.0204
AgeDB-300.01670.01560.01440.0159
CFP-FP0.00650.00730.00900.0050
LFW0.00230.00160.00200.0023
CALFW0.05950.05680.05210.0616
CPLFW0.03890.04920.03910.0360
XQLFW0.18120.40220.23770.2084
IJB-C0.01610.01710.01710.0138

Compiled from Table I of the paper; ERC area, lower is better; bold marks the smallest of these four columns.

Of the eight datasets, the two CR-FIQA versions together take six. The remaining two each have a reason.

On LFW the best is MagFace (RankIQ's 0.0018 also beats CR-FIQA). Every recognition model is above 99.8% accurate on LFW, so only a handful of pairs are ever wrong, and dropping one or two images makes the curve jump; the authors also say no method draws a smooth curve on LFW.

On XQLFW the best is SER-FIQ. When this dataset was built, the images of extremely high and extremely low quality were picked using the scores of SER-FIQ and BRISQUE, so SER-FIQ is in effect sitting an exam it wrote itself. CR-FIQA(L)'s 0.2084 trails SER-FIQ but is far better than MagFace's 0.4022; general image metrics such as BRISQUE and RankIQA come in above 0.65.

You can also see that CR(S) and CR(L) trade wins, and on AgeDB-30 and CALFW the smaller one is even better. The quality model trained with CASIA-WebFace and ResNet-50 isn't far from the one trained with MS1MV2 and ResNet-100, which the authors read as the method being insensitive to training data and architecture.

With the other three recognition models, the ranking stays roughly the same. Taking the IJB-C area as an example, under ElasticFace CR(L) scores 0.0135 against MagFace's 0.0166; under CurricularFace it's 0.0134 against 0.0163.

The bottom row of the paper's Fig. 4, four ERCs with the fraction of images discarded, 0% to 95%, on the horizontal axis and FNMR on the vertical axis, at FMR = 1e-3. The left two are XQLFW (ArcFace and ElasticFace recognition models): all lines start from about 0.6; the yellow dashed SER-FIQ is lowest, already close to 0.05 at 60%; the solid blue CR-FIQA(L) and solid red CR-FIQA(S) follow close behind; MagFace, with orange-red triangles, is about 0.45 at 50% and still 0.24 at 95%; the green BRISQUE and black RankIQA climb all the way to 1.0 after 70%. The right two are IJB-C: all lines start from about 0.027; the blue CR-FIQA(L) is lowest throughout, about 0.004 at 95%; BRISQUE, RankIQA and DeepIQA rise above 0.08 as the discard fraction grows; the gray FaceQnet is almost flat. At the very bottom is a shared legend listing eleven methods.
Original Fig. 4, bottom row, Boutros et al., from PDF page 8, arXiv license, scholarly quotation. The original has 16 plots; only the four for XQLFW and IJB-C and the legend are cropped here.

These four plots draw the two extremes above. XQLFW is the dataset with the largest quality gap, and there MagFace's magnitudes can barely tell good from bad, with the error still around 0.45 after half the images are discarded and still 0.24 at 95%, while CR-FIQA keeps falling the whole way. On IJB-C, the general image-quality metrics make more errors the more they discard, since what they throw away is mostly images that were being matched correctly in the first place.

Quality as a weight: IJB-C templates

IJB-C matches templates, a template being a set of photos and video frames of one person. Following the IJB-C protocol, the authors use the quality score as a weight when fusing features, with all frames of one video together weighing as much as one photo, and look at TAR@FAR (the pass rate of same-person pairs when the rate of different people being mistaken for the same person is fixed at some value).

WeightingArc 1e-6Arc 1e-4Mag 1e-6Mag 1e-4
None89.8596.2885.6796.65
SER-FIQ89.7496.3286.0295.80
MagFace89.4996.2285.7595.54
CR(S)89.5996.3586.4595.95
CR(L)90.1696.3687.1295.90

Compiled from Table II of the paper; TAR (%) on IJB-C 1:1 mixed verification; Arc and Mag are the recognition models, and the columns are FAR.

The table caption says CR-FIQA "outperformed SOTA methods under all settings," meaning it beat the other quality methods, and that holds. Compared with the unweighted first row, though, the gains are concentrated at 1e-6, +0.31 for ArcFace and +1.45 for MagFace; at 1e-4, ArcFace gains only 0.08. The MagFace recognition model at 1e-4 stands out even more. Unweighted it scores 96.65, and every kind of quality weighting makes it worse, CR-FIQA included, which drops to about 95.9. (The paper says the integration of CR-FIQA "leads to SOTA verification performance" on IJB-C; the highest number in the table, 96.65, is the unweighted cell.)

It is also a recognition model

CR-FIQA(L)'s backbone was trained with ArcFace in the first place, so remove the regression head and it's an ordinary face recognition model. The supplementary material gave it a quick test, with 99.80% on LFW, 98.49% on CFP-FP, 98.17% on AgeDB-30 and 96.23% on IJB-C (1e-4); the official ArcFace ResNet-100 used for comparison there (also MS1MV2, recognition loss only) scores 99.82%, 98.27%, 98.15% and 96.28%. The extra regression head barely affects recognition, and one forward pass can give both the feature and the quality. That said, none of the paper's quality experiments use this backbone itself to extract features.

The supplementary material also concedes a limitation. SER-FIQ, MagFace and PFE don't need a separately trained quality regression, and CR-FIQA does; the authors' answer is that it only has to be trained once and can then serve several recognition models.

Official code and community reports

Besides the denominator above, the official repo has a few pitfalls in use.

The most frequently asked one is color channels. The README says the model takes RGB, but the official preprocessing script saves InsightFace's RGB images directly with OpenCV, and when reading them back uses the default --color_channel BGR without converting, so the two swaps happen to cancel out. If you read photos yourself with cv2.imread, remember to convert them to RGB. issue #9 and issue #17 both got stuck here.

The second is the range of the scores. The quality scores aren't between 0 and 1; issue #5 asked about this, and the maintainer answered that FIQA scores don't need a fixed range in the first place, since evaluation only looks at the ordering. That's fine for drawing ERCs, but if you want a "retake below this" threshold, you'll have to find it on your own data.

The third is that questions from November 2023 onward, including a speed benchmark (#10), scores all below −20 after converting to ONNX (#12) and an inference script for a single image (#15), have had no reply from the maintainers.

In March 2025 the README front page gained a line saying CR-FIQA took 1st and 2nd places in NIST's FATE Quality evaluation, along with a screenshot of the leaderboard, whose first row is a submitted algorithm called igd_005, ranked 2nd, 1st and 2nd on three metrics. issue #16 (April 2025) asked whether the submission to NIST was CR-FIQA(L), and it got no answer either. (The README was updated in both April 2024 and March 2025, while the last maintainer reply in the issues dates from October 2023.)

Someone else has a claim on the same leaderboard. OFIQ, led by Germany's Federal Office for Information Security (BSI), is the reference implementation of ISO/IEC 29794-5, and its unified quality score uses MagFace; BSI's April 2025 presentation says that, measured by "FNMR after removal of 5% lowest quality images," it ranks first of 52 algorithms. In the README screenshot, igd_005 is 2nd in that 5% column.

Follow-up evaluations in academia also back CR-FIQA's standing. DifFIQA, from the University of Ljubljana in 2023, does quality assessment with a diffusion model, and its own comparison table uses the EDC pAUC (discarding up to 30%) against ten methods across four recognition models. CR-FIQA has the best average under two of the recognition models, AdaFace and CurricularFace (0.688 and 0.679), and under the other two it's only 0.01 behind first place; MagFace sits between 0.74 and 0.78. Another DifFIQA table lists run times, with CR-FIQA at 0.15 ms per image, SER-FIQ at 113 ms and DifFIQA itself at 1,075 ms.

Conclusion

CR-FIQA defines quality as "how close a sample sits to its own center during training, and how far from its nearest neighbor," learns to predict it with a one-layer regression head while the recognition model trains, and scores a face in a single forward pass at test time. In a cross-model setting with eight benchmarks and four recognition models, its ERC areas are mostly the best; of the ones it loses, LFW is already saturated and XQLFW is data picked out with SER-FIQ.

The paper's CR and the official code's CR are two different regression targets, so decide which one you want before you start. They differ by about a factor of four in the weight they give NNCCS, and the released models look like the latter; if you retrain it yourself, adding 1+ϵ1+\epsilon to the denominator as in Eq. (4) is a one-line change. Images read with OpenCV need converting to RGB; the scores have no fixed range, so pick your retake threshold with an ERC on your own images.

train_cr_fiqa.py hasn't changed since it was uploaded in November 2021, and that line still says ccs / nnccs.