get better at finding best faces

This commit is contained in:
carl 2024-03-14 13:36:34 -03:00
parent cbcdd3e14c
commit 721608c493
4 changed files with 18 additions and 3 deletions

View File

@ -22,6 +22,12 @@ class Deepfacex(object):
return None return None
# Get main face
def get_main_face(self):
faces = DeepFace.find_faces(self.img2_path)
print(faces)
# Compare the two pics # Compare the two pics
def process(self): def process(self):
print("proc1") print("proc1")
@ -43,8 +49,10 @@ if __name__ == '__main__':
d = Deepfacex() d = Deepfacex()
print("main2") print("main2")
d.load("file1","file2","testimg/test1.jpg","testimg/test2.jpg") d.load("file1","file2","testimg/brucedickinson.jpg","testimg/ironmaiden.jpg")
print("main3") d.get_main_face()
#d.load("file1","file2","testimg/test1.jpg","testimg/test2.jpg")
#print("main3")
print (d.process()) #print (d.process())

View File

@ -60,6 +60,13 @@ class yoloserv(object):
self.facematcher = Facematch() self.facematcher = Facematch()
self.facematcher.init() self.facematcher.init()
# Object (face) matching
if "facematch_open" in self.devices:
print("Loading paravision facematch...")
from facematch_open import Facematch
self.facematcher = Facematch()
self.facematcher.init()
# Image acquisition # Image acquisition
if "camera" in self.devices: if "camera" in self.devices:
print("AAAAAAAAAAA Loading YUV standard camera...") print("AAAAAAAAAAA Loading YUV standard camera...")

BIN
testimg/brucedickinson.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
testimg/ironmaiden.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB