[Digikam-devel] libkface

Marcel Wiesweg marcel.wiesweg at gmx.de
Thu Jun 26 18:23:20 BST 2014


> 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.

We tested back and forth, in the end any of the available cascades was its 
weaknesses, by using more than one cascade to verify candidates we got pretty 
good results (there's even some literature that recommends this approach, 
cited in the code IIRC)


> 
> 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?

When LBPH by Philipp Wagner entered OpenCV, we had for the first time a 
working recognition algorithm.
We have no working code for face alignment. I see one candidate with free 
code, it's not in libkface and complex.

The API is designed to provide a high-level interface as you describe it. It 
attempts to be backend-agnostic and is prepared for concurrent access (which 
we do heavily in digikam).
Please not that the test tools are primarily meant to help with development 
and not as examples for proper usage. There are API docs in the headers for 
this purpose. And we are here to answer questions.

My example of proper API usage can be found in digikam's FacePipeline.cpp 
(utils/facemanagement), in the classes RecognitionWorker and Trainer, 
MapListTrainingDataProvider is an example of a non-trivial implementation of a 
TrainingDataProvider.
I know, this is deeply tied into a multithreaded pipeline and digikam's 
database. Just look at lines 943 - 1039 and 573 - 599. 
Look at libs/database/facetags.cpp 233- 337 to see how we deal with libkface's 
Identities, which we map to tags in digikam.

> 
> I would really like to use it or even contribute to this library. 

You are very welcome

Please note you are the first non-digikam user of this library that I know of. 
If you need something we didn't think of, we can discuss everything.

Marcel



More information about the Digikam-devel mailing list