|
| 1 | +# Star Identifier |
| 2 | + |
| 3 | +https://github.com/axxeman23/star_identifier |
| 4 | + |
| 5 | +## Intro |
| 6 | + |
| 7 | +Star Identifier uses [facial recognition](https://github.com/ageitgey/face_recognition) to automatically identify who is in images or scene screenshots from the performers already in your [Stash](https://github.com/stashapp/stash) library. |
| 8 | + |
| 9 | +## Requirements |
| 10 | + |
| 11 | +### Python3 |
| 12 | +__version: 3.10.x +__ |
| 13 | + |
| 14 | +#### Installing Python |
| 15 | + |
| 16 | +1. Download Python [here](https://www.python.org/downloads/) |
| 17 | +2. Install & add to your PATH |
| 18 | +3. Configure Stash to use Python (if necessary. This can be set in the `System` tab of your `Settings` page) |
| 19 | + |
| 20 | +### Libs & Dependencies |
| 21 | + |
| 22 | +#### CMake |
| 23 | + |
| 24 | +For Windows: |
| 25 | + |
| 26 | +- You'll also need to install Microsoft Visual Studio 2015 (or newer) with C/C++ Compiler installed. [Link here](https://visualstudio.microsoft.com/downloads/) |
| 27 | +- Install and add CMake to your PATH. [Link](https://cmake.org/download/) |
| 28 | +- For more details, see [this issue](https://github.com/ageitgey/face_recognition/issues/175) |
| 29 | + |
| 30 | +For Mac & Linux: |
| 31 | +`brew install cmake` |
| 32 | + |
| 33 | +#### Python Libraries |
| 34 | + |
| 35 | +1. numpy |
| 36 | +2. dlib |
| 37 | +3. face_recognition |
| 38 | + |
| 39 | +`pip install numpy dlib face_recognition` |
| 40 | + |
| 41 | +For more details, see the [Face Recognition installation instructions](https://github.com/ageitgey/face_recognition#installation). |
| 42 | + |
| 43 | +### Plugin Files |
| 44 | + |
| 45 | +You'll need the following in your `plugins` folder from this repo. Copy `star_identifier.yml` to the `plugins` folder, and the rest of the files to a folder called `py_plugins` inside the `plugins` folder. If you already have `log.py` in `py_plugins`, skip copying that one (it should be the same) |
| 46 | + |
| 47 | +``` |
| 48 | +star_identifier.yml |
| 49 | +py_plugins: |
| 50 | + | log.py |
| 51 | + | star_identifier_config.py |
| 52 | + | star_identifier_interface.py |
| 53 | + | star_identifier.py |
| 54 | +``` |
| 55 | + |
| 56 | +## Config |
| 57 | + |
| 58 | +### Paths |
| 59 | + |
| 60 | +Running the plugin will create a folder. By default, this will be created in your `plugins` folder, but you can change that in the config. |
| 61 | + |
| 62 | +Face encodings will be saved to that new folder. The encodings file will be roughly 1MB per 1,000 performers. |
| 63 | + |
| 64 | +### Stash Settings |
| 65 | + |
| 66 | +Star Identifier uses a tag to find images or scenes you would like identified. By default, that tag is `star identifier`. |
| 67 | + |
| 68 | +Since the recognition is based on a single performer image, that image needs to have a pretty clear front-facing view of the performer's face. If face_recognition fails to find a performer's face, Star Identifier will tag that performer with `star identifier performer error` by default. |
| 69 | + |
| 70 | +### Star Identifier Settings |
| 71 | + |
| 72 | +You can adjust the tolerance for identification here. `0.6` is default and typical, but I've found `0.5` to work well. Lower is more strict. |
| 73 | + |
| 74 | +## Running |
| 75 | + |
| 76 | +### Export Performers |
| 77 | + |
| 78 | +This is the first step. Star Identifier loads each performer's image, encodes their facial features into a numpy array, and saves those arrays. The clearer the face of the performer, the better identification results will be. Performers whose faces are not recognized by face_recognition will be tagged for you to update as desired. |
| 79 | + |
| 80 | +This only needs to be run once, or after new performers are added or have updated images. |
| 81 | + |
| 82 | +### Identify Images |
| 83 | + |
| 84 | +This loads all images in the stash database tagged with `star identifier` (by default), compares the recognized faces to the exported face database, and then adds all potential matches to those images as performers. |
| 85 | + |
| 86 | +### Identify Scene Screenshots |
| 87 | + |
| 88 | +This loads the screenshot for every scene in the stash database tagged with `star identifier` (by default), compares the recognized faces to the exported face database, and then adds all potential matches to those scenes as performers. |
| 89 | + |
| 90 | +## Upcoming roadmap |
| 91 | + |
| 92 | +See [issues](https://github.com/axxeman23/star_identifier/issues) |
0 commit comments