can now do an AI search if we add refimg to new/existing person, cleaned up that dialog to look better with buttons for those options rather than a link. Noticed BUG-100, 2 x mich in one image

This commit is contained in:
2022-07-28 18:16:10 +10:00
parent 6135481395
commit 96810fa1e3
4 changed files with 36 additions and 8 deletions

View File

@@ -10,6 +10,9 @@ from flask_login import login_required, current_user
from werkzeug.utils import secure_filename
from shared import GenFace, GenThumb
from face import Face, FaceRefimgLink, FaceOverrideType, FaceNoMatchOverride, FaceManualOverride
from path import Path, PathType
from job import JobExtra, NewJob
import os
import json
import time
@@ -310,6 +313,21 @@ def add_refimg_to_person():
fname=TempRefimgFile( request.form['refimg_data'], p.tag )
AddRefimgToPerson( fname, p )
if request.form['search'] == "true":
jex=[]
ptype=PathType.query.filter(PathType.name=='Import').first()
jex.append( JobExtra( name=f"person", value="all" ) )
jex.append( JobExtra( name=f"path_type", value=ptype.id ) )
job=NewJob( "run_ai_on_path", 0, None, jex )
st.SetMessage( f"Created&nbsp;<a href=/job/{job.id}>Job #{job.id}</a>&nbsp;to Look for face(s) in import path(s)")
jex=[]
ptype=PathType.query.filter(PathType.name=='Storage').first()
jex.append( JobExtra( name=f"person", value="all" ) )
jex.append( JobExtra( name=f"path_type", value=ptype.id ) )
job=NewJob( "run_ai_on_path", 0, None, jex )
st.SetMessage( f"Created&nbsp;<a href=/job/{job.id}>Job #{job.id}</a>&nbsp;to Look for face(s) in storage path(s)")
resp['who']=p.tag
resp['distance']='0.0'
return resp