Bug 323271

Summary: Face Recognition doesn't work
Product: digikam Reporter: Lucas Linard <lucaspglinard>
Component: Faces-RecognitionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: caulier.gilles, deletesoftware
Priority: NOR    
Version: 3.3.0   
Target Milestone: ---   
Platform: openSUSE RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 3.4.0

Description Lucas Linard 2013-08-07 22:30:35 UTC
It can detect faces but after I assign names to them (Ex. Lucas, Carol, Paul) It doesn't detect the person. I choose the try to recognize faces and got the following output at the terminal:

 OpenCV Error: The function/feature is not implemented (This FaceRecognizer (FaceRecognizer.LBPH) does not support updating, you have to use FaceRecognizer::train to update it.) in update, file /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp, line 305
digikam(2796)/KFACE: cv::Exception training LBPH: /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp:305: error: (-213) This FaceRecognizer (FaceRecognizer.LBPH) does not support updating, you have to use FaceRecognizer::train to update it. in function update
 
OpenCV Error: The function/feature is not implemented (This FaceRecognizer (FaceRecognizer.LBPH) does not support updating, you have to use FaceRecognizer::train to update it.) in update, file /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp, line 305
digikam(2796)/KFACE: cv::Exception training LBPH: /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp:305: error: (-213) This FaceRecognizer (FaceRecognizer.LBPH) does not support updating, you have to use FaceRecognizer::train to update it. in function update

Reproducible: Always

Steps to Reproduce:
1. Detect Faces
2. ask to Recognize faces
3. Doesnt recognize any face at all.
Actual Results:  
No faces recognized. Only detected. Even after I try to "train the program".
Comment 1 Mahesh 2013-08-08 02:53:40 UTC
Hi Lucas,

Please check whether you have OpenCV 2.4.5 or above,LBPH is not fully
supported below OpenCV 2.4.4.


On Thu, Aug 8, 2013 at 4:00 AM, Lucas Linard <lucaspglinard@gmail.com>wrote:

> https://bugs.kde.org/show_bug.cgi?id=323271
>
>             Bug ID: 323271
>            Summary: Face Recognition doesn't work
>     Classification: Unclassified
>            Product: digikam
>            Version: 3.3.0
>           Platform: openSUSE RPMs
>                 OS: Linux
>             Status: UNCONFIRMED
>           Severity: major
>           Priority: NOR
>          Component: Face Management
>           Assignee: digikam-devel@kde.org
>           Reporter: lucaspglinard@gmail.com
>
> It can detect faces but after I assign names to them (Ex. Lucas, Carol,
> Paul)
> It doesn't detect the person. I choose the try to recognize faces and got
> the
> following output at the terminal:
>
>  OpenCV Error: The function/feature is not implemented (This FaceRecognizer
> (FaceRecognizer.LBPH) does not support updating, you have to use
> FaceRecognizer::train to update it.) in update, file
> /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp,
> line
> 305
> digikam(2796)/KFACE: cv::Exception training LBPH:
>
> /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp:305:
> error: (-213) This FaceRecognizer (FaceRecognizer.LBPH) does not support
> updating, you have to use FaceRecognizer::train to update it. in function
> update
>
> OpenCV Error: The function/feature is not implemented (This FaceRecognizer
> (FaceRecognizer.LBPH) does not support updating, you have to use
> FaceRecognizer::train to update it.) in update, file
> /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp,
> line
> 305
> digikam(2796)/KFACE: cv::Exception training LBPH:
>
> /home/abuild/rpmbuild/BUILD/OpenCV-2.4.3/modules/contrib/src/facerec.cpp:305:
> error: (-213) This FaceRecognizer (FaceRecognizer.LBPH) does not support
> updating, you have to use FaceRecognizer::train to update it. in function
> update
>
> Reproducible: Always
>
> Steps to Reproduce:
> 1. Detect Faces
> 2. ask to Recognize faces
> 3. Doesnt recognize any face at all.
> Actual Results:
> No faces recognized. Only detected. Even after I try to "train the
> program".
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel@kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
Comment 2 caulier.gilles 2013-08-08 07:58:37 UTC
Mahesh,

This want mean that OpenCV version dependency must be patch in digiKam & co

Gilles
Comment 3 Mahesh 2013-08-08 08:44:33 UTC
Gilles,

From Lucas build log I can see its displaying OpenCV 2.4.3 version,hence I
strongly believe OpenCV 2.4.5 should be provided as required in CMake
options of libkface to make face recognition work.But as I remember we
already did it in libkface.


On Thu, Aug 8, 2013 at 1:28 PM, Gilles Caulier <caulier.gilles@gmail.com>wrote:

> https://bugs.kde.org/show_bug.cgi?id=323271
>
> Gilles Caulier <caulier.gilles@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |caulier.gilles@gmail.com
>
> --- Comment #2 from Gilles Caulier <caulier.gilles@gmail.com> ---
> Mahesh,
>
> This want mean that OpenCV version dependency must be patch in digiKam & co
>
> Gilles
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel@kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
Comment 4 caulier.gilles 2013-08-08 08:54:46 UTC
Mahesh,

Currently OpenCV 2.4.4 is required, not 2.4.5 :

https://projects.kde.org/projects/extragear/libs/libkface/repository/revisions/master/entry/CMakeLists.txt#L75

Note : OpenCV 2.4.6 is out this summer :

http://opencv.org/downloads.html

Gilles Caulier
Comment 5 Marcel Wiesweg 2013-08-08 19:43:54 UTC
2.4.3 has the bug the is described above. It's nothing particular, just a plain old bug in OpenCV, 2.4.3 just won't work.
I never had 2.4.4 installed, LBPH was developed with 2.4.5. I hope 2.4.6 does not introduce problems.
Comment 6 caulier.gilles 2013-08-09 05:57:15 UTC
Git commit a34ae6d03f6c11e926bd171f9795b5a20c55f058 by Gilles Caulier.
Committed on 09/08/2013 at 05:56.
Pushed by cgilles into branch 'master'.

Fix OpenCV version to use for Faces Recognition

M  +2    -1    CMakeLists.txt

http://commits.kde.org/libkface/a34ae6d03f6c11e926bd171f9795b5a20c55f058
Comment 7 Aleksej 2013-09-07 15:53:18 UTC
Based on the description, shouldn't this bug be duplicate of bug 271679 instead of RESOLVED FIXED?