Matching questions

General information about Neurotechnology and its software

Re: Face matching threshold problem

Postby vaidasz » Nov 30, 2015 14:10

Hello,

pradeep wrote:Dear Sir,
What is the difference between Face-Enrollment and Face Identification both are creating templates
Pradeep Khaire

Enrollment is the process when you extract template and insert it to the database.
Identification (1:N) and verification (1:1) are the matching processes.

pradeep wrote:Dear Sir,
And In Face verification we are using both Images How to verify Image with Template (OR) I have to convert New Image with Template or Old template to Image please.
Because I want to compare Image with template stored in database.
Pradeep Khaire

The matching is done using our proprietary templates. So there is needed to convert the image to template first.
For the information, it is not possible to retrieve an image from template.
There are tutorials provided with SDK that show (I used C# tutorials, but there are the tutorials for other programming languages as well):
    Neurotec_Biometric_6_0_SDK\Tutorials\Biometrics\CS\VerifyCS - shows hot to verify templates;
    Neurotec_Biometric_6_0_SDK\Tutorials\Biometrics\CS\VerifyFaceCS - shows how to verify images (the conversion is performed automatically);
    Neurotec_Biometric_6_0_SDK\Tutorials\Biometrics\CS\IdentifyCS - shows how to identify templates;
    Neurotec_Biometric_6_0_SDK\Tutorials\Biometrics\CS\IdentifyFaceCS - shows how to identify images (the conversion is performed automatically).

pradeep wrote:Dear Sir,
How template get saved in SQLite database becasue biometricclient.setSQLiteDatabseConnection(String args0) will create only file at specified filename.
Is that this method also saves Template in database??
Because we are not passing any template.
Pradeep Khaire

This is just the configuration of NBiometricClient to use SQLite database. It is possible to use use other database via ODBC - you just need to change biometricClient.SetDatabaseConnectionToSQLite with biometricClient.SetDatabaseConnectionToOdbc(“DSN=YOUR_DSN”, “YOUR_TABLE);. ODBC should be configured first.
How to insert template to SQLite database it is shown in Neurotec_Biometric_6_0_SDK\Tutorials\Biometrics\CS\EnrollToSQLiteDatabaseCS tutorial.
How to identify the template with SQLite database it is shown in Neurotec_Biometric_6_0_SDK\Tutorials\Biometrics\CS\IdentifyOnSQLiteDatabaseCS tutorial.

pradeep wrote:Dear Sir,
Because when I run abis-sample code during enrolment template get saved in database, Is my observation right ?
Pradeep Khaire

Actually, there are multiple options you could choose from - use SQLite database, use other database via ODBC, use NServer (a read-to-use matching server) or use MegaMatcher Accelerator (a read-to-use matching server)
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

face template matching problem

Postby pablo111 » Dec 07, 2015 20:11

I have a generalized template extracted from three facial images and saved in my hard drive as the enrollment template. And I have another template extracted from one facial image. I'd like to load the two templates directly and match between them. What functions should I use? Could you point me to an example?

I am using SDK 6.0.

Thanks!

Admin: merged to "Matching questions"
pablo111
 
Posts: 8
Joined: Nov 16, 2015 18:04

Re: face template matching problem

Postby vaidasz » Dec 08, 2015 08:33

pablo111 wrote:I have a generalized template extracted from three facial images and saved in my hard drive as the enrollment template. And I have another template extracted from one facial image. I'd like to load the two templates directly and match between them. What functions should I use? Could you point me to an example?

I am using SDK 6.0.

Thanks!


Hello,

Please check Neurotec_Biometric_6_0_SDK_Trial\Tutorials\Biometrics\CS\VerifyCS tutorial provided with SDK how to verify 2 templates.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

identify task question

Postby learner4 » Dec 26, 2015 21:10

I am not using SQL database (storing templates on file system).
While doing so, how do I use identify task?
My use case is to make sure I enroll a template once, and do de-duplication.

Admin: merged to "Matching questions"
learner4
 
Posts: 21
Joined: Dec 07, 2015 15:30

Re: identify task question

Postby MartynasV » Dec 28, 2015 11:22

learner4 wrote:I am not using SQL database (storing templates on file system).
While doing so, how do I use identify task?
My use case is to make sure I enroll a template once, and do de-duplication.

Hello,

SDK\Tutorials\Biometrics\CS\IdentifyCS

Use "NBiometricOperations.EnrollWithDuplicateCheck" instead of "NBiometricOperations.Enroll".
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: identify task question

Postby learner4 » Dec 28, 2015 15:24

MartynasV wrote:Hello,

SDK\Tutorials\Biometrics\CS\IdentifyCS

Use "NBiometricOperations.EnrollWithDuplicateCheck" instead of "NBiometricOperations.Enroll".

but Enroll happens in memory right? I want to save all templates to disk, will Enrollwithduplicatecheck work while all templates are saved to disk instead of keeping it in memory?
learner4
 
Posts: 21
Joined: Dec 07, 2015 15:30

Re: identify task question

Postby MartynasV » Dec 28, 2015 15:36

learner4 wrote:but Enroll happens in memory right? I want to save all templates to disk, will Enrollwithduplicatecheck work while all templates are saved to disk instead of keeping it in memory?

Hello,

You want to make sure that template is enrolled once, that means that you need to match with all your templates. Matching happens in memory, so you will need to enroll your database(templates from disk) to memory, then match template which you want to enroll.

You have two options:
1. Enroll templates from disk to memory, then identify template you want to enroll, if you didn't find match for that template, then you enroll to memory and disk.
2. Enroll templates from disk to memory, then enroll with duplicate check template, if it successfully enrolled save template to disk too.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: identify task question

Postby learner4 » Dec 28, 2015 16:03

MartynasV wrote:Hello,

You want to make sure that template is enrolled once, that means that you need to match with all your templates. Matching happens in memory, so you will need to enroll your database(templates from disk) to memory, then match template which you want to enroll.

You have two options:
1. Enroll templates from disk to memory, then identify template you want to enroll, if you didn't find match for that template, then you enroll to memory and disk.
2. Enroll templates from disk to memory, then enroll with duplicate check template, if it successfully enrolled save template to disk too.

Thank you, it makes sense.

Can you please let me know how to move the template files from disk to RAM so I can choose one of the options you have mentioned? (using NBiometricClient)
I am assuming it is same as creating Nsubject (and Nface) object and enrolling them into NBiometricClient?
Is there any sample / tutorial program?
learner4
 
Posts: 21
Joined: Dec 07, 2015 15:30

identify

Postby learner4 » Dec 29, 2015 01:53

how does NBiometricClient's Identify method work?
does it go look for subjects?
eg.
NBiometricClient c = new NBiometricClient();
//get license info
var result = c.Identify(subjectToSearch);

in this where does the NBiometricClient Object go to search for matching candidates ? I do not want to use a database in the background, just a file system.
any help is appreciated!

Admin: merged to "Matching questions"
learner4
 
Posts: 21
Joined: Dec 07, 2015 15:30

Re: identify task question

Postby MartynasV » Dec 29, 2015 09:03

learner4 wrote:Thank you, it makes sense.

Can you please let me know how to move the template files from disk to RAM so I can choose one of the options you have mentioned? (using NBiometricClient)
I am assuming it is same as creating Nsubject (and Nface) object and enrolling them into NBiometricClient?
Is there any sample / tutorial program?

Hello,
I am assuming it is same as creating Nsubject (and Nface) object and enrolling them into NBiometricClient?

Yes.
Is there any sample / tutorial program?

"SDK\Tutorials\Biometrics\CS\IdentifyCS" tutorial does exactly what you want: first enrolls templates to memory with enroll task, then identifies probe template.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: identify

Postby MartynasV » Dec 29, 2015 09:12

learner4 wrote:how does NBiometricClient's Identify method work?
does it go look for subjects?
eg.
NBiometricClient c = new NBiometricClient();
//get license info
var result = c.Identify(subjectToSearch);

in this where does the NBiometricClient Object go to search for matching candidates ? I do not want to use a database in the background, just a file system.
any help is appreciated!

Hello,

When you call Identify(probe) method, NBiometricClient matches that probe with all templates stored in local memory(RAM). You can load templates from disk, like it is shown in identify tutorials or connect to database and NBiometricClient will copy templates from database to local memory.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

multiple images question

Postby learner4 » Dec 29, 2015 14:22

when I have multiple faces of same person - eg. one with beard and one without
should I be storing them both under the same subject with different NFace object and extract the template as best practice?
how do I know which face image within the subject came out as result of identify or Verify method when I have multiple faces within the same subject?

Admin: merged to "Matching questions"
learner4
 
Posts: 21
Joined: Dec 07, 2015 15:30

Re: multiple images question

Postby MartynasV » Dec 31, 2015 11:27

learner4 wrote:when I have multiple faces of same person - eg. one with beard and one without
should I be storing them both under the same subject with different NFace object and extract the template as best practice?
how do I know which face image within the subject came out as result of identify or Verify method when I have multiple faces within the same subject?

Hello,

when I have multiple faces of same person - eg. one with beard and one without
should I be storing them both under the same subject with different NFace object and extract the template as best practice?

Yes.

how do I know which face image within the subject came out as result of identify or Verify method when I have multiple faces within the same subject?

You can find which records were matched(by indexes) in probeSubject.MatchingResults[0].MatchingDetails. It is done in AbisSample(shows records matched), you can look into code: "SDK\Samples\Biometrics\CS\AbisSampleCS".
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Matching Threshold VoiceSDK

Postby Adams » Feb 22, 2016 19:34

I am using the VeriSpeak 3.0 SDK, What I am trying to do is change the matching threshold the server uses to find matches for voice templates.

I found this in the SDK: "The strictness of matching algorithm is controlled by NMP_MATCHING_THRESHOLD (NMatcher.MatchingThreshold)
parameter of NMatcher."

I can"t find where it says how to change this, or where to change this. Do I need to add some kind of code in sendtask.c? (I"m using c++ on linux)

