Items with no label
3335 Discussions

Intel RealSense SR300 comparing detected face with a face from an external source

OMore3
Beginner
5,721 Views

I recently purchased the SR300 camera for a project I am working on. I need to save the recognized user in a database, so the app can load the data later for the camera to recognize the user as a registered user. I downloaded a sample application from the Intel website that allows users to register/unregister and save the registerd users to a database. The application is supposed to load the database and compare the detected face with a face stored in the loaded database, all featues in the sample application works, it detects users and register the user, but it nevers recognizes the user if the user is loaded from the database. I made sure all the drivers are up to date, and my computer meets the requirements. I also tried keeping the user's data in memory, reinitializing the camera, and set the user's data back to RecognitionConfiguration , and it didn't work. Can someone please help me?

0 Kudos
44 Replies
MartyG
Honored Contributor III
915 Views

I remembered a similar case from recent times about lack of persistence of storage and managed to dig up the link for you. I hope you find something in it that is useful to your problem. The discussion is 2 pages long.

0 Kudos
OMore3
Beginner
915 Views

Thanks for providing the link, but the link is for a different issue, people were downloading the sample app and not commeting out lines of code (database related) that were obsolete. My issue is different, the user is not being detected after loading the data in memory. Thanks.

0 Kudos
MartyG
Honored Contributor III
915 Views

Face recognition databases are notoriously difficult to program, and there isn't a huge amount of information on doing so (most people come up against the issues in the link that I provided). I think the only other decent reference source I can provide is an Intel article on face databases, if you haven't read it already.

That article says about loading databases back in:

"When the app starts, it tries to open the database file. If a file is found, its contents are read into a Byte array that gets passed to the SetDatabaseBuffer() method. The image-related content contained in the database is then used by the app for subsequent attempts at user recognition (until a new database is saved)."

https://software.intel.com/en-us/articles/code-sample-facial-recognition-using-intel-realsense-sdk RealSense - Code Sample: Facial Recognition Using Intel® RealSense™ SDK | Intel® Software

Best of luck!

0 Kudos
OMore3
Beginner
915 Views

Hi, thanks for replying. The link that you provided is the sample code that I downloaded. To rule out a database issue, what I did was to register a user (user ID is assigned), then I kept the byte array in memory, re-initialze the camera and set the SetDatabaseBuffer() to the byte array in memory... with this, the camera should've been able to compare the detected face with the face from the byte array, since the camera state would be identical to the state before the re-initalization. But the QueryUserID() function is not able to positively get the UserId.

Has anyone run the sample project, register a user, save the database, then load the database again.. and the camera detected the user id after loading the database?

0 Kudos
MartyG
Honored Contributor III
915 Views

Another useful reference source that also provides references scripting to check against your own work is the official documentation for facial recognition. I apologize if you have already seen this too.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/doc_face_face_recognition_data.html Face Recognition [F200,SR300]

0 Kudos
OMore3
Beginner
915 Views

Thanks Marty.. yes I have reviewed and compare with my code already.. and I noticed that this documentation contains obsolete code (this is no longer valid in the latest SDK):

// Create a recognition database

PXCMFaceConfiguration.RecognitionConfiguration.RecognitionStorageDesc desc;

rcfg.CreateStorage("MyDB", out desc);

rcfg.UseStorage("MyDB");

0 Kudos
MartyG
Honored Contributor III
915 Views

This is essentially the problem with using these example scripts. They were first created in late 2014 / early 2015, and the RealSense SDK has changed radically since then, and with new cameras like the SR300 introduced. Without a modern-day version to refer to, it's a minefield of potential problems to navigate through.

I'm usually up for any coding challenge, but given how this code has made so many people cry over the years, this is the one and only instance where my advice to anyone asking about trying facial recognition databases with RealSense is "Don't do it, make a different project. Life will be happier that way". Though I understand that this advice is not suitable for you, as you have already begun the project.

On that script in the official documentation, when someone else had a problem with retaining a registered face, Intel support member Colleen Culbertson suggested changing registration from Continuous to On Demand mode. I.e change

REGISTRATION_MODE_CONTINUOUS

to

REGISTRATION_MODE_ON_DEMAND

In other words:

SetRegistrationMode(PXCFaceConfiguration::RecognitionConfiguration::REGISTRATION_MODE_ON_DEMAND);

0 Kudos
OMore3
Beginner
915 Views

Hi Marty,

