unmatched faces now sorts size of face desc, and is slightly prettier -- still slow and only takes you to the file anyway, might optimise that later. still no code to auto deal with unmatched face, but will add some capabilities next. Also, remembered last dir when file_ip/sp/bin. Also throw error if try to find unknown person - happened since I allowed the back/forward.
This commit is contained in:
@@ -320,6 +320,8 @@ class Face(Base):
|
||||
id = Column(Integer, Sequence('face_id_seq'), primary_key=True )
|
||||
face = Column( LargeBinary )
|
||||
locn = Column(String)
|
||||
w = Column(Integer)
|
||||
h = Column(Integer)
|
||||
|
||||
def __repr__(self):
|
||||
return f"<id: {self.id}, face={self.face}"
|
||||
@@ -1848,7 +1850,9 @@ def InitialValidationChecks():
|
||||
# AddFaceToFile(): adds the specified face, location & model_used to the specified file
|
||||
####################################################################################################################################
|
||||
def AddFaceToFile( locn_data, face_data, file_eid, model_id ):
|
||||
face = Face( face=face_data.tobytes(), locn=json.dumps(locn_data) )
|
||||
w = locn_data[1] - locn_data[3]
|
||||
h = locn_data[2] - locn_data[0]
|
||||
face = Face( face=face_data.tobytes(), locn=json.dumps(locn_data), w=w, h=h )
|
||||
session.add(face)
|
||||
session.commit()
|
||||
ffl = FaceFileLink( face_id=face.id, file_eid=file_eid, model_used=model_id )
|
||||
|
||||
Reference in New Issue
Block a user