I want to set my threshold, for testing purposes, to 200, meaning I want to reject matches that the returned score is less than 200, and only show matches that score 200 or above.

I must be missing something, I"d appreciate any help!

Admin: merged to "Matching questions"
Adams
 
Posts: 1
Joined: Feb 22, 2016 19:22

Re: Matching Threshold VoiceSDK

Postby Martynas » Feb 23, 2016 08:12

Adams wrote:I am using the VeriSpeak 3.0 SDK, What I am trying to do is change the matching threshold the server uses to find matches for voice templates.

I found this in the SDK: "The strictness of matching algorithm is controlled by NMP_MATCHING_THRESHOLD (NMatcher.MatchingThreshold)
parameter of NMatcher."

I can"t find where it says how to change this, or where to change this. Do I need to add some kind of code in sendtask.c? (I"m using c++ on linux)

I want to set my threshold, for testing purposes, to 200, meaning I want to reject matches that the returned score is less than 200, and only show matches that score 200 or above.

I must be missing something, I"d appreciate any help!

Hi,

in case of the sendtask.c tutorial it uses old API, and you need to set the matching threshold parameter as the task parameter.

Code: Select all

   fingerprintMatchingFAR = 200;
   cluster_task_params_add_param(cluster_task_params, 0, NMP_MATCHING_THRESHOLD, fingerprintMatchingFAR);

Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: Matching questions

