Ideal Location to Store Images in Codebase?

Thanh Trung Dinh dinhthanhtrung1996 at gmail.com
Mon Jun 29 20:43:25 BST 2020


Hi Kartik,

I've pulled your latest changes and compiled. When showing helpbox, I see
your face on tab "Face Detection" (top left corner), so I thought it
worked, didnt it?

Besides, I tested the features you described in your blog post. You've done
great job so far! In addition, I have some questions (Q) and comment (C).

For displaying person thumbnails as icon for each person tag:
*Q: *If a user has already some faces recognized (tagged) in a tag but the
tag does not have the icon yet. When the first time they use this new
feature, will the icon be selected randomly among those faces tagged
already? Or do they have to wait until they tag a new face for that tag?
*C: *For me, when I firstly tag a face to a tag, that face becomes the icon
for that tag. However, if I delete that face in the tags (and it's not the
last face remaining in the tag), that face is still the icon for that tag.
In my opinion, user can make mistake and wrongly select a face for a tag,
so when that face is deleted from the tag, the icon has to be chosen
randomly among other faces already tagged that remain in the tag.

For Helpbox:

*C: *

   - I think that you should not use your photo for helpbox. As Gilles
   said, you should not use faces of popular people, since there may be issues
   later. In my opinion, just put a face placeholder (like when you haven't
   set your avatar yet on Facebook for example), and put a name on it. User
   will understand anyway.
   - In Face Recognition tab, for your last sentence,
   Sensitivity/Specificity is not accuracy over speed actually. It works in a
   way that if you go towards Specificity (slide to the right), you ask the
   engine to recognize faces only when they are very close to tagged faces ->
   this leads to higher accuracy, but less faces recognized (since you require
   a high standard). If you go towards Sensitivity (slide to the left), you
   decrease the standard so more faces can be recognized but less accuracy.

So those are my questions and comments until now.

Cheers for your great work anyway,

On Sun, Jun 28, 2020 at 5:28 PM Kartik Ramesh <kartikx2000 at gmail.com> wrote:

