User Tools

Site Tools


howto:stashface

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howto:stashface [2025/04/19 21:42] – created Wulf Rajekhowto:stashface [2025/04/20 13:08] (current) Wulf Rajek
Line 1: Line 1:
 ====== Stashface ====== ====== Stashface ======
 +
 +Stashface is a Gradio web user interface with api endpoints for facial recognition, primarily for use with the Stash plugin Visage. It requires a vector database of the faces with references to the stashdb uuids and file with uuid to metadata mapping. A password protected zip file of the mapping is in the docker image and huggingface git source. An own database can be created using visage-ml.
 +The performers.json mapping file should be in the following format for stashface:
 +
 +<code - performers.json>
 +{
 +"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx": {"name": "Firstname Lastname", "image": "https://cdn.example.org/images/uuid", "country": "GB"},
 +"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx": {"name": "Firstname2 Lastname2", "image": "https://cdn.example.org/images/uuid", "country": "HU"}, 
 +"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx": {"name": "Firstname3 Lastname3", "image": "https://cdn.example.org/images/uuid", "country": "US"}, 
 +...
 +}
 +</code>
 +
  
 https://huggingface.co/spaces/cc1234/stashface https://huggingface.co/spaces/cc1234/stashface
Line 66: Line 79:
  
  
-Deprecated Visage version:+Deprecated Visage userscript version:
 https://github.com/cc1234475/visage https://github.com/cc1234475/visage
  
Line 77: Line 90:
       - "https://cc1234-stashface.hf.space"</code>       - "https://cc1234-stashface.hf.space"</code>
  
-Visage-ML:+====== Visage-ML ====== 
 + 
 +Visage-ML is used to create a database from images for use with stashface/visage plugin. 
 + 
 +The directory structure of the images needs to be in the following format: 
 +<code> 
 +person_name 
 +  - image_file_001.jpeg 
 +  - another_01.jpeg 
 +</code> 
 + 
 +Updated fork:
 https://github.com/badde57/visage-ml https://github.com/badde57/visage-ml
  
 +Original:
 +https://github.com/cc1234475/visage-ml
  
 +<code>
 +git clone https://github.com/badde57/visage-ml
 +
 +#Hashing:
 +cd visage-ml/hasher/
 +mkdir weights
 +cd weights/
 +wget https://github.com/serengil/deepface_models/releases/download/v1.0/facenet512_weights.h5
 +wget https://github.com/serengil/deepface_models/releases/download/v1.0/retinaface.h5
 +cd ..
 +mkdir -p /opt/visage/images
 +vi docker-compose.yaml
 +# adjust image folder in compose
 +docker-compose build
 +docker-compose up
 +
 +#builder
 +cd ../builder
 +vi docker-compose.yaml
 +# adjust image folder in compose
 +docker-compose build
 +docker-compose up
 +
 +#matcher
 +cd ../matcher
 +cp /opt/visage/images/face.db .
 +cp /opt/visage/images/face.json .
 +vi performers.json
 +{
 +"93aa1a98-e86e-47a2-b661-f5d703a6e727":"performer name"
 +}
 +
 +docker-compose up
 +</code>
howto/stashface.1745095360.txt.gz · Last modified: by Wulf Rajek