Postby tfrazao » Apr 08, 2016 12:03

Hello

I have some questions about Neurotec SDK and Mega Matcher Accelerator :

1- After i loaded templates into Mega Matcher Accelerator, how can i get the owner of the finger print matched with my subject given ?
* I have the code :
Code: Select all
     NBiometricTask task = biometricClient.createTask(EnumSet.of(NBiometricOperation.IDENTIFY), subject);
     if (task.getStatus() != NBiometricStatus.OK)
     {
        for (NMatchingResult matched : subject.getMatchingResults()) {
            // I need to know who is the owner of the finger print which matched
           //  matched.getOwner() and  matched.getSubject() always return NULL.

            int score = matched.getScore();
   }
     }


2- Is it possible to change the database of Mega Matcher Accelerator ? How can i do in my trial version ?
3- Is it possible to save the images (face and fingers) into the Mega Matcher Accelerator ? If so, How can i do that ?
4- What is the best approach to save the template ? ( Include inside the template all finger and face images or create an unique template for each finger and face ? )
In the first example i will have much less rows in the database but my template will have all info about the subject. Which one is faster ?

Thanks
tfrazao
 
Posts: 7
Joined: Mar 17, 2016 13:01

Re: Matching questions

Postby Martynas » Apr 08, 2016 12:32

Hello,

tfrazao wrote:1- After i loaded templates into Mega Matcher Accelerator, how can i get the owner of the finger print matched with my subject given ?


The tutorial "IdentifyOnServer" shows how to get the id of the matched record.

tfrazao wrote:* I have the code :


Add code below to your code to get the Id:

Code: Select all
string Id = matched.getId()


tfrazao wrote:2- Is it possible to change the database of Mega Matcher Accelerator ? How can i do in my trial version ?


No, it is not possible to change the database, which is used by the MMA internally.

tfrazao wrote:3- Is it possible to save the images (face and fingers) into the Mega Matcher Accelerator ? If so, How can i do that ?


No, it is not possible to save images in MMA. Actually there is a recommendation to use additional database, for the backup of templates and additional information, such as images, saving.

tfrazao wrote:4- What is the best approach to save the template ? ( Include inside the template all finger and face images or create an unique template for each finger and face ? )
In the first example i will have much less rows in the database but my template will have all info about the subject. Which one is faster ?


The best approach is to have single template with multiple finger and face records in it. By the way, NBiometricClient does not allow to enroll different records with the same id.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Fingerprint template size - accuracy tradeoff

Postby V van Uitert » Apr 11, 2016 07:39

We are planning to enrol 500 000 people with 10 flat fingerprints each. Main goal of the collection is to avoid duplicates, so we will do one 1:N search for each new enrolment.
To save on RAM, storage and data transfer time, we want to reduce the template size, but not to the point that this has a serious negative impact on accuracy.
The SDK has various options that impact the templates size:
1. Template size can be set to Large, Medium, Small, Compact
2. Extracted ridge counts can be set to None, Four, Eight, Four with indexes, Eight with indexes

What is your advice:
Will setting the template size to Small or even Compact still provide acceptable accuracy for this population size?
Should we leave "extracted ridge counts" to the default value "Eight with indexes", or would it be a good idea to lower this?
Can you provide ROC charts that show the effects of these settings?

Admin: merged to "Matching questions"
V van Uitert
 
Posts: 2
Joined: Apr 11, 2016 07:25

Re: Fingerprint template size - accuracy tradeoff

Postby Martynas » Apr 11, 2016 13:24

Hello,

V van Uitert wrote:2. Extracted ridge counts can be set to None, Four, Eight, Four with indexes, Eight with indexes


Do not change the default value of this setting, as it can result in drastic accuracy drop.

V van Uitert wrote:Template size can be set to Large, Medium, Small, Compact


ROC charts showing the influence of the Small and Large templates size usage on FAR is available on website. Do not use Compact size templates, as it will result in accuracy drop too.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: Fingerprint template size - accuracy tradeoff

Postby V van Uitert » Apr 18, 2016 09:50

Martynas wrote:Hello,

V van Uitert wrote:2. Extracted ridge counts can be set to None, Four, Eight, Four with indexes, Eight with indexes


Do not change the default value of this setting, as it can result in drastic accuracy drop.

V van Uitert wrote:Template size can be set to Large, Medium, Small, Compact


ROC charts showing the influence of the Small and Large templates size usage on FAR is available on website. Do not use Compact size templates, as it will result in accuracy drop too.

Martynas,

Thanks for your reply.
We will not touch "Extracted ridge counts".

The charts on the page you linked to have two lines:
  • Test 1 maximized matching accuracy. VeriFinger 8.0 algorithm reliability in this test is shown as blue curves on the ROC charts.
  • Test 2 maximized matching speed. VeriFinger 8.0 algorithm reliability in this test is shown as red curves on the ROC charts.

Can you confirm that test 1 for maximum accuracy is done with template size set to Large and test 2 for maximum speed is done with template size set to Small?
And if that is the only difference between test 1 and 2?
V van Uitert
 
Posts: 2
Joined: Apr 11, 2016 07:25

Re: Fingerprint template size - accuracy tradeoff

Postby Martynas » Apr 18, 2016 10:26

V van Uitert wrote:Martynas,

Thanks for your reply.
We will not touch "Extracted ridge counts".

The charts on the page you linked to have two lines:
  • Test 1 maximized matching accuracy. VeriFinger 8.0 algorithm reliability in this test is shown as blue curves on the ROC charts.
  • Test 2 maximized matching speed. VeriFinger 8.0 algorithm reliability in this test is shown as red curves on the ROC charts.

