model_used is now per file, not per face, implemented split of default_model to default_refimg_model and default_scan_model in settings, and default_refimg_model actualy works when creating refimgs in person.py. The model_used in face_file_link is based on default settings model and will scan with cnn if chosen and store that in DB as needed. Need viewer to allow changing per file / not just default for future scans
This commit is contained in:
@@ -96,9 +96,10 @@ def GenThumb(fname):
|
||||
print( f"GenThumb failed: {e}")
|
||||
return None, None, None
|
||||
|
||||
def GenFace(fname):
|
||||
def GenFace(fname, model):
|
||||
img = face_recognition.load_image_file(fname)
|
||||
location = face_recognition.face_locations(img)
|
||||
# TODO: change face_locations call basedon model
|
||||
location = face_recognition.face_locations(img, model=model)
|
||||
encodings = face_recognition.face_encodings(img, known_face_locations=location)
|
||||
if len(encodings):
|
||||
return encodings[0].tobytes(), location
|
||||
|
||||
Reference in New Issue
Block a user