How to use face detection on digiKam

digikam logo - a camera lens and aperture

Face detection on digicam not working? Not getting any results? Feeling like you’re just doing something wrong? Reading the manual doesn’t help?

I was in the same spot, and it turns that while the app is technically quite good, the design and user experience leaves something to be desired. So here’s a guide that should hopefully help clear up any misunderstandings, and get your photos tagged.

  1. Install digiKam. This is a photo gallery management tool made for the KDE suite of apps. You can tell because it’s got that random K shoehorned into the name. You can get it from their website or most app repositories.
  2. Install the face detection libraries. These can be large, and may be updated outside of the app, so need to be installed separately.
    1. Restart the app. digiKam should find and download these on first run, and give you a prompt asking you to,if it hasn’t got the files.
    2. Turn on a VPN or use a proxy to a different location. It’s buggy and if the first download mirror fails, it gives up. Pretending to be somewhere else helps.
    3. If that fails, manually download the following files from this site:
    4. These are the files to download and put in a folder called facesengine in your digiKam app data directory
      • deploy.prototxt
      • openface_nn4.small2.v1.t7
      • res10_300x300_ssd_iter_140000_fp16.caffemodel
      • shapepredictor.dat
      • weights_inceptionv3_299.pb
      • yolov3-face.cfg
      • yolov3-wider_16000.weights
  3. Detect faces. This goes through your photos and find things that generally look like faces. In the right panel, Go to Albums, select the main root album, right click and choose “scan for faces”
  4. Perform initial manual tagging. Once the app has found some faces, you need to help it recognise who the faces are.
    1. In the right panel, go to people
    2. Select unknown
    3. Select a frequently occurring face
    4. Type a name (stick to regular basic latin characters)
    5. Click the tick ✓
    6. Select this person’s other faces
    7. On each, it will autofill that name (be careful not to accidentally tag people, I find it isn’t as easy as it should be to undo a mis-tag)
    8. Press the tick ✓ on a few of that person’s photos (a set of more diverse looking angle, makeup, lighting will give better results)
    9. Repeat these steps for all the frequently occurring people you want to tag
    10. If you spot anything that isn’t a face, or someone infrequent you don’t want to tag, press the deny ø icon
  5. Run auto-recognition. In the right panel, at the bottom of the people panel there is a workflow tab.
    1. Turn it to recognise mode. The wording is a bit confusing: Detection means spotting face-like areas in photos, recognise means matching similar looking faces together.
    2. Make sure you’ve selected some places to scan. Go to the search in tab, and select all albums and recursive to do everything. If you want to do it album by album, select the albums in the dropdown (it will be enabled if you uncheck all albums).
    3. Go to the settings tab next to workflow. By default, the accuracy will be set to 100%. This will cause the recogniser to fail, because unless you have duplicate photos there will be no exact matches. Tune it down to about 75%.
    4. Press scan collection for faces.
  6. Double-check the auto recognition. In the people panel on the right, the faces you manually tagged will appear as collections. Click on one of these to see the auto recognised matches. You need to confirm or deny these to help improve the recogniser.
    • Use the tick ✓ to confirm a match
    • Use the minus — to deny a match, it will be placed back in the unknown area
    • Use the deny ø to remove something that is not a face
    • The thumbnail view may jump around a lot, you can save yourself bother by ctrl+click or shift+click selecting a large range of valid answers and then pressing the tick ✓ on the last selected thumbnail. You may need to move the mouse outside the gallery area and back over the last selected photo for the buttons to show.
    • Repeat these steps for the auto-suggestions in each of your people categories
  7. Repeat and refine. It’s likely this first pass won’t find everything. Go back to the unknown people collection, and select more matches of people you want to tag. Again, picking more diverse angles, lighting, and presentation will help the matcher. You can then re-run the recogniser to find people. Playing with the accuracy may help.

Hopefully these steps help you build up a nicely tagged family and friends photo album. Something I really like about digiKam’s approach is once the model is downloaded, it can be run entirely offline, with no photos or privacy sensitive data shared to online sources.

I still remember the gold standard was in an app called picasa. It was impressive for many reasons:

  • It just worked, the user experience was excellent, no fiddling with settings or downloads
  • It worked before the modern era of cloud-everything, ai-everything
  • I remember initial tagging and the whole workflow being much smoother

In time, I expect digiKam should resolve some of these usability issues, and I hope it will become like that gold standard.

Join the Conversation

Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.