> Sorry for the late reply,
>
> Maik, I tried to put my image in data/pics/digikam, however it still
> doesn't work. My intuition for this is that I'm missing some command (or
> CMAKE configuration) which actually installs the files mentioned in the
> CMakeLists. I assume this because my images don't show up  in
> /usr/share/digikam/data, where all other images show up. If I manually copy
> my files into /usr/share/digikam/data, then they do work as desired. I did
> touch the CMakeLists for data/pics/digikam, as you had suggested. Can you
> please try to add an image of your own in data/pics/digikam, and see if it
> shows up in /usr/share?
>
> Thanh, thanks for spotting the error. I've fixed it, but the error still
> remains, as mentioned in the last paragraph.
>
> Thanks for the help
> Kartik
>
> On Sun, Jun 28, 2020 at 5:11 PM Thanh Trung Dinh <
> dinhthanhtrung1996 at gmail.com> wrote:
>
>> Hi Kartikx,
>>
>> I've just pulled the repo and test. For me, you have some typo errors and
>> fixing those make it work as you want.
>> When you look in the cmakelists.txt you wrote in your facehelpdlg folder,
>> you wrongly named workOnAllCoresImg.png with workOnAllCores.png. In
>> addition, when you invoked, you wrongly named overlayImg.png with
>> OverlayImg.png
>>
>> Hope that it helps you save some of your time.
>>
>> On Sun, Jun 28, 2020, 13:36 Maik Qualmann <metzpinguin at gmail.com> wrote:
>>
>>> A subdirectory "facehelpdlg" would be clearer, however. I don't see a
>>> mistake
>>> without trying it. Treat CMakeList.txt once with touch.
>>>
>>> Maik
>>>
>>> Am Sonntag, 28. Juni 2020, 13:27:46 CEST schrieben Sie:
>>> > Hi Kartik,
>>> >
>>> > Copy your images to "core/data/pics/digikam/" and they will be
>>> installed
>>> > automatically. Touch the existing CMakeList.txt so that the build
>>> system
>>> > recognizes a change. You don't need your CMakeList.txt file.
>>> >
>>> > Maik
>>> >
>>> > Am Sonntag, 28. Juni 2020, 13:09:10 CEST schrieb Kartik Ramesh:
>>> > > Thanks for the response.
>>> > >
>>> > > Yes, I did make changes to both those CMake files. I've pushed to my
>>> repo
>>> > > as well:
>>> > > 1. Creating the subdirectory and subdirectory CMakeLists:
>>> > >
>>> https://invent.kde.org/graphics/digikam/-/commit/a176a264cf1776105491c7883
>>> > > aa 21ed6a1b492b1 2. Patching in parent CMakeLists:
>>> > >
>>> https://invent.kde.org/graphics/digikam/-/commit/ddb133af9aaabf58a90dd5c19
>>> > > 4e 145bdd6c7e6ff
>>> > >
>>> > > Then I run make in core/app followed by sudo make install just to be
>>> sure.
>>> > >
>>> > > I'm invoking my image as:
>>> > > QPixmap(QStandardPaths::locate(QStandardPaths::GenericDataLocation,
>>> > > QLatin1String("digikam/data/overlayImg.png")));
>>> > >
>>> > > After doing this, my image does not show up in
>>> /usr/share/digikam/data,
>>> > > where all the other images are present.
>>> > >
>>> > > Thanks again
>>> > > Kartik
>>> > >
>>> > > On Sun, Jun 28, 2020 at 3:21 PM Gilles Caulier <
>>> caulier.gilles at gmail.com>
>>> > >
>>> > > wrote:
>>> > > > Hi,
>>> > > >
>>> > > > If you store your image in a dedicated folder in core/data/pics/,
>>> with
>>> > > > a relevant CMakeLists.txt script inside, did you patch also the
>>> parent
>>> > > > core/data/pics/CMakeLists.txt file to include your directory while
>>> > > > configuring and installing ?
>>> > > >
>>> > > > Best
>>> > > >
>>> > > > Gilles Caulier
>>> > > >
>>> > > > Le dim. 28 juin 2020 à 10:16, Kartik Ramesh <kartikx2000 at gmail.com>
>>> a
>>> > > >
>>> > > > écrit :
>>> > > > > Hi Gilles,
>>> > > > >
>>> > > > > I've followed your instructions, and wrote a similar script for
>>> my own
>>> > > >
>>> > > > subdirectory.  However, the images I've added don't seem to show
>>> up in
>>> > > > the
>>> > > > Data Install directory. For my setup, the  images get installed in
>>> > > > /usr/share/digikam/data. This folder contains images such as
>>> > > > "sample-aix",
>>> > > > but my images don't show up here.
>>> > > >
>>> > > > > After writing the CMake scripts, I'm doing a make followed by
>>> make
>>> > > >
>>> > > > install. I think I'm missing some step.
>>> > > >
>>> > > > > Thanks
>>> > > > > Kartik
>>> > > > >
>>> > > > > On Sat, Jun 27, 2020 at 1:17 PM Gilles Caulier
>>> > > > > <caulier.gilles at gmail.com>
>>> > > >
>>> > > > wrote:
>>> > > > >> Hi Kartik,
>>> > > > >>
>>> > > > >> Data as embedded images are located in core/data/pics/
>>> directory.
>>> > > > >>
>>> > > > >>
>>> https://invent.kde.org/graphics/digikam/-/tree/master/core/data/pics
>>> > > > >>
>>> > > > >> You can create a new subdir for your images and install files
>>> on your
>>> > > >
>>> > > > >> system using cmake rules like this one :
>>> > > >
>>> https://invent.kde.org/graphics/digikam/-/blob/master/core/data/pics/bor
>>> > > > de
>>> > > > rpatterns/CMakeLists.txt>
>>> > > >
>>> > > > >> To load this image on demand in your dialog, this look simple
>>> like
>>> > > >
>>> > > > >> this using QStandardPaths::locate :
>>> > > >
>>> https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/dimg/fil
>>> > > > te
>>> > > > rs/decorate/bordersettings.cpp#L546>
>>> > > >
>>> > > > >> In Setup editor page, i embedded a photo to illustrate the
>>> over/under
>>> > > > >> exposure effect settings.
>>> > > >
>>> > > > >> Photo is here :
>>> > > >
>>> https://invent.kde.org/graphics/digikam/-/blob/master/core/data/pics/dig
>>> > > > ik
>>> > > > am/sample-aix.png>
>>> > > >
>>> > > > >> Code is here :
>>> > > >
>>> https://invent.kde.org/graphics/digikam/-/blob/master/core/utilities/set
>>> > > > up
>>> > > > /editor/setupeditoriface.cpp#L203>
>>> > > >
>>> > > > >> Best
>>> > > > >>
>>> > > > >> Gilles Caulier
>>> > > > >>
>>> > > > >> Le sam. 27 juin 2020 à 08:29, Kartik Ramesh <
>>> kartikx2000 at gmail.com> a
>>> > > >
>>> > > > écrit :
>>> > > > >> > Hello all,
>>> > > > >> >
>>> > > > >> > I am working on a help-box for users to help with using the
>>> Face
>>> > > >
>>> > > > Management Workflow. I have created a dialog-box which contains
>>> images.
>>> > > > Currently, I'm using images on my local machine, so I can use
>>> absolute
>>> > > > paths. What is the correct location in the code directory, where I
>>> > > > should
>>> > > > store these images?
>>> > > >
>>> > > > >> > Thanks
>>> > > > >> > Kartik
>>>
>>>
>>>
>>>
>>>

-- 
Mr. Thanh-Trung Dinh
Université de Technologie de Compiègne (UTC) - France
Tel: +33 7 53 68 20 29
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20200629/e6de6f01/attachment.htm>


More information about the Digikam-devel mailing list