Re: [Shotwell] Enhance face detection

Hi Ricardo,

There are problems with the OpenCV VAPI that I discovered while trying to integrate OpenCV directly.
OpenCV is not C compatible anymore in the recent 3.x versions ( 
So I had to create another VAPI bridge that took in plain C structures and then called the OpenCV functions.
This bridge is wrapped in extern "C" so that vala can talk to it. OpenCV libraries are linked to the shotwell executable at the link stage.
I think we can defer OpenCL usage until OpenCV3 gets into debian (it is available on my archlinux machine).

I have forked the shotwell repo and created wip/faces branch with my current WIP changes:
The face detection works as it used to in this branch, but using the VAPI bridge to OpenCV instead of another process.
I am exploring other options for better accuracy - OpenCV with DNN or dlib.

The UI changes should not conflict with my change like you said, so merge should be seamless once we get there.


From: Ricardo <ricardofantin gmail com>
To: Narendra Acharya <narendra_m_a yahoo com>
Cc: "shotwell-list gnome org" <shotwell-list gnome org>
Subject: Re: [Shotwell] Enhance face detection
Date: Fri, 22 Jun 2018 10:48:21 -0300
Hello. In there is a vapi to link direct from vala to opencv without c/c++ in the middle. Some considerations: First, it use OpenCV 2 which cannot detect automatically the presence of a graphic card capable to use OpenCL. Second, in the last stable Debian the OpenCV3 is not available yet. So it would not be possible to easily compile it in Debian. In the vapi, the functions about matrix eigenvalues to recognize specific person faces are available too. I'm working in a new user experience - - for faces. If you work in bring the OpenCV3 to valadoc and use that vapi in shotwell probably we will not work in the same lines of code and we will not have much work in a merge. Phako, some time ago in a pull-request you mentioned that the use of c++ is not a big issue. Is ok to Narendra work in the use of the OpenCV vapi in shotwell now? Bye, Ricardo. 2018-06-22 5:08 GMT-03:00, Narendra Acharya via shotwell-list <shotwell-list gnome org>:
I was looking at the current face detection code in shotwell 0.29.2 and feel
that it can be enhanced.So I pulled the code
from and started making some
changes.1. Do not run another process for face detection
(shotwell-facedetect) but integrate the OpenCV calls into shotwell and link
to OpenCV libraries2. Ability to use OpenCL when available on the platform
using T-API in OpenCV 3.x3. Eventually add face recognition on photos using
a trained model based on faces labelled by the user - this would need a few
faces to be tagged by the user before the OpenCV face recognition calls can
be used
Is there anyone else working on this area?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]