How do I programmatically access the facial recognition cache in Windows Live Photo Gallery with SQL?
Asked Answered
S

1

8

I'm not talking about the "people tags" embeded in the XMP packets of JPEGs. I'm talking about the face database used to recognize new faces.

I want to add to my program the option to recognize faces using the already trained database of WLPG. I managed to use the API (a type library dll) to detect faces, but to recognize them it needs an Exemplar Cache object that is not available in the same API. I could create my own object, but i want to use the already existing one to avoid duplicate training for the user.

I know the database is in "%localappdata%\Local\Microsoft\Windows Live Photo Gallery\" and that it is in SQL Server Compact Edition 3.1 format. I opened the database with Visual Studio 2010 but I would prefer to read it without accesing the database directly and I don't see a DLL that exports that functionality.

BTW, I'm using Delphi 2010.

Any ideas?

Steading answered 2/1, 2011 at 13:51 Comment(1)
can you give us some more details on how you did this? I'm interested in doing something similar for a proof-of-concept demo.Vituperation
R
1

Cautionary Note: I have never written a line of Delphi in my life.

Since this is not supported by Microsoft, there is unlikely to be any sort of obvious API. Consequently, doing what you're talking about will probably break the moment a new version of Windows Live Photo Gallery comes out.

That being said, your best hope is to connect directly to the database. You will need to read up on how to create a SQL Server to Delphi connection. Then, create a connection string to connect to the Windows Live Photo Gallery database.

Referee answered 8/1, 2011 at 1:5 Comment(6)
I already managed to import the database data into my IExemplarCache object, but i'm having problems with how i return the information to the recognition engine. I will keep trying, but i doubt i will put this method into the final version of the program, even if i make it work.Steading
Could you provide some details of your IExemplarCache class?Referee
I managed to make it work to some extent. It doesn't give exceptions anymore (i wasn't constructing the cache items properly). It detects the faces, but the person id is always 0 which means it is not recognized.Steading
Ok, so it is working! I just didn't have good test images. The recognition is not very good, thou. I tested with a copy of an already recognized image (in WLPG) and it only gave the correct response as a recomendation with 33% confidence.Steading
Congratulations! I'm so happy to hear that!Referee
I made a post about this.Steading

© 2022 - 2024 — McMap. All rights reserved.