NFIQ2 includes a conformance test suite to verify that your build correctly implements ISO/IEC 29794-4. This guide shows how to use the test suite and interpret results.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/usnistgov/NFIQ2/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The conformance test suite validates that NFIQ2 produces consistent, specification-compliant results by:- Running NFIQ2 on a standardized dataset
- Comparing your output against expected reference values
- Identifying any discrepancies
The conformance dataset images are subject to a license agreement and must be downloaded separately from NIST.
Test Suite Components
The conformance test suite is located in theconformance/ directory:
Files Included
conformance_expected_output-v2.3.0.csv
conformance_expected_output-v2.3.0.csv
Expected output from NFIQ2 v2.3.0 when run against the conformance dataset. Contains:
- Unified quality scores
- All quality metric values (from
-vflag) - Actionable feedback (from
-aflag)
conformance_expected_output-v2.3.0-mapped.csv
conformance_expected_output-v2.3.0-mapped.csv
Expected output with all values mapped to 0-100 scale (using
-b flag).diff.py
diff.py
Python script to compare two CSV outputs from NFIQ2 ≥2.1. Requires Python 3 and Pandas ≥1.1.0.
Prerequisites
Download Conformance Dataset
Download the conformance dataset images from the NIST website.The dataset contains fingerprint images specifically designed for conformance testing.
Running Conformance Tests
Step 1: Generate Your Output
Run NFIQ2 on the conformance dataset to generate your output CSV:-i: Input fingerprint images (conformance dataset)-m: Model file (random forest parameters)-v: Include quality metric values-a: Include actionable feedback-o: Output CSV file
Step 2: Compare Against Reference Output
Use thediff.py script to compare your output with the expected reference:
Understanding Results
Conformant Output
If your build is conformant, you’ll see no output:Non-Conformant Output
If there are differences, they will be printed:diff.py Usage
Basic Usage
Command-Line Options
Path to the reference CSV (e.g.,
conformance_expected_output-v2.3.0.csv)Path to your generated NFIQ2 CSV output
Write differences to a file instead of stdout
Silent mode: only print True/False to indicate if files match
Examples
Validated Columns
Thediff.py script validates the following columns:
Basic Metrics
Basic Metrics
Filename: Image filenameFingerCode: Finger position codeQualityScore: Unified quality score (1-5)OptionalError: Error messages if any
Quality Checks
Quality Checks
Quantized: Image quantization checkResampled: Image resampling checkEmptyImageOrContrastTooLow: Contrast validationUniformImage: Uniformity checkFingerprintImageWithMinutiae: Minutiae presenceSufficientFingerprintForeground: Foreground adequacy
Frequency Domain Analysis (FDA)
Frequency Domain Analysis (FDA)
FDA_Bin10_0throughFDA_Bin10_9: Frequency binsFDA_Bin10_Mean: Mean FDA valueFDA_Bin10_StdDev: FDA standard deviation
Minutiae Features
Minutiae Features
FingerJetFX_MinutiaeCount: Total minutiae countFingerJetFX_MinCount_COMMinRect200x200: Center minutiaeFJFXPos_Mu_MinutiaeQuality_2: Minutiae qualityFJFXPos_OCL_MinutiaeQuality_80: High-quality minutiae
Orientation & Ridge Features
Orientation & Ridge Features
OCL_Bin10_*: Orientation certainty level binsOF_Bin10_*: Orientation flow binsLCS_Bin10_*: Local clarity score binsRVUP_Bin10_*: Ridge valley uniformity binsOrientationMap_ROIFilter_CoherenceRelOrientationMap_ROIFilter_CoherenceSum
Other Measures
Other Measures
ImgProcROIArea_Mean: ROI area meanMMB: Minutiae-based measureMu: Mean intensity
Interpreting Differences
Acceptable Differences
Minor floating-point differences (< 0.001) may occur due to:- Different compiler optimizations
- Platform-specific math libraries
- Rounding in intermediate calculations
Unacceptable Differences
Large differences or incorrect quality scores indicate:- Build configuration issues
- Incorrect model file
- Modified source code
- Platform-specific bugs
Automated Testing
Integrate conformance testing into your CI/CD pipeline:Troubleshooting
Missing Required Columns
Error:The following required columns are missing in <file>
Solution: Ensure you ran NFIQ2 with both -v and -a flags:
Row Count Mismatch
Error:The number of rows in the CSV files differ
Solution: Verify you’re using the complete conformance dataset with all images.
Unmatched Filenames
Error:Some "Filename" keys are not present in both files
Solution: Check that:
- File paths in both CSVs use consistent separators
- All conformance images were processed
- No extra images were included
Pandas Version Error
Error:ModuleNotFoundError: No module named 'pandas'
Solution: Install Pandas:
Best Practices
Test Early
Run conformance tests immediately after building to catch issues early
Automate Testing
Integrate conformance tests into your CI/CD pipeline
Document Differences
If intentional changes cause differences, document them clearly
Version Control
Keep conformance outputs in version control to track changes
Next Steps
Computing Scores
Learn how to compute quality scores in your application
Quality Measures
Understand the quality measures being validated