Summary: | libface doesn't learn new faces (patch) | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Teemu Autto <kde.org> |
Component: | Faces-Detection | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexjironkin, caulier.gilles |
Priority: | NOR | ||
Version: | 2.0.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 2.0.0 | |
Sentry Crash Report: | |||
Attachments: | Patch that makes learning work. Might not be a correct way to work with opencv. |
Marcel, Adithya, this patch is correct ? Gilles Caulier Yeah this patch is correct. I forgot to add this line. It is actually not averaging anymore. To combine previous examples with a new one it projects both new and old images into Eigen space and stores the projected image. Then when another face is added to the same id, once again it projects the new face with the projected face and stores the projected face. P.S. I will apply the fix ASAP. Thanks for the patch. Alex Patch applied to svn. Gilles Caulier |
Created attachment 54262 [details] Patch that makes learning work. Might not be a correct way to work with opencv. Version: 2.0.0 (using KDE 4.5.4) OS: Linux If trained face contains known face ID, Eigenfaces::update() calls d->learn(*it, cvCloneImage(newFaceArr.at(i).getFace())); to average old face and new face, but in Eigenfaces::EigenfacesPriv::learn() second argument newFace is commented out, and not included into tempFaces for average calculation. Reproducible: Didn't try Steps to Reproduce: Train face database twice with same id. Actual Results: OpenCV throws exception for not being able to calculate average. Expected Results: Average is calculated, and stored. Current averaging method puts too much value for lastly trained face (50%), and isn't really an "average" of trained faces.