Can you confirm that test 1 for maximum accuracy is done with template size set to Large and test 2 for maximum speed is done with template size set to Small?
And if that is the only difference between test 1 and 2?

Hi,

the maximal accuracy test is performed with Large templates and Low matching speed.
the maximal speed test is performed with Small templates and High matching speed.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Identification in VeriLook

Postby moorez » Apr 25, 2016 15:32

Hello,

We have VeriLook 5.7 currently installed and are running into an issue when it comes to identification. I am enrolling around 2500 subjects into the NBiometricClient in C# by doing:

_client.Enroll(subject);

Where _client is the NBiometricClient. Everything seems well until I do:

_client.Identify(subject);

Even though over 2500 subjects are enrolled, it only identifies against 1000 other enrolled templates. Is there a way to change this value so that it completes an exhaustive match against all enrolled subjects?

Thank you,
-Zach

Admin: merged to "Matching questions"
moorez
 
Posts: 1
Joined: Apr 25, 2016 15:27

Re: Identification in VeriLook

Postby Martynas » Apr 26, 2016 08:52

moorez wrote:Hello,

We have VeriLook 5.7 currently installed and are running into an issue when it comes to identification. I am enrolling around 2500 subjects into the NBiometricClient in C# by doing:

_client.Enroll(subject);

Where _client is the NBiometricClient. Everything seems well until I do:

_client.Identify(subject);

Even though over 2500 subjects are enrolled, it only identifies against 1000 other enrolled templates. Is there a way to change this value so that it completes an exhaustive match against all enrolled subjects?

Thank you,
-Zach

Hello,

Please use the NBiometricClient.MatchingMaximalResultCount to set the required amount of returned results. By default it limits results returning to 1000 results.
You can use the NBiometricClient.GetCount() method to get the subjects amount in engine.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Getting individual scores between query and the templates

Postby pushkarajvs » May 20, 2016 14:19

Dear Sir,

I am using the VeriEye SDK in Netbeans IDE and Java as the programming language.

The tutorial IdentifyOnSQLiteDatabase finds that iris template from the .db file that gives the maximum score with the query iris template and outputs that score. I would like to have access to all the individual scores between the query template and all the templates present in the .db file irrespective of the value of the score. How can I achieve this?

Thanks
Pushkaraj

Admin: merged to "Matching questions"
pushkarajvs
 
Posts: 9
Joined: May 15, 2016 11:53

Re: Getting individual scores between query and the template

Postby vaidasz » May 20, 2016 14:42

pushkarajvs wrote:Dear Sir,

I am using the VeriEye SDK in Netbeans IDE and Java as the programming language.

The tutorial IdentifyOnSQLiteDatabase finds that iris template from the .db file that gives the maximum score with the query iris template and outputs that score. I would like to have access to all the individual scores between the query template and all the templates present in the .db file irrespective of the value of the score. How can I achieve this?

Thanks
Pushkaraj


Hello Pshkaraj,

Set NBiometricClient.MatchingThreshold = 0 before you send matching task.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Re: Getting individual scores between query and the template

Postby pushkarajvs » May 20, 2016 14:59

vaidasz wrote:Hello Pshkaraj,

Set NBiometricClient.MatchingThreshold = 0 before you send matching task.

Dear Sir,

Thanks for the quick reply. I have already set the MatchingThreshold to 0. For convenience, I am sharing the whole code I have compiled. Please, go through it.

Code: Select all
package com.neurotec.tutorials.biometrics;

import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import com.neurotec.biometrics.NBiometricOperation;
import com.neurotec.biometrics.NBiometricStatus;
import com.neurotec.biometrics.NBiometricTask;
import com.neurotec.biometrics.NMatchingResult;
import com.neurotec.biometrics.NMatchingSpeed;
import com.neurotec.biometrics.NSubject;
import com.neurotec.biometrics.client.NBiometricClient;
import com.neurotec.io.NFile;
import com.neurotec.licensing.NLicense;
import com.neurotec.tutorials.util.LibraryManager;
import com.neurotec.tutorials.util.Utils;
import java.io.FileOutputStream;
import java.io.PrintStream;

public final class IdentifyOnSQLiteDatabase {

   private static final String DESCRIPTION = "Demonstrates how to identify template on SQLite database";
   private static final String NAME = "identify-on-sqlite-database";
   private static final String VERSION = "5.1.0.0";

   private static void usage() {
      System.out.format("usage:\n");
      System.out.format("\t%s [template] [path to database file]\n", NAME);
      System.out.format("\n");
      System.out.format("\ttemplate                   - template for identification\n");
      System.out.format("\tpath to database file      - path to SQLite database file\n");
   }

