Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions content/lua.scripts.manual/scripts/contrib/face_recognition.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,41 @@ author: "people"

## Name

face_recognition.lua - add a new storage option and calls face_recognition after export
face_recognition.lua - Calls externel tool [face_recognition](https://github.com/ageitgey/face_recognition/) and applies the results

## Description

Add a new storage option to send images to face_recognition.
Images are exported to darktable tmp dir first.
A directory with known faces must exist, the image name are the
tag names which will be used.
Multiple images for one face can exist, add a number to it, the
number will be removed from the tag, for example:
People|IknowYou1.jpg
People|IknowYou2.jpg
People|Another.jpg
People|Youtoo.jpg
Adds on option to apply face recognition on a selection of photos. The results are written into customizable tags.

## Preparation

1. Install the face recognition solution https://github.com/ageitgey/face_recognition: `pipx install face-recognition`
2. Prepare your known faces in the following fashion:

You need a directory which holds the photos of all known faces. The file names are the tag names which will be used. You can add a number suffix to provide multiple photos of the same persone to improve the result. The number will be removed from the tag.

Example:

- `People|Family|IknowYou1.jpg`
- `People|Family|IknowYou2.jpg`
- `People|Friend|Another.jpg`
- `People|Youtoo.jpg`

3. Enable this script from script manager (included in the default installation of darktable. Thus no additional manual download required) and point it to the faces folder from the previous step.

## Technical process

1. Selected images are exported into a temporary location with a lowered resolution
2. The external tool is invoced with the photo and the path to the face folder as parameters
3. The result is parsed an dapplied as tags

## Usage

* start this script from script manager.
* start the recognition from the corresponding module ("face recognition") on the right side in the library view

## Additional Software Required
## Source

* https://github.com/ageitgey/face_recognition
* https://github.com/darktable-org/lua-scripts/tree/master/lib
https://github.com/darktable-org/lua-scripts/blob/master/contrib/face_recognition.lua

## Limitations

Expand Down