[Digikam-devel] face recognition database structure

Claudio Noguera claudio.noguera at gmail.com
Tue Jun 30 01:22:38 CEST 2009


I've taken a look at the digikam database design. I want to be able to save
a tag position within the picture; positions just need to be rectangles - no
fancy shapes needed - so I need to store two opposite corners, that is four
integer fields (or one text field). This kind of information is needed for
face recognition.

Option 1:
There's an imagetags table with fields imageid, tagid which have to be
unique. That's a problem because someone may want to use a tag more than
once in the same picture (if region tagging is available, of course). So I
can't just add the four position fields to the imagetags table... or can I?

Advantage of this approach --> regional tagging would be enabled for every
possible tag.


Option 2:
Make the face tag a special kind of tag. That way two new tables would be
needed:
- faces: faceid, tagid (could be null)
- imagefaces: imageid, faceid, x1, y1, x2, y2

The second option is better suited to the face recognition problem:
1. A face detection algorithm would fill the faces table giving 0 to the
faceid field in the imagefaces table.
2. Once faces are detected, some clustering technique is needed to look for
different faces, so it would assign a positive value to face id. It then
would ask the user to assing tags to faces.


What database approach is better?


-- 
Claudio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/digikam-devel/attachments/20090630/87fd34b7/attachment.htm 


More information about the Digikam-devel mailing list