   public static void main(String[] args) {
      List<String> components = new ArrayList<String>();
      components.add("Biometrics.FingerMatching");
      components.add("Biometrics.FaceMatching");
      components.add("Biometrics.IrisMatching");
      components.add("Biometrics.PalmMatching");
      components.add("Biometrics.VoiceMatching");

      List<String> obtainedComponents = new ArrayList<String>();

      LibraryManager.initLibraryPath();

      Utils.printTutorialHeader(DESCRIPTION, NAME, VERSION, args);

      if (args.length < 1) {
         usage();
         System.exit(1);
      }

      NBiometricClient biometricClient = null;
      NSubject subject = null;
      NBiometricTask task = null;

      try {
         for (String component : components) {
            if (NLicense.obtainComponents("/local", 5000, component)) {
               obtainedComponents.add(component);
            }
         }
         if (obtainedComponents.isEmpty()) {
            System.err.format("Could not obtain any of components: %s%n", components);
            System.exit(-1);
         }

         biometricClient = new NBiometricClient();
         
                        String path=<correct path>;

                        biometricClient.setDatabaseConnectionToSQLite(path);
         
                        biometricClient.setMatchingThreshold(0);

                        int count;
                        count=args.length;
                       
                        biometricClient.setMatchingMaximalResultCount(count);
                                               
         biometricClient.setIrisesMatchingSpeed(NMatchingSpeed.LOW);
                        PrintStream out = new PrintStream(new FileOutputStream(<valid path>));
                        System.setOut(out);   
                        for (int i = 0; i < args.length; i++) {
                            subject = createSubject(args[i], args[i]);
                        String  probe_subject;
                        probe_subject=args[i];
                        String[] parts = probe_subject.split("\\\\");
                        String image1 = parts[parts.length-1];
                        String[] image_name1 = image1.split("\\.");
                         
         task = biometricClient.createTask(EnumSet.of(NBiometricOperation.IDENTIFY), subject);

         biometricClient.performTask(task);

         if (task.getStatus() != NBiometricStatus.OK) {
            System.out.format("Identification was unsuccessful. Status: {0}.", task.getStatus());
            if (task.getError() != null) throw task.getError();
            System.exit(-1);
         }
         for (NMatchingResult matchingResult : subject.getMatchingResults()) {
                            String Gallary_Subject=matchingResult.getId();
                         
                            String[] parts2 = Gallary_Subject.split("\\\\");
                            String image2 = parts2[parts.length-1];
                            String[] image_name2 = image2.split("\\.");
                         
                             System.out.format("%s %s %d\n", image_name1[0],image_name2[0],matchingResult.getScore());
                         }
                }
      } catch (Throwable th) {
         Utils.handleError(th);
      } finally {
         try {
            for (String component : obtainedComponents) {
               NLicense.releaseComponents(component);
            }
         } catch (IOException e) {
            e.printStackTrace();
         }
         if (task != null) task.dispose();
         if (subject != null) subject.dispose();
         if (biometricClient != null) biometricClient.dispose();
      }
   }

   private static NSubject createSubject(String fileName, String subjectId) throws IOException {
      NSubject subject = new NSubject();
      subject.setTemplateBuffer(NFile.readAllBytes(fileName));
      subject.setId(subjectId);

      return subject;
   }

}
pushkarajvs
 
Posts: 9
Joined: May 15, 2016 11:53

Re: Getting individual scores between query and the template

Postby vaidasz » May 23, 2016 09:39

pushkarajvs wrote:Dear Sir,

Thanks for the quick reply. I have already set the MatchingThreshold to 0. For convenience, I am sharing the whole code I have compiled. Please, go through it.

Code: Select all
package com.neurotec.tutorials.biometrics;

import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import com.neurotec.biometrics.NBiometricOperation;
import com.neurotec.biometrics.NBiometricStatus;
import com.neurotec.biometrics.NBiometricTask;
import com.neurotec.biometrics.NMatchingResult;
import com.neurotec.biometrics.NMatchingSpeed;
import com.neurotec.biometrics.NSubject;
import com.neurotec.biometrics.client.NBiometricClient;
import com.neurotec.io.NFile;
import com.neurotec.licensing.NLicense;
import com.neurotec.tutorials.util.LibraryManager;
import com.neurotec.tutorials.util.Utils;
import java.io.FileOutputStream;
import java.io.PrintStream;

public final class IdentifyOnSQLiteDatabase {

   private static final String DESCRIPTION = "Demonstrates how to identify template on SQLite database";
   private static final String NAME = "identify-on-sqlite-database";
   private static final String VERSION = "5.1.0.0";

   private static void usage() {
      System.out.format("usage:\n");
      System.out.format("\t%s [template] [path to database file]\n", NAME);
      System.out.format("\n");
      System.out.format("\ttemplate                   - template for identification\n");
      System.out.format("\tpath to database file      - path to SQLite database file\n");
   }

   public static void main(String[] args) {
      List<String> components = new ArrayList<String>();
      components.add("Biometrics.FingerMatching");
      components.add("Biometrics.FaceMatching");
      components.add("Biometrics.IrisMatching");
      components.add("Biometrics.PalmMatching");
      components.add("Biometrics.VoiceMatching");

      List<String> obtainedComponents = new ArrayList<String>();

      LibraryManager.initLibraryPath();

      Utils.printTutorialHeader(DESCRIPTION, NAME, VERSION, args);

      if (args.length < 1) {
         usage();
         System.exit(1);
      }

      NBiometricClient biometricClient = null;
      NSubject subject = null;
      NBiometricTask task = null;

      try {
         for (String component : components) {
            if (NLicense.obtainComponents("/local", 5000, component)) {
               obtainedComponents.add(component);
            }
         }
         if (obtainedComponents.isEmpty()) {
            System.err.format("Could not obtain any of components: %s%n", components);
            System.exit(-1);
         }

         biometricClient = new NBiometricClient();
         
                        String path=<correct path>;

                        biometricClient.setDatabaseConnectionToSQLite(path);
         
                        biometricClient.setMatchingThreshold(0);

                        int count;
                        count=args.length;
                       
                        biometricClient.setMatchingMaximalResultCount(count);
                                               
         biometricClient.setIrisesMatchingSpeed(NMatchingSpeed.LOW);
                        PrintStream out = new PrintStream(new FileOutputStream(<valid path>));
                        System.setOut(out);   
                        for (int i = 0; i < args.length; i++) {
                            subject = createSubject(args[i], args[i]);
                        String  probe_subject;
                        probe_subject=args[i];
                        String[] parts = probe_subject.split("\\\\");
                        String image1 = parts[parts.length-1];
                        String[] image_name1 = image1.split("\\.");
                         
         task = biometricClient.createTask(EnumSet.of(NBiometricOperation.IDENTIFY), subject);

         biometricClient.performTask(task);

         if (task.getStatus() != NBiometricStatus.OK) {
            System.out.format("Identification was unsuccessful. Status: {0}.", task.getStatus());
            if (task.getError() != null) throw task.getError();
            System.exit(-1);
         }
         for (NMatchingResult matchingResult : subject.getMatchingResults()) {
                            String Gallary_Subject=matchingResult.getId();
                         
                            String[] parts2 = Gallary_Subject.split("\\\\");
                            String image2 = parts2[parts.length-1];
                            String[] image_name2 = image2.split("\\.");
                         
                             System.out.format("%s %s %d\n", image_name1[0],image_name2[0],matchingResult.getScore());
                         }
                }
      } catch (Throwable th) {
         Utils.handleError(th);
      } finally {
         try {
            for (String component : obtainedComponents) {
               NLicense.releaseComponents(component);
            }
         } catch (IOException e) {
            e.printStackTrace();
         }
         if (task != null) task.dispose();
         if (subject != null) subject.dispose();
         if (biometricClient != null) biometricClient.dispose();
      }
   }

