Re: [Shotwell] Adding face recognition to shotwell

2018-07-21 Thread Narendra Acharya via shotwell-list
 Hi,
I modified the DBus code to use activation for launching the facedetect 
process. The build and install process has not been updated to install the DBus 
service file at the right place though. I presume there needs to be a meson 
directive to do that.As for the DNN model, should we create a post install hook 
in the various packages to prompt for downloading the model from the URL into 
shotwell's data directory? There could be a license prompt before downloading 
for the Apache 2.0 license.
Thanks,Narendra 
On Wednesday, 18 July, 2018, 8:45:09 PM IST, Narendra Acharya 
 wrote:  
 
  Hi Jens,
I agree that we should not be forcing the DNN model download for everyone. It 
could be an optional 'data' package which is required only for face recognition 
and not detection. This data package could probably be under a different 
license like you said.So I will assume the basic facedetect binary would be 
packaged with shotwell, with a dbus service hook to launch it.
On Wednesday, 18 July, 2018, 8:40:16 PM IST, Jens Georg  
wrote:  
 
 
> So do we now create 2 packages out of the shotwell tree? How would the
> facedetect package be published to various distributions?
> And should the facedetect binary become a service which can be
> launched by shotwell, or maybe by the OS?

You should not care about this at all. Either me (for flatpak) or
whoever is responsible for the distribution packages.

Being D-Bus (and running on the public busses) automatic launching comes
for free with D-Bus activation, given the D-Bus service files are
installed properly. But we can do that in a second step.

The more problematic thing I see here is that I would not like to
force everyone to download 31Mb of data for a feature they are probably
not even using

The other issue is that I have a vague memory of Apache + GPL being a 
bit
of a problem. So probably the face detect binary might have to go into a
separate, differently licensed package that uses D-Bus for "license 
isolation"
anyway.

Let me have a look at the code first, though.
___
shotwell-list mailing list
shotwell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/shotwell-list


Re: [Shotwell] Adding face recognition to shotwell

2018-07-18 Thread Narendra Acharya via shotwell-list
 Hi Jens,
I agree that we should not be forcing the DNN model download for everyone. It 
could be an optional 'data' package which is required only for face recognition 
and not detection. This data package could probably be under a different 
license like you said.So I will assume the basic facedetect binary would be 
packaged with shotwell, with a dbus service hook to launch it.
On Wednesday, 18 July, 2018, 8:40:16 PM IST, Jens Georg  
wrote:  
 
 
> So do we now create 2 packages out of the shotwell tree? How would the
> facedetect package be published to various distributions?
> And should the facedetect binary become a service which can be
> launched by shotwell, or maybe by the OS?

You should not care about this at all. Either me (for flatpak) or
whoever is responsible for the distribution packages.

Being D-Bus (and running on the public busses) automatic launching comes
for free with D-Bus activation, given the D-Bus service files are
installed properly. But we can do that in a second step.

The more problematic thing I see here is that I would not like to
force everyone to download 31Mb of data for a feature they are probably
not even using

The other issue is that I have a vague memory of Apache + GPL being a 
bit
of a problem. So probably the face detect binary might have to go into a
separate, differently licensed package that uses D-Bus for "license 
isolation"
anyway.

Let me have a look at the code first, though.
  ___
shotwell-list mailing list
shotwell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/shotwell-list


Re: [Shotwell] Adding face recognition to shotwell

2018-07-18 Thread Jens Georg




So do we now create 2 packages out of the shotwell tree? How would the
facedetect package be published to various distributions?
And should the facedetect binary become a service which can be
launched by shotwell, or maybe by the OS?


You should not care about this at all. Either me (for flatpak) or
whoever is responsible for the distribution packages.

Being D-Bus (and running on the public busses) automatic launching comes
for free with D-Bus activation, given the D-Bus service files are
installed properly. But we can do that in a second step.

The more problematic thing I see here is that I would not like to
force everyone to download 31Mb of data for a feature they are probably
not even using

The other issue is that I have a vague memory of Apache + GPL being a 
bit

of a problem. So probably the face detect binary might have to go into a
separate, differently licensed package that uses D-Bus for "license 
isolation"

anyway.

Let me have a look at the code first, though.
___
shotwell-list mailing list
shotwell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/shotwell-list


Re: [Shotwell] Adding face recognition to shotwell

2018-07-17 Thread Norbert Preining via shotwell-list
Hi all,

> I am not familiar with flatpak, so will read up and see how I can deploy this 
> service using it.So the preferred method seems to be separate package for the 
> facedetect binary which comes with the DNN model.

