Bug 438317 - Annoying download binary message at startup
Summary: Annoying download binary message at startup
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Engine (show other bugs)
Version: 8.0.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-09 11:36 UTC by maderios
Modified: 2023-12-04 22:33 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.3.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maderios 2021-06-09 11:36:54 UTC
I think it would be useful not to see message "Download Requires Files ..." at startup, not having to choose between "Download" and "Cancel". Some people, like me, use neither "face engine" nor red "eyes removal". I don't need these huge binaries.
Comment 1 Maik Qualmann 2021-06-09 13:42:55 UTC
Face detection/recognition is an integral part of digiKam, the download is necessary, the binary files must be available. We also cannot simply deactivate it as it is linked to many components in digiKam. In the past you always downloaded the files in the bundle with each new digiKam version. Now all you have to do is do it one more time.

Maik
Comment 2 maderios 2021-06-09 15:01:39 UTC

(In reply to Maik Qualmann from comment #1)
> Face detection/recognition is an integral part of digiKam, the download is
> necessary, the binary files must be available. We also cannot simply
> deactivate it as it is linked to many components in digiKam.
Yes but after deactivating it at each startup, digikam works normally without it. That's why i think message at startup could be an option. 

> In the past you
> always downloaded the files in the bundle with each new digiKam version. Now
> all you have to do is do it one more time.
I used bundle one or two times, just to test. I don't know if these binaries were in git master source code or/and compiled packages.
Comment 3 Maik Qualmann 2021-06-09 15:48:29 UTC
(In reply to maderios from comment #2)
> Yes but after deactivating it at each startup, digikam works normally
> without it. That's why i think message at startup could be an option.

Yes, digiKam would crash if you started face recognition, I have to fix it.
 
> I used bundle one or two times, just to test. I don't know if these binaries
> were in git master source code or/and compiled packages.

Yes, the binary files were recently part of the source archive, it was 1GB in size and the KDE admins didn't like it either.

Maik
Comment 4 Taras 2022-02-08 19:29:00 UTC
Another bad thing with such feature implementation that it breaks package manager use experience in Linux distros. When you install digikam via  package manager you suppose that you can run the application. Even without the Internet.

Please, consider to make possible for the use to switch off this option on the first start.
Comment 5 Maik Qualmann 2022-02-08 20:17:15 UTC
The dialog can be canceled, it will be displayed again at the next start. Other applications also download data that are not installed with the package manager, e.g. Marble, which is also included in digiKam. This download saves downloading several 100 MB with every new digiKam version.

Maik
Comment 6 Taras 2022-02-08 20:44:40 UTC
> The dialog can be canceled, it will be displayed again at the next start. 
Yes, but it pretty annoys if you don't want to download it. Like shareware banners in the early 2000s.

> Other applications also download data that are not installed with the package manager
It is not really common in the world of linux distro package managers. E.g. if you install it with `dnf install digikam` it should simply run. And it was so for digikam sometime ago.

> This download saves downloading several 100 MB with every new digiKam version.
It's clear and good purpose but there are people who don't want do download anything against the linux distro repository package. Plus some don't use Face detection feature at whole.
Comment 7 Maik Qualmann 2022-02-08 21:39:24 UTC
Git commit 67235cd937a355e0b636be45fae304135f76ce25 by Maik Qualmann.
Committed on 08/02/2022 at 21:38.
Pushed by mqualmann into branch 'master'.

fix crash when face data is missing

M  +5    -0    core/libs/facesengine/preprocessing/recognition/openfacepreprocessor.cpp

https://invent.kde.org/graphics/digikam/commit/67235cd937a355e0b636be45fae304135f76ce25
Comment 8 James Tuttle 2022-02-09 01:58:20 UTC
As a user new to Digikam, I find the "download at first launch" to be pretty poor UX, all things considered.

If these components really are core features of Digikam (and I think they are), then they should be packaged into the Digikam installer.  The built-in downloader doesn't seem to work very well (I am having trouble getting it to not continually try to download from non-functional KDE mirrors) and seems like a case of misplaced optimization.

Bandwidth is cheap. Users' time is expensive.  I have already spent far more time sitting in front of my computer, continually clicking on "Try Again", than it would have taken just to include these extra files in the core installer that I downloaded when I decided I wanted to try Digikam.  To save someone some theoretical bandwidth when upgrading, the process has instead wasted my time.  This doesn't seem great.

Furthermore, it's not even clear to me that this design actually saves bandwidth. It does in one particular case (that of upgrades, apparently), but would be strongly counterproductive if you were, say, installing a whole lab's worth of computers with Digikam. There, you'd want to download the installer once, distribute it locally, and install it on each machine. Having each machine then go online and download the same files over and over isn't great. I suspect a case like this (where the installer is passed around locally via removable media, file shares, etc.) is pretty common in low-bandwidth environments.

It's annoying and a poor introduction to Digikam for new users, wastes human time, isn't especially reliable, and the benefit to users with limited-bandwidth connections seems arguable at best. Definite misfeature, IMO.
Comment 9 Maik Qualmann 2022-02-09 07:05:33 UTC
There is no way around downloading it. When some files were still part of the source code, the KDE admins recommended us to look for another way since the source archive was already reaching 1GB. Certainly like in the Windows installer and MacOS package and AppImage could include these files. But Windows users in particular have described the large installer as "deterrent" in forums. Also consider that high bandwidth is not available in all regions of the world to have to download it with every new version.

Maik
Comment 10 Maik Qualmann 2022-02-09 07:39:00 UTC
Git commit 33d3792539af018877063879877bf3fb26942088 by Maik Qualmann.
Committed on 09/02/2022 at 07:38.
Pushed by mqualmann into branch 'master'.

prevent openCV exceptions with missing face data

M  +2    -1    core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryolo.cpp

https://invent.kde.org/graphics/digikam/commit/33d3792539af018877063879877bf3fb26942088
Comment 11 Taras 2022-02-09 07:46:14 UTC
> There is no way around downloading it.
...
> Yes, digiKam would crash if you started face recognition, I have to fix it.

What about moving dialog  "Download Requires Files ..." to this exception handling? So user can start digikam without asking to download heavy external blobs and will do it if he really want to use this feature.
Comment 12 caulier.gilles 2022-02-09 08:35:30 UTC
Note : NSIS packager for Windows that we use is limited to 32 bits and cannot package more than 2Gb of data in one exe file.
this is problematic to provide a debug symbols version which explode by 5-10 the size of binary. If we host DNN model files in installer, I'm sure that we will have a problem. NSIS provide a solution for big data but this require to rewrite and test the NSIS script and to include an extra plugin DLL. An i'm against to do it for security reasons. 

Gilles Caulier
Comment 13 caulier.gilles 2022-02-09 08:38:32 UTC
A non blocking message as one used with fuzzy search about to build finger-prints is the better solution.

But the face engine code must be more mature to resist of a start of face algorithms if data model files are not present. This case is simple : user refuse to download big data model and start face detection for ex.

Gilles Caulier
Comment 14 Maik Qualmann 2022-02-09 17:35:21 UTC
Git commit 415b83c594cbe56aa948cfe380a00b9b19d729aa by Maik Qualmann.
Committed on 09/02/2022 at 17:34.
Pushed by mqualmann into branch 'master'.

prevent openCV exceptions with missing face data #2

M  +2    -1    core/libs/facesengine/recognition/opencv-dnn/dnnfaceextractor.cpp

https://invent.kde.org/graphics/digikam/commit/415b83c594cbe56aa948cfe380a00b9b19d729aa
Comment 15 Lukas Jirkovsky 2022-02-10 07:46:56 UTC
What about solution similar to how wine handles it's gecko and mono packages? They can be installed system-wide using package manager, or automatically during first startup. The face recognition data can be released separately from digiKam.

* the face recognition data would be released separately from digiKam, so they don't have to be updated with every digiKam release
* digikam would have to check both system folder and user folder
* nice to have: have the notification less obtrusive, something like the notifications in kate eg. when you reload a file.
* nice to have #2: if the files are not available, disable the affected functionality and notify user that they need the data when they try to use it.

This would improve at least the following use cases:
* users that manage multiple computers would download the system-wide package once and install it everywhere
* shared computers - the system-wide package would need to be installed only once rather than for every user
* users of linux distros that prefer to use packages to download&install stuff
* windows users and any other users that doesn't care about downloading data separately would download the data on startup if they wanted to
* in the system-wide install scenarios, digiKam updates would not require re-downloading the data, because they would be released separately
Comment 16 John Andrew McInnes 2022-03-27 22:23:41 UTC
I have to agree with the other comments. I just googled 'disable digikam binary download' and ended up here. Couldn't we have  a checkbox by the Cancel button that says like 'dont ask me again' ?

An opensource photo manager downloading stuff without asking, from who knows what site, just feels wrong. Doing it through the disto package manager would be so much better. I've used digiKam for many years and I have never used the face detection or redeye stuff. No offense, thanks for all your hard work on this software.
Comment 17 Maik Qualmann 2022-04-23 10:41:12 UTC
*** Bug 452892 has been marked as a duplicate of this bug. ***
Comment 18 Maik Qualmann 2022-04-25 19:43:11 UTC
Git commit d5c910dabfdbfafd1f7205b0fbecbd362d7f52a8 by Maik Qualmann.
Committed on 25/04/2022 at 19:41.
Pushed by mqualmann into branch 'master'.

add "don't ask me again" option to the face data downloader
In the digiKam system settings there is a button to
start the downloader dialog manually.

M  +9    -7    core/app/main/main.cpp
M  +9    -5    core/showfoto/main/main.cpp
M  +17   -1    core/utilities/setup/downloader/filesdownloader.cpp
M  +7    -8    core/utilities/setup/system/systemsettings.cpp
M  +2    -1    core/utilities/setup/system/systemsettings.h
M  +41   -16   core/utilities/setup/system/systemsettingswidget.cpp
M  +4    -0    core/utilities/setup/system/systemsettingswidget.h

https://invent.kde.org/graphics/digikam/commit/d5c910dabfdbfafd1f7205b0fbecbd362d7f52a8
Comment 19 Maik Qualmann 2022-05-29 17:44:43 UTC
*** Bug 454580 has been marked as a duplicate of this bug. ***
Comment 20 Maik Qualmann 2023-05-06 11:53:30 UTC
Git commit ec132502dcbc91aaab75acda390b7109533ffb82 by Maik Qualmann.
Committed on 06/05/2023 at 11:52.
Pushed by mqualmann into branch 'master'.

make face engine data centralizable

M  +7    -8    core/libs/dimg/filters/redeye/redeyecorrectionfilter.cpp
M  +6    -7    core/libs/facesengine/detection/opencv-dnn/dnnfacedetectorssd.cpp
M  +6    -7    core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryolo.cpp
M  +6    -7    core/libs/facesengine/preprocessing/recognition/openfacepreprocessor.cpp
M  +8    -9    core/libs/facesengine/recognition/opencv-dnn/dnnfaceextractor.cpp
M  +6    -6    core/libs/imgqsort/detectors/aesthetic_detector.cpp
M  +16   -6    core/utilities/setup/downloader/filesdownloader.cpp

https://invent.kde.org/graphics/digikam/commit/ec132502dcbc91aaab75acda390b7109533ffb82
Comment 21 Maik Qualmann 2023-12-04 22:33:10 UTC
Git commit cd62301502194c2d31b85c8b03a4e91609affafd by Maik Qualmann.
Committed on 04/12/2023 at 23:31.
Pushed by mqualmann into branch 'master'.

give the user the choice of which features they want to use and download
FIXED-IN: 8.3.0

M  +1    -1    NEWS
M  +1    -1    core/app/main/main.cpp
M  +1    -1    core/showfoto/main/main.cpp
M  +190  -124  core/utilities/setup/downloader/filesdownloader.cpp
M  +3    -0    core/utilities/setup/downloader/filesdownloader.h
M  +30   -9    core/utilities/setup/misc/systemsettings.cpp
M  +5    -1    core/utilities/setup/misc/systemsettings.h
M  +2    -2    core/utilities/setup/misc/systemsettingswidget.cpp

https://invent.kde.org/graphics/digikam/-/commit/cd62301502194c2d31b85c8b03a4e91609affafd