   private static NSubject createSubject(String fileName, String subjectId) throws IOException {
      NSubject subject = new NSubject();
      subject.setTemplateBuffer(NFile.readAllBytes(fileName));
      subject.setId(subjectId);

      return subject;
   }

}


Hello,

If you set MatchingThreshold to 0 and you do not get matches, that means there are no features that matched between those templates.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Re: Getting individual scores between query and the template

Postby pushkarajvs » May 23, 2016 10:18

vaidasz wrote:Hello,

If you set MatchingThreshold to 0 and you do not get matches, that means there are no features that matched between those templates.

Dear Sir,

The problem is that I am not getting the scores between the query template and all the templates present in the .db file. I am only getting the score corresponding to the best match. I would like access to the former. Please, let me know if anything is not clear.

Thanks
Pushkaraj
pushkarajvs
 
Posts: 9
Joined: May 15, 2016 11:53

Re: Getting individual scores between query and the template

Postby Martynas » May 24, 2016 06:19

pushkarajvs wrote:Dear Sir,

The problem is that I am not getting the scores between the query template and all the templates present in the .db file. I am only getting the score corresponding to the best match. I would like access to the former. Please, let me know if anything is not clear.

Thanks
Pushkaraj

Hello,

Code: Select all
int count;
count=args.length;
biometricClient.setMatchingMaximalResultCount(count);


You limit the Maximal Matching Results Count. According to your application, if the one template is in arguments, then you limit returned results count to 1 too.
Use the code below for testing purposes:

Code: Select all
biometricClient.setMatchingMaximalResultCount(10000);
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Proprietary Templates vs ISO standard templates

Postby mogoodrich » Sep 08, 2016 20:36

Hello,

For fingerprints, I know that the Neurotec SDK is able to convert from the Neurotec propriety format into standard formats like ISO19794-2.

But, what is unclear me to is if the Neurotec SDK is able to perform searches using a standard format like ISO19794-2. It it possible to forgo the Neurotec format entirely, but still use the SDK and NBiometricClient to scan, enroll, and identify fingerprints using a standard format like ISO19794-2?

(I'm not saying we want to go this route, but, for flexibility I was if it was even possible.)

Take care,
Mark

Admin: merged to "Matching questions"
mogoodrich
 
Posts: 7
Joined: Aug 17, 2016 13:36

Re: Proprietary Templates vs ISO standard templates

Postby MartynasV » Sep 09, 2016 08:46

mogoodrich wrote:Hello,

For fingerprints, I know that the Neurotec SDK is able to convert from the Neurotec propriety format into standard formats like ISO19794-2.

But, what is unclear me to is if the Neurotec SDK is able to perform searches using a standard format like ISO19794-2. It it possible to forgo the Neurotec format entirely, but still use the SDK and NBiometricClient to scan, enroll, and identify fingerprints using a standard format like ISO19794-2?

(I'm not saying we want to go this route, but, for flexibility I was if it was even possible.)

Take care,
Mark

Hello Mark,

Yes you could use only Standard format templates with our SDK, but if you have an option to use our proprietary templates, then I would suggest you to do that, because using our proprietary templates you will get better results, than using Standard template formats.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Matching Server

Postby farinajf » Oct 11, 2016 21:53

Is it possible to send a verification (matching 1-to-1) task to a Matching Server?
The example in the tutorial show how to send an identification task to the server, pointing out the SQL query; but there isn"t any example about verification: how to send a task with two fingerprint templates to the server.

Admin: merged to "Matching questions"
farinajf
 
Posts: 3
Joined: Oct 11, 2016 21:32

Re: Matching Server

Postby Martynas » Oct 14, 2016 06:38

farinajf wrote:Is it possible to send a verification (matching 1-to-1) task to a Matching Server?
The example in the tutorial show how to send an identification task to the server, pointing out the SQL query; but there isn"t any example about verification: how to send a task with two fingerprint templates to the server.

Hello,

the matching server can proceed with the matching of templates, which are enrolled to it. It is not possible to send two templates and verify them on matching server.
If you need to perform the verification with the template on matching server, then you need to specify the query in NSubject.QueryString parameter and then perform the identification on server. The the matching server will execute the query in NSubject and will select the required record(s) from the database and will perform identification with it.
More information on queries is provided in the documentation of the SDK, section "4.2.1.2 Biographic and Custom Data Support".
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Matching vs Fast Matching

Postby mohammadhatami » Jan 04, 2017 05:42

hi
1)Is the fast matching and normal matching differ in ROC/False Accept/False Reject?
2)if yes please explain
3)if yes please explain how calculate False Accept and False Reject in both