I think a separate package sounds fine, but I would recommend against
flatpak. Let distributions do the work and package it properly ...
Nothing you should be concerned with.

Norbert

--
PREINING Norbert   http://www.preining.info
Accelia Inc. +JAIST +TeX Live +Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
___
shotwell-list mailing list
shotwell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/shotwell-list


Re: [Shotwell] Adding face recognition to shotwell

2018-07-17 Thread Narendra Acharya via shotwell-list
 Hi Andreas,
I am not familiar with flatpak, so will read up and see how I can deploy this 
service using it.So the preferred method seems to be separate package for the 
facedetect binary which comes with the DNN model.
Thanks,Narendra
On Tuesday, 17 July, 2018, 12:44:49 PM IST, Andreas Brauchli 
 wrote:  
 
 Hi Narendra,

On Mon, 2018-07-16 at 15:28 +, Narendra Acharya via shotwell-list
wrote:
> Hi,
> 
> As mentioned in my recent posts, I am working on better integration
> of face detection (via DBus) and add face recognition as the next
> step. The DBus connection cleanup is mostly done in my
> fork: https://gitlab.gnome.org/nma83/shotwell/commits/wip/faces.
Thanks, looking forward to it.

> In order to get to face recognition, I would like to use the OpenFace
> method described here: https://cmusatyalab.github.io/openface/
> It involves running the extracted face image (already available from
> detection) through a DNN to get a 128 element vector which supposedly
> represents the face. This vector needs to be stored (say in
> FaceTable) per face. Face recognition can be performed by
> transforming the face to be recognized to a similar vector and
> correlating via dot-product with each stored face's vector. The one
> with the highest dot product is the most likely match.
> To do this, a DNN model is needed which is open-source under Apache
> 2.0. 
> https://storage.cmusatyalab.org/openface-models/nn4.small2.v1.t7t7 -
> 31MB size
> How could we add this model as part of the shotwell package? Or
> create another package which can be an optional dependency.
Since you're using DBus, the application coupling is very low already,
so it sounds like the better approach is indeed to provide a standalone
face-recognition service. This could then also be used by other apps
wishing to connect to it (say, gnome photos).

As such, you'd bundle it separately. Shotwell should then only need the
code to interface with the DBus service: detect if it's available,
maybe start it if necessary and send photo-handles to run the
recognition on.

Maybe you can even Flatpak your bundle and have it export the DBus
service. That would make it quite easy to deploy.

> 
> Thanks,
> Narendra
Cheers,
Andreas

> ___
> shotwell-list mailing list
> shotwell-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/shotwell-list
  ___
shotwell-list mailing list
shotwell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/shotwell-list


Re: [Shotwell] Adding face recognition to shotwell

2018-07-17 Thread Andreas Brauchli
Hi Narendra,

On Mon, 2018-07-16 at 15:28 +, Narendra Acharya via shotwell-list
wrote:
> Hi,
> 
> As mentioned in my recent posts, I am working on better integration
> of face detection (via DBus) and add face recognition as the next
> step. The DBus connection cleanup is mostly done in my
> fork: https://gitlab.gnome.org/nma83/shotwell/commits/wip/faces.
Thanks, looking forward to it.

> In order to get to face recognition, I would like to use the OpenFace
> method described here: https://cmusatyalab.github.io/openface/
> It involves running the extracted face image (already available from
> detection) through a DNN to get a 128 element vector which supposedly
> represents the face. This vector needs to be stored (say in
> FaceTable) per face. Face recognition can be performed by
> transforming the face to be recognized to a similar vector and
> correlating via dot-product with each stored face's vector. The one
> with the highest dot product is the most likely match.
> To do this, a DNN model is needed which is open-source under Apache
> 2.0. 
> https://storage.cmusatyalab.org/openface-models/nn4.small2.v1.t7t7 -
> 31MB size
> How could we add this model as part of the shotwell package? Or
> create another package which can be an optional dependency.
Since you're using DBus, the application coupling is very low already,
so it sounds like the better approach is indeed to provide a standalone
face-recognition service. This could then also be used by other apps
wishing to connect to it (say, gnome photos).

As such, you'd bundle it separately. Shotwell should then only need the
code to interface with the DBus service: detect if it's available,
maybe start it if necessary and send photo-handles to run the
recognition on.

Maybe you can even Flatpak your bundle and have it export the DBus
service. That would make it quite easy to deploy.

> 
> Thanks,
> Narendra
Cheers,
Andreas

> ___
> shotwell-list mailing list
> shotwell-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/shotwell-list
___
shotwell-list mailing list
shotwell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/shotwell-list