Face detection feature missing in Fedora 33, shotwell 0.31.3

Hi there,

I’m eagerly waiting to use the new face recognition functionality that comes with shotwell 0.31. I’m running Fedora 33 and have shotwell 0.31.3 installed from the default repository (no flatpak, rpm-based). However, there is no button whatsoever that provides the face detection functionality. This functionality is also not present in the flatpak version from registry . fedoraproject . org, although this has shotwell 0.31.3, too.

I can see and use the face detection only from the nightly . gnome . org flatpak, but I’d rather stick to a stable release channel (and personally don’t like flatpaks all too much …).

Since the OpenCV DNN module is required for face detection to work, I double-checked whether this module is installed on my PC. It is: I can use the DNN module from python and also compile a C++ file with the DNN module imported. So this does not seem to be the issue.

Rather it seems that the Fedora builds somehow exclude the face detection feature?

Any help is appreciated!

Thanks a lot for maintaining shotwell!

Facedetection used to require OpenCV 3 where DNN wasn’t packaged for Fedora etc. This has changed lately to work with OpenCV 4 which is packaged all around, but It’s still an opt-in compile time feature, though.

But the question should go to the Fedora maintainer of the package.

This has been reported as https://bugzilla.redhat.com/show_bug.cgi?id=1912134. Took a first look, and enabling the face detection component for the Fedora package doesn’t seem to be too complicated.

One question however: While the face detection component itself isn’t that big, it draws in a good amount of dependencies. Therefore, I’d like to move it to a sub-package that can be optionally installed. Now, how will main Shotwell behave when that subpackage isn’t installed and thus the dbus service isn’t present? Will it handle that situation gracefully?

You will get a slightly annoying message popup on start that the facedetect service cannot be started or found, I don’t remember the correct wording, otherwise it should work fine.

Note that the main problem would be the inclusion of some of the support files, especially the pre-trained model is quite large (see “extra-data” from below) and I still haven’t totally worked out if the licenses mix works out properly

https://gitlab.gnome.org/GNOME/shotwell/-/blob/master/flatpak/org.gnome.Shotwell.json#L237

Speaking of these three support files:

  • How are (should) these (be) handled for non-flatpak builds? Can’t find a reference to those in the build system. Would we simply treat them as separate source files copied to $datadir? Of course the license needs to be clarified (and compatible of course).
  • What happens when these files are missing? I briefly tried and it seems face detection even works (to some extent?) without them.

One of the reasons the faces support isn’t on by default is that I don’t have a good answer to your first question, but they should just go into datadir IIRC:

The DNN is required for recognition, detection works without

Regarding the licensing question for the three files: Is there already any initiative on clarifying?

Not yet, I just filed https://gitlab.gnome.org/GNOME/shotwell/-/issues/318 to track things