4)about (ques1), if any differ in Face ,Iris,Finger please explain
---------------------------------------------------------------------------------
5)are you coding for 2 step matching?
-->for example i have 10 bio metric
first identify with 2 bio metric
send identify result to step 2
and second identify with all bio metric in result of step 1)
<--
i know i can program that,but i want to know are you programming and i just configure?
if yes please explain

tanks
and sorry for bad english
mohammadhatami
 
Posts: 1
Joined: Jan 04, 2017 05:12

Re: Matching questions

Postby Martynas » Jan 12, 2017 13:45

Hello,

mohammadhatami wrote:1)Is the fast matching and normal matching differ in ROC/False Accept/False Reject?
2)if yes please explain
3)if yes please explain how calculate False Accept and False Reject in both
4)about (ques1), if any differ in Face ,Iris,Finger please explain


The different matching licenses provides different matching speeds: i.e. Finger Matcher license allows to achieve up to 40,000 fingers per second matching speed, while Fast Finger Matcher license allows to achieve up to 200,000 fingers per second matching speed. Used license does not have influence on matching accuracy.

NBiometricClient can be configured to use a low or high matching speed - in such case it has an influence on matching accuracy. You can find reliability tests results and ROCs on our website, where you will find results of two scenarios - "maximum accuracy" when low matching speed and large templates are used, and "maximum speed", when high matching speed and small templates are used.

mohammadhatami wrote:5)are you coding for 2 step matching?


No.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: Matching questions

Postby mohamadhatami » Jul 25, 2017 06:00

hi
can i have 2 fast finger match license in one machine.

each fast match-->200,000 match/second

can i have 400,0000 match/second in one machine(attach 2 fast finger marcher license to 1 machine)
--------------------------------------------------------------------------------------------------------

tank you
mohamadhatami
 
Posts: 5
Joined: Jul 25, 2017 05:50

Re: Matching questions

Postby MartynasV » Jul 25, 2017 07:17

mohamadhatami wrote:hi
can i have 2 fast finger match license in one machine.

each fast match-->200,000 match/second

can i have 400,0000 match/second in one machine(attach 2 fast finger marcher license to 1 machine)
--------------------------------------------------------------------------------------------------------

tank you

Hello mohamadhatami,

