diff --git a/ketrface/cluster.py b/ketrface/cluster.py new file mode 100644 index 0000000..bb566b5 --- /dev/null +++ b/ketrface/cluster.py @@ -0,0 +1,158 @@ +import sys +import json +import os +import piexif +import sqlite3 +from sqlite3 import Error +from PIL import Image +import numpy as np +from deepface import DeepFace +from deepface.detectors import FaceDetector +import functools + +from ketrface.util import * +from ketrface.dbscan import * +from ketrface.db import * + +html_base = '../' +db_path = '../db/photos.db' + +# TODO +# Switch to using DBSCAN +# +# Thoughts for determining number of clusters to try and target... +# +# Augment DBSCAN to rule out identity matching for the same face +# appearing more than once in a photo +# +# NOTE: This means twins or reflections won't both identify in the +# same photo -- those faces would then identify as a second face pairing +# which could merge with a cluster, but can not be used to match + + +def gen_html(identities): + for identity in identities: + + print('