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.
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.
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)."
Best of luck!
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?
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.
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
rcfg.CreateStorage("MyDB", out desc);
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
In other words:
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.
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!
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.
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.
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.
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.
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.