No, if you do that you would still be able to achieve only up to 200 000 matches per second. If you need better performace, then you would need to look into MegaMatcher Accelerator(http://www.neurotechnology.com/megamatc ... rator.html), speeds: http://www.neurotechnology.com/megamatc ... tions.html.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Matching questions

Postby EvgeniyK » Aug 10, 2017 11:23

Hi.
I am trying to do fingerprint matching between template, extracted from bitmap and existing template in iso compact template on Android.
I have byte array, that contains only minutiae in iso compact template. I can convert it in normal iso template format if necessary. How can I convert this minutiae list in something like FMRecord or NTemplate to use it in NSubject to do verification?
EvgeniyK
 
Posts: 3
Joined: Jul 14, 2017 09:43

Re: Matching questions

Postby Martynas » Aug 10, 2017 12:54

Hello,

take a look at "Tutorials\BiometricStandards\Java\fmcrecord-to-ntemplate" tutorial. It is for PC, but same code can be applied for Android too. In order to get the NTemplate from byte array of compact card template use this tutorial with these parameters: "path_to_file_with_compact_card_template path_to_NTemplate ISO2 C 0".
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2192
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: Matching questions

Postby EvgeniyK » Aug 25, 2017 11:26

Hi. Trying to verify fingers on Android.
I have two fingerprints ISO compact format in base64:
Code: Select all
Jm6qFzFBF4meRXG1ExukAGhyRXmyOxi9VGB3MAWgBR6mUYWzEXe9E2aPO1h3CDlobGh2DkmFS2l2DI2dGV93OGa0ciG5HyJAKUe7
QztbXCi5Sip5LQBdThKdJoZnYIOyKnK1J3mvM36TAGtGUomuW2F3E22mJHmoSm62RXlyK4GTZkC5I1xiO0K6ICAgICAgICAgICAg


And I try to compare it with just extracted finger from bitmap image. I doing the following:
Code: Select all
String finger1 = "Jm6qFzFBF4meRXG1ExukAGhyRXmyOxi9VGB3MAWgBR6mUYWzEXe9E2aPO1h3CDlobGh2DkmFS2l2DI2dGV93OGa0ciG5HyJAKUe7";
String finger2 = "QztbXCi5Sip5LQBdThKdJoZnYIOyKnK1J3mvM36TAGtGUomuW2F3E22mJHmoSm62RXlyK4GTZkC5I1xiO0K6ICAgICAgICAgICAg";
NSubject[] probes = new NSubject[2];
NBiometricClient client;

//      Creating probe's templates
NBuffer isoBytesBuffer1 = NBuffer.fromArray(Base64.decode(finger1, Base64.DEFAULT));

FMCRecord fmcRecord1 = new FMCRecord(BDIFStandard.ISO, new NVersion(2, 0), FMCRMinutiaFormat.COMPACT_SIZE);
fmcRecord1.setMinutiaeBuffer(isoBytesBuffer1);
NFRecord nfRecord1 = fmcRecord1.toNFRecord();
NFTemplate nfTemplate1 = new NFTemplate();
nfTemplate1.getRecords().add(nfRecord1);
NTemplate nTemplate1 = new NTemplate();
nTemplate1.setFingers(nfTemplate1);
probes[0] = new NSubject();
probes[1] = new NSubject();
probes[0].setTemplate(nTemplate1);
//        The same for second finger


And extract candidate finger from just captured bitmap:
Code: Select all
Bitmap bitmap = BitmapFactory.decodeFile(fingerFile.getAbsolutePath());

NImage candidateImage = NImage.fromBitmap(bitmap);
candidateImage.setResolutionIsAspectRatio(false);
candidateImage.setHorzResolution(bitmap.getWidth());
candidateImage.setVertResolution(bitmap.getHeight());

NFinger finger = new NFinger();
finger.setImage(candidateImage);
candidateSubject = new NSubject();
candidateSubject.getFingers().add(finger);

NBiometricTask task = client.createTask(EnumSet.of(NBiometricOperation.CREATE_TEMPLATE), candidateSubject);
client.performTask(task, NBiometricOperation.CREATE_TEMPLATE, completionHandler);


After that in CompletionHandler completed() callback method I start verification:
Code: Select all
NBiometricStatus status;
for (NSubject probe : probes) {
    status = client.verify(candidateSubject, probe);
    int score = candidateSubject.getMatchingResults().get(0).getScore();
    Log.i("VERIFICATION_RESULT", "Score = " + score);
    if (status.equals(NBiometricStatus.OK)) {
        Log.i("VERIFICATION_RESULT", "!!!!!!! Verification SUCCESS !!!!!!!!");
        return;
    }
}
Log.i("VERIFICATION_RESULT", "!!!!!!! Verification FAILED !!!!!!!!");


And I always get Verification Failed result with score 0-2. Existing base64 iso compact template and bitmap captured from same finger.
Can you suggest anything, why verification is failed. Maybe I use some wrong parameters or methods while extracting or creating Subjects from existing templates?
EvgeniyK
 
Posts: 3
Joined: Jul 14, 2017 09:43

Re: Matching questions

Postby MartynasV » Aug 30, 2017 09:10

EvgeniyK wrote:Hi. Trying to verify fingers on Android.
I have two fingerprints ISO compact format in base64:
Code: Select all
Jm6qFzFBF4meRXG1ExukAGhyRXmyOxi9VGB3MAWgBR6mUYWzEXe9E2aPO1h3CDlobGh2DkmFS2l2DI2dGV93OGa0ciG5HyJAKUe7
QztbXCi5Sip5LQBdThKdJoZnYIOyKnK1J3mvM36TAGtGUomuW2F3E22mJHmoSm62RXlyK4GTZkC5I1xiO0K6ICAgICAgICAgICAg


And I try to compare it with just extracted finger from bitmap image. I doing the following:
Code: Select all
String finger1 = "Jm6qFzFBF4meRXG1ExukAGhyRXmyOxi9VGB3MAWgBR6mUYWzEXe9E2aPO1h3CDlobGh2DkmFS2l2DI2dGV93OGa0ciG5HyJAKUe7";
String finger2 = "QztbXCi5Sip5LQBdThKdJoZnYIOyKnK1J3mvM36TAGtGUomuW2F3E22mJHmoSm62RXlyK4GTZkC5I1xiO0K6ICAgICAgICAgICAg";
NSubject[] probes = new NSubject[2];
NBiometricClient client;

//      Creating probe's templates
NBuffer isoBytesBuffer1 = NBuffer.fromArray(Base64.decode(finger1, Base64.DEFAULT));

FMCRecord fmcRecord1 = new FMCRecord(BDIFStandard.ISO, new NVersion(2, 0), FMCRMinutiaFormat.COMPACT_SIZE);
fmcRecord1.setMinutiaeBuffer(isoBytesBuffer1);
NFRecord nfRecord1 = fmcRecord1.toNFRecord();
NFTemplate nfTemplate1 = new NFTemplate();
nfTemplate1.getRecords().add(nfRecord1);
NTemplate nTemplate1 = new NTemplate();
nTemplate1.setFingers(nfTemplate1);
probes[0] = new NSubject();
probes[1] = new NSubject();
probes[0].setTemplate(nTemplate1);
//        The same for second finger


And extract candidate finger from just captured bitmap:
Code: Select all
Bitmap bitmap = BitmapFactory.decodeFile(fingerFile.getAbsolutePath());

NImage candidateImage = NImage.fromBitmap(bitmap);
candidateImage.setResolutionIsAspectRatio(false);
candidateImage.setHorzResolution(bitmap.getWidth());
candidateImage.setVertResolution(bitmap.getHeight());

NFinger finger = new NFinger();
finger.setImage(candidateImage);
candidateSubject = new NSubject();
candidateSubject.getFingers().add(finger);

NBiometricTask task = client.createTask(EnumSet.of(NBiometricOperation.CREATE_TEMPLATE), candidateSubject);
client.performTask(task, NBiometricOperation.CREATE_TEMPLATE, completionHandler);


After that in CompletionHandler completed() callback method I start verification:
Code: Select all
NBiometricStatus status;
for (NSubject probe : probes) {
    status = client.verify(candidateSubject, probe);
    int score = candidateSubject.getMatchingResults().get(0).getScore();
    Log.i("VERIFICATION_RESULT", "Score = " + score);
    if (status.equals(NBiometricStatus.OK)) {
        Log.i("VERIFICATION_RESULT", "!!!!!!! Verification SUCCESS !!!!!!!!");
        return;
    }
}
Log.i("VERIFICATION_RESULT", "!!!!!!! Verification FAILED !!!!!!!!");


And I always get Verification Failed result with score 0-2. Existing base64 iso compact template and bitmap captured from same finger.
Can you suggest anything, why verification is failed. Maybe I use some wrong parameters or methods while extracting or creating Subjects from existing templates?

This issue is being solved via mail.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 248
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Previous

Return to Public

Who is online

Users browsing this forum: No registered users and 2 guests