I also tried this.. and the camera is still not able to compare two same faces. Thanks for taking the time for replying to all these messages and for the advice, but it is difficult to believe that something so basic and important as of face matching is not working, and I am not talking about a database implementation... for example, if I can use this camera with Windows Hello for authentication, then that means that the camera was able to match 2 faces, one from the live camera and the other one stored, and then pass the results to Windows to allow authentication.

The SDK has several interfaces for face recognition / matching available, and they all are based on a face database, which is in memory, so I really find it difficult to believe that this functionality is not availble.

I really need the Intel technical team to confirm that the functionality around face matching is no longer availble so I can return this product and try something else, or may be is just that the latest SDK version is broken and something needs to be fixed.

Thanks.

0 Kudos
MartyG
Honored Contributor III
915 Views

I'm sorry that I wasn't able to help you to find a solution. I hope that somehow you find resolution to your problem. Good luck!

0 Kudos
idata
Employee
915 Views

Hello OsvaldoMoreno,

 

 

I'm sorry to hear you are experiencing certain issues regarding face matching and recognition.

 

 

I'll be needing more time to investigate if there has been an official statement regarding the face recognition functionality in order to confirm its current state.

 

 

If I find information that you may find useful, I'll post it here.

 

 

Thank you for your patience.

 

 

Regards,

 

Andres V.
0 Kudos
XShao
Novice
915 Views

Hello Andres V.

Have you made any progress on this problem?

The FaceData RecognitionModule.DatabaseBuffer is always null in my project,I want to get help as soon as possible.

Any assistance you could give I will be greatly appreciated.

Thanks.

0 Kudos
idata
Employee
915 Views

Hello OsvaldoMoreno,

Could you please share a snippet of code that shows how you are comparing the faces and where the error is occurring?

Please keep in mind that there is a known bug in the Face module, specifically with the PXCMFaceData.RecognitionModuleData.QueryDatabaseBuffer function, which causes a null return. This bug will not be fixed.

Sorry for the inconvenience this may cause.

I'll be waiting for your response.

Have a nice day.

Regards,

 

Andres V.
0 Kudos
SCybe
Beginner
915 Views

Hello everyone,

I have got the same problem, my "RecognitionModule.DatabaseBuffer" is always null, whereas my "RecognitionModule.DatabaseSize" is bigger, every time a face is registered.

I'm not working with "PXCMFaceData", but with "Intel.RealSense.FaceData".

I just want to get the database buffer, to save it, and re-use it after, with all faces already registered.

Thanks.

0 Kudos
idata
Employee
915 Views

Hello Cybe,

 

 

I'll be needing more time to investigate if the Intel.Real.Sense.Face.Data issue has some relation with the PXCMFaceData issue mentioned above.

 

 

As soon as I have the corresponding information I'll contact you through this post.

 

 

Thank you for your patience.

 

 

Regards,

 

Andres V.
0 Kudos
idata
Employee
915 Views

Hello Cybe,

The reason behind the Face Recognition issue is explained in the Face Tracking & Recognition Release Notes (http://registrationcenter-download.intel.com/akdlm/irc_nas/9560/release_notes_RealSense_SDK_2016_Face_Detection_v11.0.pdf http://registrationcenter-download.intel.com/akdlm/irc_nas/9560/release_notes_RealSense_SDK_2016_Face_Detection_v11.0.pdf).

Face tracking and landmark detection support for Universal Windows Platform for SR300, and Face recognition are mentioned as Alpha Features.

"Alpha Features" imply that the feature is in certain maturity level where the reliability is not guaranteed. There are known issues, but the corresponding fix may not be planned.

If you have any other question, don't hesitate to contact us.

Have a nice day.

Regards,

 

Andres V.
0 Kudos
SCybe
Beginner
915 Views

Hello,

Thank you for this answer. I think I have no choices except to wait you to fix this.

It's bad, your face recognition work well, except this particular thing.

Regards.

0 Kudos
XShao
Novice
915 Views

Hello,

Perhaps we have much ideas to realsense, but cannot find a solution to fix this bug.

Finally,we gave up realsense and our project...

Unfortunately.

Regards.

0 Kudos
idata
Employee
915 Views

Hello,

any updates about this issue?

0 Kudos
idata
Employee
915 Views

Hello Nur_Hasyim,

 

 

There are no updates regarding the current status of the aforementioned features.

 

 

Please keep visiting the community to check the latest news regarding RealSense products.

 

 

Have a nice day.

 

 

Regards,

 

Andres V.
0 Kudos
GVaes
Beginner
863 Views

I also seem to be facing the same issue. Doest this mean that at this moment, there is no possible way to store a file or database with the face recognition database?

0 Kudos
Reply