1

I have added face tags to a set of 800 pictures using digikam. I will receive the same set of pictures in higher resolution next week and wanted to know if and how I can copy these face tags from the first low resolution set to the second high resolution set.

I am running Kubuntu 18.04. My digikam version is 5.6.0. I don't have a problem using other software. I do not want to use any service/program that would involve uploading these tags to the internet.

2

As long as none of the smaller set of images have been cropped and only are resized, you should be able to do it with Exiftool.

From my brief search, it looks like digikam saves the faces tags to the MWG XMP tags. The basic command to copy would be:

exiftool -TagsFromFile SmallFile -RegionInfo LargeImage

If the filenames are the same, then you could do it in batch with a command like this:

exiftool -TagsFromFile /Path/to/Smalls/%F -RegionInfo /Path/to/Larges

If the names are different, then the commands would have to be altered a bit but it should still be doable.

This command creates backup files. Add -overwrite_original to suppress the creation of backup files. Add -r to recurse into subdirectories.

The way MWG regions (face tags) work is X/Y coordinates and the height/width of the region are saved as number from 0 to 1 and used as a percent of the images actual height/width. This means that they will correctly locate the face as long as the image has not been cropped or flipped. Also, it is assumed that the location is relative to the top left of the image as indicated by the Orientation tag embedded in the image. This allows the regions to be resistant to changes in size, as long as no cropping takes place, and rotation, as long as the Orientation of the image is properly updated.

For further info, see the MWG Guidelines for Handling Image Metadata pdf on the subject (pages 51-56).

  • +1 because the answer is clear and seems correct. Cannot accept yet as I do not have the high resolution images to check. – Bruni Jul 20 '18 at 6:32
  • 1
    If you have problems, come on over to the Exiftool forum and we should be able to help you out. – StarGeek Jul 20 '18 at 14:44
  • finally got the files. Unfortunately I get Warning: No writable tags set from /home/bruni/Pictures/xyz.jpg – Bruni Sep 18 '18 at 15:20
  • removing the -RegionInfo resulted in indeed copying the exifdata. (They are shown under IPTC Keywoards as in the small files) However, the "face tag frames" are not shown. – Bruni Sep 18 '18 at 15:37
  • You have to explicitly tick face tag frames in the settings of digikam to be saved in the file metadata. Then the answer works perfectly. – Bruni Jul 8 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.