[Digikam-devel] libkface

Gilles Caulier caulier.gilles at gmail.com
Wed Jun 25 13:40:22 BST 2014


2014-06-25 13:50 GMT+02:00 Tobias Leupold <tobias.leupold at web.de>:
> Gilles,
>
> I have a few comments on
> https://projects.kde.org/projects/extragear/libs/libkface/repository/revisions/master/entry/DESIGN
>
>> Faces database file is hosted in home directory to be shared with all
>> applications which use libkface :
>
> I don't think that's always the case; at least the recognize program in test/
> does not use this path, but the current work dir to store the db.

absolutely. An improvement can be to add a new CLI argument to adjust
database path.

>
> And speaking generally of test/:
>
> The recognize tool works fine. As said, I was able to implement face detection
> using libkface with a few lines of code after having had a look at the
> sources.
>
> But I had to change all calls of kDebug() to qDebug(); kDebug() didn't produce
> any output here (im very new to programming C++/Qt/KDE, so perhaps, this is my
> fault; but it's quite confusing if the program doesn't speak). Same for the
> recognize program.

run kdebugdialog and turn on KFace debug space to print trace on the
console. No need to use qDebug() instead

>
>> KFaceGui is a simple application able to run detection and recognition
>> without to use CLI. Currently detection is implemented and recognition is
>> broken.
>
> The GUI in test/gui/ is (in contrast to the code in test/) not compiled when
> building libkface. I think it would be nice if at least a README would be
> placed here with how to do it. It would also ne nice if recognition was fixed
> here, so that on has an example of how to do it.

It compile if you turn on -DKDE4_BUILD_TESTS=ON cmake flag at
configuration time.

>
> And ... what's the general state of the library? When I tried to use it, I
> thought it's ready-to-use ...

i pass a lots of time to review code in library since few weeks and i
can said that implementation is better now (git/master). Crashes are
now fixed, but it still memory leak with database (Qt4-sqlite plugin
relevant).

>
> The face detection works fine, but does it work better than using OpenCV's
> CascadeClassifier directly (cf. the small Python program I posted in
> https://bugs.kde.org/show_bug.cgi?id=292900 )? Where's the difference? I think
> this should be documented, as you surely put some effort into this, and
> there's some good reason to use libkface.

No idea, never tested. perhaps Marcel can respond better than me here.
He has large experience about libkface as he has follow students who
work on it in the past.

In all case FaceDetection give excelent results with digiKam. Over
20000 face detected, only few are false (around 30-40)

>
> And what about the recognition feature? Just speaking for me, I wasn't able to
> use it yet. What about the align and preprocess tools? What do I have to do to
> be able to use it?

No idea. Process work but i seen only few real recognition here.

>
> I thought of the library like "give it some faces to learn" and "give it the
> face part of a photo, get a person suggestion". Is this "high-level" access
> possible? It would be really fine if the library cared about alignment and
> preprocessing so nothing can go wrong.

Here Marcel can respond better than me.

>
> I would really like to use it or even contribute to this library. There's
> surely a need for a good OSS face detection and recognition tool. I think
> everything would be way easier if all that was documented somewhere. Like some
> "This is what we have right now and this is what we can do with it". With some
> minimalistic clear and working example code.

Yes, please help is welcome. As API doc improvements, CLI test tool
(for ex recognition part of KFaceGUI need to be ported on new libkface
API)

Don't hesitate to contribute, it will be welcome...

Gilles Caulier

>
> At the moment, apart from the detection feature, It's quite hard to know
> what's going on and how to use it ...
>
> Yours, Tobias
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel



More information about the Digikam-devel mailing list