Menu

SourceAFIS Perfomance - NetBeans

Dunsin O
2019-06-28
2019-06-28
  • Dunsin O

    Dunsin O - 2019-06-28

    I am using NetBeans IDE for development. After I cloned the project from bitcucket and imported the project I noticed it had to download some dependencies at first build.

    At the moment the matching algorithm works fine but I'm concerned about the total time it takes to execute - I observe an average run time of 6-7 secs for 1:1 matching.

    Below is my code:

    /*
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
    
    package com.machinezoo.sourceafis;
    
    //import java.nio.file.Path;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    import java.io.IOException;
    
    /**
     *
     * @author dunsin
     */
    public class FingerPrintRun {
    
        public static void main(String [] parms)
        {
            try
            {
                System.out.println("Starting Test..");
    
                byte[] probeImage = Files.readAllBytes(Paths.get("/Users/dunsin/desktop/test4.png"));
                byte[] candidateImage = Files.readAllBytes(Paths.get("/Users/dunsin/desktop/test3.png"));
    
                FingerprintTemplate probe = new FingerprintTemplate()
                    .dpi(500)
                    .create(probeImage);
    
                FingerprintTemplate candidate = new FingerprintTemplate()
                    .dpi(500)
                    .create(candidateImage);
    
                double score = new FingerprintMatcher()
            .index(probe)
            .match(candidate);
    
                double threshold = 40;
                boolean matches = score >= threshold;
    
                System.out.println("Result of Fingerprint verification - Similarity score is "+score+" and match is "+matches);
           }
           catch(IOException exception)
           {
               System.out.println("Exception is "+exception);
           }
    
        }
    
    }
    
     
  • Robert Važan

    Robert Važan - 2019-06-28

    This benchmark has numerous issues:

    • build time overhead
    • JVM launch overhead
    • JVM is not warmed up
    • 2x image I/O and 2x feature extraction is included in benchmark of matching speed
    • index() method is included in timing of match() method
    • match() method is tested on matching fingerprint pair (rare in 1:N)
    • low data diversity - only one fingerprint pair
     

    Last edit: Robert Važan 2019-06-28

Log in to post a comment.