Warlord-K commited on
Commit
046174c
1 Parent(s): 5b78cf9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,11 +18,11 @@ for r, _, f in os.walk(os.getcwd() + "/images"):
18
 
19
  source_faces = []
20
  for img in source_imgs:
21
- source_faces.append(extract_faces(detector, img)[0])
22
  source_embeddings = get_embeddings(model, source_faces)
23
 
24
  def find_names(image):
25
- imgs, _ = extract_faces(detector, image)
26
  embeds = get_embeddings(model, imgs)
27
  d = np.zeros((len(source_embeddings), len(embeds)))
28
  for i, s in enumerate(source_embeddings):
 
18
 
19
  source_faces = []
20
  for img in source_imgs:
21
+ source_faces.append(extract_faces(detector, img)[-1])
22
  source_embeddings = get_embeddings(model, source_faces)
23
 
24
  def find_names(image):
25
+ imgs = extract_faces(detector, image)
26
  embeds = get_embeddings(model, imgs)
27
  d = np.zeros((len(source_embeddings), len(embeds)))
28
  for i, s in enumerate(source_embeddings):