ketr.photos/README.md
James Ketrenos 1975b174a8 Functional for editing clusters; need to add merging
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
2023-01-19 00:51:40 -08:00

59 lines
2.1 KiB
Markdown

# Overview
This photo manager performs the following:
1. Scan a target directory looking for any photo that has been updated,
removed, or added
2. Process that image, extracting EXIF data, and adding to the DB
3. Schedule backend processing of all photos that have not been face
scanned with the latest FACE_SCANNER version
## Populating...
1. App builds photo DB.
This occurs via 'server/app.js' (npm start)
2. Faces are identified in all photos.
This occurs in 'ketrface/detect.py' (python3 detect.py)
1. mtcnn finds faces (threshold > 0.95)
2. vgg-face is used to generate detectors
3. Faces are clustered into groups.
This occurs in 'ketrface/cluster.py' (python3 cluster.py)
1. DBSCAN generates first set of clusters
2. Centroid calculated for all clusters
3. Faces are pruned from clusters if they exceed a threshold
4. Clusters are merged based on centroid distances
4. Clusters are examined to ensure only one face per image is assigned an identity.
This occurs in 'ketrface/split.py' (python3 cluster.py)
1. echo "select f1.id,f2.id,f1.photoId,f1.identityId from faces as f1 join faces as f2 on f2.identityId=f1.identityId and f1.photoId=f2.photoId and f1.id!=f2.id;"
2. For each face in the same photo, determine which face is closest to the cluster centroid. Move the other to cluster-1.{N} where N increases for each duplicate
# To use the Docker
Edit the environment file '.env' and set PICTURES to the correct
location of pictures.
Also change the PORT to the port that will be nginx redirected to from
your main nginx server -- this allows you to run multiple instances
of the photo application on different paths, with different image sets.
```bash
docker build . -t photos
docker-compose up -d
```
At this point, .env's PORT (default 8123) will be supporting the photo app.
###
NEF processing uses darktable
```
sudo apt install -y darktable
```
### Create `photos` user for DB
Photos is currently using sqlite, which means you don't need to
do anything fancy beyond having run 'npm install' to get sequelize
and sqlite3 installed.