People View¶
Als u niet alleen machines of sterren fotografeert, dan zou Gezichtenbeheer een nuttige functie voor u kunnen zijn (zelfs machines kunnen een menselijke operator hebben). In digiKam omvat deze functie twee hoofdtaken: Gezichtsdetectie en Gezichtsherkenning.
The face management workflow helps you identify and recognize people in your photos by using deep-learning neural networks. Face Detection identifies faces that appear in your images, which is a necessary step before recognition. Face Recognition then automatically identifies people in your photos, but it requires initial training by labeling a few detected faces with the corresponding names.
Belangrijk
For face management to work correctly, digiKam needs to download the deep-learning models from the web. These files can either be downloaded when digiKam is first run (see the Quick Start section for details), or the files can be downloaded by clicking on the Download required binary data button on the page.
Gezichtsdetectie¶
The first step is to let digiKam locate all the photos containing faces, without yet identifying who they belong to. To begin, click on the People tab in the left sidebar. At the bottom, you’ll find a settings view with a drop-down menu where you can select from various options:
Skip Images Already Scanned: Select this option for your first scan, or if you want to scan new images.
Scan Again And Merge Results: Select this option when you have changed settings. This will re-scan all images selected in the Search in tab, which can be time-consuming.
Clear Unconfirmed Results And Rescan: Select this option when you have changed settings and want to delete all unnamed faces from the database. This will re-scan all images selected in the Search in tab, which can be time-consuming.
The first option is the default for normal operation. Use it for your initial face detection scan or when you add new images to your library. The second and third options should be used when you change settings that affect the face detection results. These options do not affect the process of recognizing faces.
For this task, make sure to select Detect faces. Since face detection is time-consuming, it’s better to limit the scan instead of scanning right away. In Search-in, you can limit the scan to specific albums or tags. See the Search-in section for more information.
After carefully selecting your options, click Scan collection for faces. Depending on the scope of your selection, it may take a little while for the results to appear in the Image Area. In the Tags list on the Left Sidebar, you’ll see the People branch of your tag tree. To view the entire set of identified faces, ensure the topmost tag People is selected. You’ll also notice a new virtual tag called Unknown, which includes all images where faces have been detected but not yet assigned to a person. If this is your first scan, you’ll find the entire set of identified faces here as well.
Note that the thumbnails presented here do not show the whole image. They show the area of the image where the face detection model added a Face Tag. You can see the whole image if you click on the thumbnail. In the preview that opens, you will see the whole image with all the face tags on them. If you don’t see them, click the people button in the upper left corner of the preview. If there is more than one face tag on the image it will also be represented by more than one thumbnail.
The list of detection samples below comes from a huge collection of photos scanned by digiKam.
ID |
Voorbeelden van gezichtsdetectie |
Commentaar |
---|---|---|
01 |
Een onderbelicht gezicht |
|
02 |
An animal face |
|
03 |
A blurry child face |
|
04 |
Een niet-menselijk gezicht |
|
05 |
A very blurry and partial face |
|
06 |
Een gedraaid gezicht |
|
07 |
A face covered with a hood |
|
08 |
A face in profile |
|
09 |
Een onderbelicht en gedeeltelijk gezicht |
|
10 |
Een vals-positive detectie |
|
11 |
An animal face |
|
12 |
Een gezicht bedekt met een racket |
Screenshots 02 and 11 were selected to highlight an important feature: the algorithm can detect animal faces. This is not a false positive, unless you specifically want to see only human faces in your collection.
Screenshot 10 is an incorrect (false positive) result, demonstrating that the algorithm sometimes identify details in an image that resemble a face but are not actually faces. This is where the Remove button comes in handy. It removes the face tag from the photograph, and if it is the only face tag remaining, the photograph will disappear from the scan results.
Screenshots 01, 03, 05, 08, 09, and 12 may be considered non-faces or can be filtered out by increasing the detection accuracy setting in the face management Settings view. However, these examples demonstrate the algorithm’s ability to detect faces even in challenging conditions.
Screenshot 04 shows the model can detect other non-human faces in images, including statues, paintings, and pictures within images.
After the detection scan is complete, you should see a new tag labeled Unknown under People in the People view. You must manually tag some of these faces before proceeding with face recognition.
Face Tagging¶
Assigning People tags to face tags is a crucial step for Face Recognition. digiKam can only recognize faces if it has reference faces for comparison. It’s your job to train it by identifying faces, such as labeling them as Lara, Juan, Peter, etc. Usually, you only need to manually tag one face for a person for the recognition process to identify additional faces.
After performing a detection scan as described in the previous section, you select the Unknown tag on the Left Sidebar.
In the field labeled Who Is This? you can either type in the name of an existing People tag out of your tag tree or use the drop-down function to show your tag tree and select a tag. You can also apply the same tag to multiple faces at the same time. Confirm saves the name to the database and moves the thumbnail from Unknown to the face tag.
Notitie
Using the context menu item Assign Tag instead of the procedure described above will not assign a face tag. Instead, it will assign a regular tag to the entire image.
Once a face tag is confirmed, digiKam only shows the name without the buttons to remove, edit, or confirm. If you need to edit or remove a confirmed face tag, simply double-click on the name and the buttons will reappear.
For more information about automatic face tagging using digiKam’s face recognition engine see the next section of this manual.
You can manually tag people in different ways:
From the Unknown tab in the People view: hover on any Unknown face from the icon-view and use the text box to assign a name. This will create a new face tag in the case of a person whose name hasn’t already been entered.
From Left Sidebar People tab: use drag and drop between the icon-view and the face-tags tree view. Select items labeled Unknown that you want to assign a face-tag. Perform a move with the mouse to the People items hierarchy. A pop-up menu will appear to confirm the face assignment.
From keyboard shortcut: you can assign a magic key to a face-tag and quickly use the keyboard to assign the face-tag name to selected items.
In case there’s a face you don’t wish to be recognized, you can mark it as ignored. This leads to the creation of a new Ignored tag. This is reversible, you can later unmark the face if needed.
In addition to tagging auto-detected faces, you can manually add a face region:
From Preview Mode: click on Add a Face Tag icon or select the option in the context menu, as highlighted in the screenshot below.
Then draw a rectangle around the face while holding the left mouse button followed by entering the person’s name and pressing Enter key. If you press Esc key, this will exit the person’s name editor.
Notitie
In plaats van klikken op het pictogram Een gezichtstag toevoegen kunt u een gezichtsgebied tekenen met ingedrukte toets Ctrl.
The Preview Mode context menu also includes two other options for manual face tagging:
Scan For Faces: This option triggers the face detection algorithm to automatically identify and mark face areas on the image. By default, these faces are labeled as Unknown in the database. The process uses the most recent Face Detection settings. If faces are detected, you can manually edit the face names as previously described.
Show Face Tags: This displays the visible face tag areas and automatically switches to edit mode when the mouse hovers over them.
Notitie
In de weergave Diversen gedrag van de configuratiedialoog, kan een optie aangezet worden om alleen de boomstructuur van tags te bevolken met de toegekende gezichtstags aan een gezicht terwijl u een naam invoert.
Gezichtsherkenning¶
Once you have assigned a tag to a few photographs, you can have digiKam try to match Unknown faces with similar faces that have already been confirmed (tagged). To start this process, go to the workflow tab, select Recognize Faces, and then click Scan Collection For Faces. The process will tag similar detected faces with the appropriate People tag from your tag tree, and the corresponding thumbnail will disappear from the Unknown tag selection. The thumbnail will appear in the Unconfirmed tag section and will be added to the suggested face tag section.
Face Recognition is faster than Face Detection but it still makes sense to use the Search-in tab to restrict the scan to certain albums or tags in the Albums tab, such as the Unknown tag. See the Seach-in tab.
Notitie
Gezichtsherkenning werkt goed met gezichten die automatisch zijn gedetecteerd door digiKam, niet met handmatig getekende gezichtsvierkanten of gezichten uit andere programma’s.
The results of new facial recognition appear as Unconfirmed results. These results will be marked with the Unconfirmed tag and the tag of the person suggested for each face. To complete the recognition process, you need to Confirm the newly recognized faces. Once confirmed, these faces will be permanently moved to the appropriate face tag. Hovering over unconfirmed faces will display several options:
The Confirm button allows you to save the suggestion. This assigns the suggested name to the face.
The Reject button moves the face back to Unknown if the suggestion is incorrect.
The Delete button removes the face region from the database if the suggestion is not a face.
By default, faces are categorized based on their name. You can change this behavior by going to
. Using a different categorization order will result in Confirmed and Unconfirmed faces appearing mixed together. To adjust this, you can modify the sorting order within each category by going to .Notitie
digiKam does not keep a record of rejected faces. The same face might be suggested in future recognition scans. To avoid this, you can either label the face with a new name or choose to ignore it.
How recognition works¶
Face recognition in digiKam is cumulative. When more faces are confirmed to a tag name, digiKam can find more faces that are similar. When first building your library, it may take several recognition scans of your library to recognize all of the similar detected faces. This allows digiKam to learn different aspects of faces, and helps it to recognize the same person at different ages.
Voorbeeld 1: een plaatje van een gezicht van voren komt overeen met gelijke gezichten die iets opzij zijn gedraaid. Gezichten iets opzij gedraaid zullen overeenkomen met gelijke gezichten vrijwel geheel opzij gedraaid. Gezichten vrijwel geheel opzij gedraaid zullen overeenkomen met gelijke gezichten in volledig profiel.
Voorbeeld 2: een plaatje van een kind zal overeenkomen met gelijke gezichten wanneer het kind ongeveer dezelfde leeftijd heeft en wanneer het kind een jaar of twee jonger en ouder is. Gezichten van het kind wanneer deze een paar jaren jonger of ouder zullen zijn komen overeen met gelijke gezichten wanneer ze nog jonger of ouder zijn.
Belangrijk
It is recommended you run several Recognize Faces scans when you are first building your library. Carefully review and confirm the suggestions between each scan.
The accuracy of face recognition is very high once you have built and trained your library.
Belangrijk
Carefully review face name suggestions before confirming them. A single incorrect confirmation can lead to numerous inaccurate suggestions from the face recognition system.
To improve face recognition results, in addition to adjusting the settings mentioned below, you can also improve accuracy by rebuilding the training data. This can be achieved by navigating to
and selecting Rebuild all training data.Search-in Tab¶
The Search-in tab lets you choose which albums and image tags to include in a scan. You can select specific albums or tags for detection and recognition.
For detection, digiKam will scan the images selected in the filter for faces.
Voor herkenning zal digiKam proberen Onbekend overeen te laten komen met gezichtstags Onbevestigd in de afbeeldingen die zicht bevinden in het filter met alle bevestigde gezichtstags.
Tabblad Instellingen¶
Het tabblad Instellingen laat u de resultaten uit detectie en herkenningsscans fijn afregelen. Hier kunt u de detectie- en herkenningsmodellen aanpassen, de nauwkeurigheidsniveaus instellen en gezichtsherkenning configureren voor speciale gevallen. Daarnaast kunt u de load van de processor gebruikt voor gezichtsdetectie en herkenning besturen. De standaard waarden zijn voorzichtig gekozen voor normaal gebruik na uitgebreid testen op meerdere gegevenssets, inclusief standaard industriegegevenssets zoals LFW en persoonlijke gegevenssets.
Notitie
Beginnend met digiKam 8.5.0, is YuNet het aanbevolen model voor gezichtsdetectie en SFace is aanbevolen voor gezichtsherkenning.
Instellingen voor gezichtsdetectie¶
For Face Detection, there are 3 settings the user can adjust to control how digiKam determines if there is a face in an image.
Accuracy: Lower accuracy settings may detect more faces in an image, but it will also increase the number of incorrect areas identified as faces (false positives). The default setting of 7 is recommended for normal use.
Model: digiKam supports 3 different models for face detection. YuNet is the recommended detection model. It is faster and more configurable than YOLO v3 and SSD.
Gezichtsgrootte: deze instelling is alleen van toepassing op YuNet en zal uitgeschakeld zijn als een ander detectiemodel is geselecteerd. Grotere instellingen voor gezichtsgrootte verhogen de snelheid van gezichtsdetectie maar kunnen kleine gezichten in groepsfoto’s of in de achtergrond van afbeeldingen missen. Zie de onderstaande sectie Speciale gevallen voor meer details.
Instellingen voor gezichtsherkenning¶
Voor gezichtsherkenning zijn er 2 instellingen die de gebruiker kan aanpassen om hoe digiKam Onbekende gezichten bestuurt om gezichten te bevestigen.
Nauwkeurigheid: instellingen voor lagere nauwkeurigheid zullen meer suggesties produceren maar zullen het aantal onjuiste suggesties verhogen. De standaard instelling van 7 is aanbevolen voor normaal gebruik.
Model: SFace is the recommended recognition model. It is much more accurate than OpenFace. Changing from one recognition model to another requires retraining your face library, which can be time-consuming.
Werk op alle processorkernen¶
Gezichtsdetectie en gezichtsherkenning kan een taak zijn die veel tijd kost afhankelijk van de grootte van uw bibliotheek en de geselecteerde filtering in Zoeken-in. Om te helpen bij het versnellen van het proces kunt u kiezen om alle processorkernen te gebruiken. Terwijl dit het proces sneller laat werken, kan het potentieel andere processen langzamer laten draaien en maken dat het voelt dat uw computer niet reageert terwijl gezichten worden verwerkt.
Tip
Due to technical limitations on Windows, multi-core support with a MySQL/MariaDB database does not perform well. We recommend using an SQLite database instead for better performance.
Speciale gevallen¶
Af en toe kunt u speciale gevallen tegenkomen waar de aanbevolen instellingen voor gezichtsdetectie niet de beste resultaten opleveren. In die gevallen zou u de detectie-instellingen voor een enkele afbeelding of een kleine groep afbeeldingen fijn moeten afregelen. Het is niet aanbevolen om de standaard instellingen voor normaal gebruik te wijzigen en het is aanbevolen om de instellingen terug te zetten naar hun standaard waarden wanneer u gereed bent met de speciale gevallen.
Grote groepsfoto’s: u kunt afbeeldingen hebben met grote groepen mensen en u wilt een gezichtstag voor elke persoon in de afbeelding genereren. Met het gebruik van het YuNet detectiemodel, instellen van de Detectienauwkeurigheid op 1 en de Gezichtsgrootte op Extra klein zou de meesten moet detecteren, zo niet alle gezichten in de afbeelding. Dit zal ook meer gebieden van de afbeelding een tag geven als gezichten (valse positieven).
Portraits: When shooting portraits from the shoulder up, especially with modern high-resolution cameras over 40 megapixels, face recognition may not detect the face or may tag multiple areas of a single face. Using the YuNet detection model, setting the Detection Accuracy to 8, and setting the Face size to Extra Large will detect only the face, and eliminate false positive tag regions.