SUMMARY This only applies to some pictures. I have not figured out the pattern yet. When you add a face rectangle to a picture, these changes are saved into the picture (and digikam's database). However, when you delete a face rectangle, changes are not saved. You can check that by re-reading the metadata from file, and the deleted face rectangles will appear again. STEPS TO REPRODUCE 1. Delete a face rectangle from a picture. 2. (wait a couple of seconds) 3. Item / Re-read metadata from file. OBSERVED RESULT - The deleted faces appear again. EXPECTED RESULT - Deleted faces should have been deleted from the picture. SOFTWARE/OS VERSIONS digikam-7.0.0-beta2-20200124T055125-x86-64.appimage in Ubuntu 18.04LTS with Unity.
Marc, this problem cannot be reproduced here. Not even with my slower network share. The writing process may not have been completed before you reread the metadata again. Without a test image with which the problem can be reproduced and the output from the console, we cannot do anything here. Technically, we delete all facial rectangles in the metadata before we write new ones. Maik
I just tested here to try to reproduce the problem with my NAS, and i cannot as Maik said... Gilles Caulier
That is weird, but I can't tell for sure what is causing it. Yesterday I was correcting many duplicated faces (since the bug about the mispositioned faces was solved, but I had already rescanned those pictures for faces...), so basically I had to delete existing faces from images. I actually tried in two different computers, with the same result (using the last beta2 available in both). Basically, from the People panel, I select a person to see his/her faces. When you add, rename, or reposition a face in a picture, changes get saved immediately (I can see the progress bar at the bottom). However, if you just delete a face from a picture (preview view), changes are not saved. You have to manually write metadata to the file. (If you add or rename a face after deleting another one, then the metadata gets saved just fine). It's not always consistent, since I remember this didn't happen in the past. But it's there >90% of the time. Maybe it only happens if the picture has been opened from the people panel? I don't think it depends on the particular picture either. Anyway, I will try to narrow it down later today when I'm at home. I'll attach a sample picture so you can test it too
You write that when you delete a face, the metadata is not saved and you have to do it manually. This is not correct, even when deleting a face in preview mode, the metadata is saved immediately. I currently have the Windows version here and it works as expected there too, I can reread immediately, but the face does not come back. Maik
Created attachment 125467 [details] group-of-people-clapping-X6D3M1.jpg
Ok, I finally found out what was happening, because sometimes when deleting faces changes were saved, and other weren't. It turns out the problem only arises when there is a duplicated face rectangle in a picture. In my case, I was deleting duplicated face rectangles that appeared as a consequence of re-scanning the images when Bug 372340 was present, so everyone had two face rectangles, a "landscape" one, and a "portrait" one (because of the incorrect rotation of the picture), where one of them was usually pointing at the sky or another background element. Let' say there are two Person 1 and one Person 2 rectangles in an image (use attached file as an example). If you delete the face of Person 2, changes will be written (Item/re-read metadata, just to confirm this). If you delete a face of Person 1 (any of them), changes will NOT be written (if you re-read the metadata, the face will reappear). Having the same person twice or more times in a pictures is not common, but it can happen. For instance, someone looking himself at the mirror, or a photo with a framed picture of that person in the background. I captured the whole thing in video: https://imgur.com/a/W6nIo5r
Interesting problem ((:-)) Since the tag still exists a second time on the image and is a confirmed face, it is not removed from the image and therefore no metadata is written because there have been no changes to the tags... Maik
I would like to confirm that the issue is still present in 7.2.0. I can confirm that changes will not be written if the photo has *two* face rectangles of the same person, and *one* of the rectangles is removed. Even worse: I tried to force metadata update by moving the *second* rectangle by a few pixels. Metadata has been written to the file as I was able to observe in the progrss bar. After completion of the write process, I triggered re-reading of the metadata: The removed face rectangle was back again! :-(
What's about to use 7.3.0 pre-release available here: https://files.kde.org/digikam/ Problem still reproducible ? Gilles Caulier
(In reply to caulier.gilles from comment #9) > What's about to use 7.3.0 pre-release available here: > > https://files.kde.org/digikam/ > > Problem still reproducible ? > > Gilles Caulier Well, I would need a second computer to install 7.3.0, wouldn't I?
The problem still exists as it is very rare and I want to fix it "cleanly" without a hack. I'll check it out again soon. Maik
No need a second computer. Use AppImage Linux bundle which include all in place in memory and do not install file on your computer. Just get the appimage version, change file as executable, and run it.
(In reply to caulier.gilles from comment #12) > No need a second computer. Use AppImage Linux bundle which include all in > place in memory and do not install file on your computer. Just get the > appimage version, change file as executable, and run it. I was quite cumbersome, but finally I managed to run the appimage in the Windows/Linux subsystem... * installation of the Linux subsystem, installation of Ubuntu within the subsystem * installation of an X server on Windows, configuring it * extracting the appimage because it can't be mounted * installing a bunch of libraries * and some more tweaking The rendering will not be optimal with this setup, e.g. the face labels and edit buttons will not be visible on the preview, and only parts of the face rectangle. The tooltips of the confirm and remove buttons will be shown, this helped me locating them... Alright, back to topic: It seems better now but not completely solved: I have some test photos. On those, the same faces are tagged twice because I used different programs originally (WLPG and Picasa). When I remove one of the rectangles with digikam, it will be removed from the database but not from the file. The removed rectangle will re-appear when I reload the metadata. When I remove one of the rectangles and modify the other (move by a few pixels), the removed one will not re-appear after reloading of metadata. I've checked this with exiftool: Original file and file after removing one face rectangle will prduce the same output: > exiftool test1.JPG | grep -i region Region Name : Name A, Name A, Name B, Name B Region Type : Face, Face, Face, Face Region Area X : 0.54475, 0.5435, 0.433375, 0.4345 Region Area Y : 0.4145, 0.431667, 0.283333, 0.297 Region Area W : 0.1095, 0.0575, 0.11425, 0.0645 Region Area H : 0.174333, 0.0766667, 0.183333, 0.086 After moving one other rectangle a bit: > exiftool test1.JPG | grep -i region Region Name : Name A, Name A, Name B Region Type : Face, Face, Face Region Area X : 0.5435, 0.54475, 0.432625 Region Area Y : 0.431667, 0.4145, 0.288 Region Area W : 0.0575, 0.1095, 0.11425 Region Area H : 0.0766667, 0.174333, 0.183333
I removed the "AppImage Linux" platform tag because I obseved the issue on Windows. I used the AppImage only to check whether the issue was still present in a development build.
Git commit 0bbcbe94f5e67c34290486f03c9d66c75072928e by Maik Qualmann. Committed on 11/07/2021 at 16:00. Pushed by mqualmann into branch 'master'. add workaround to write metadata if duplicate face tags are removed FIXED-IN: 7.4.0 M +2 -1 NEWS M +10 -3 core/libs/database/tags/facetagseditor.cpp https://invent.kde.org/graphics/digikam/commit/0bbcbe94f5e67c34290486f03c9d66c75072928e
This is scheduled for 7.4.0. When will the release be available?