A plugin for recognizing performers from their images using DeepFace. This plugin integrates seamlessly with Stash and enables automatic facial recognition by building or updating a local model trained from your existing image collection.
Features
Rebuild Face Recognition Model
Completely rebuild the local facial recognition model using available images per performer.
Update Face Recognition Model
Incrementally updates the model if performers have fewer images than the configured target count.
Automatic Server Control
Easily start or stop the recognition server as neededāautomatically starts when an image is queried.
Identify
Click on the new icon next to an image to trigger performer identification.
Requirements
Python 3.10.11 (temporarily, see instructions below)
e.g. using https://stash.example.org will send requests to https://stash.example.org:7860.
But worse, using https://example.com/stash will use https://example.com:7860
Tasks
Task
Description
Rebuild Face Recognition Model
Fully rebuild the DeepFace model for all performers.
Update Face Recognition Model
Add more images for performers with less than the target image count.
Start Server
Start the local DeepFace server if itās not already running.
Stop Server
Gracefully stop the running recognition server.
Settings
Setting
Description
Target image count per voy
Number of images to use per performer when training the model. Default is 15.
Installation & Setup
1. Set Python Path to 3.10.11
To ensure compatibility with DeepFace and the pluginās dependency resolution process:
Temporarily set the Python path in your system/environment to Python 3.10.11.
2. Rebuild the Model
Run the āRebuild Face Recognition Modelā task. This will:
Set up a virtual environment
Install all necessary Python dependencies (DeepFace, etc.)
Build the recognition model
3. Restore Python Path (Optional)
Once setup is complete, you can revert your Python path to its original version. The plugin will continue working with the generated virtual environment.
Usage
Once the model is built, navigate to an image in your Stash UI.
Click the Performer Recognition icon overlaying the image.
The plugin will:
Automatically start the recognition server if itās not already running
Query the server to identify the performer
Display the matched performer from the trained database
Do you have 3.10.11 ? Like exactly this subversion.
Because what it says is it could install tensorflow for you python version and os
Could you also try deleting the venv folder and retry?
I assume this only works for performers that are already in your local stash instance? What about new performers? I tried to use the cloud visage but that doesnāt seem to be working.
I donāt understand your question. This is for local performers based on your own pictures. The cloud one is updated every now and then but Iām not the author of it .
After some research and experiments, it seems like it comes from using the container image. I tried with a clean Python and only installing tensorflow without version requirements and it still fails.
Tensorflow builds are not compatible with alpine-based images which is the base used by the official Stash image (alpine uses musl-based symbols instead of the classic glibc-based symbols).
I installed everything as pointed out in the readme.md. It looks like installing everything into the venv works fine, but then I am greeted with loads of errors as soon as the local images are being processed:
ERRO[2025-11-05 17:59:35] [Plugin / Local Visage] E0000 00:00:1762361975.021414 865056 cuda_dnn.cc:522] Loaded runtime CuDNN library: 9.1.0 but source was compiled with: 9.3.0. CuDNN library needs to have matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.
WARN[2025-11-05 17:59:35] [Plugin / Local Visage] [WARN] Skipping /home/stash/src/stash/performer_db/26/480dcaa6-af41-425d-b2d9-f24f08aaa55a.jpg: Exception encountered when calling layer 'Conv2d_1a_3x3' (type Conv2D).
ERRO[2025-11-05 17:59:35] [Plugin / Local Visage] w
WARN[2025-11-05 17:59:35] [Plugin / Local Visage] {{function_node __wrapped__Conv2D_device_/job:localhost/replica:0/task:0/device:GPU:0}} No DNN in stream executor. [Op:Conv2D] name:
ERRO[2025-11-05 17:59:35] [Plugin / Local Visage] w
WARN[2025-11-05 17:59:35] [Plugin / Local Visage] Call arguments received by layer 'Conv2d_1a_3x3' (type Conv2D):
WARN[2025-11-05 17:59:35] [Plugin / Local Visage] ⢠inputs=tf.Tensor(shape=(1, 160, 160, 3), dtype=float32)
Is there anything I might have missed? Iām running Linux 6.17.5 with a RTX 4070 with driver version 580.95.05.
This took me way to long to figure out, wasted like half a day a few weeks back, compiling python and stuff, just to end up incompatible again. Itās probably easier to build a custom docker image based on a glibc-based distro with a recent ffmpeg and python.
@Nonoty the incompatibility with the docker version should probably be mentioned in the requirements
Finding even one version that worked with all requirements was a challenge that I spent over a week tackling. I think until visage starts using something else than tensorflow we wonāt be able to run it locally easily..