Warlord-K commited on
Commit
f9c724b
·
1 Parent(s): c0f3d61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ for r, _, f in os.walk(os.getcwd() + "/images"):
17
  source_faces = []
18
  for img in source_imgs:
19
  source_faces.append(extract_faces(detector, img)[0])
20
- source_embeddings = get_embeddings(source_faces)
21
 
22
  index = faiss.IndexFlatL2(4096)
23
  index.add(np.array(source_embeddings))
@@ -27,7 +27,7 @@ image = 'group.jpg'
27
 
28
  def find_names(image):
29
  imgs = extract_faces(detector, image)
30
- embeds = get_embeddings(imgs)
31
  D, I = index.search(np.array(embeds), 1)
32
  names = ""
33
  for i in I:
 
17
  source_faces = []
18
  for img in source_imgs:
19
  source_faces.append(extract_faces(detector, img)[0])
20
+ source_embeddings = get_embeddings(model, source_faces)
21
 
22
  index = faiss.IndexFlatL2(4096)
23
  index.add(np.array(source_embeddings))
 
27
 
28
  def find_names(image):
29
  imgs = extract_faces(detector, image)
30
+ embeds = get_embeddings(model, imgs)
31
  D, I = index.search(np.array(embeds), 1)
32
  names = ""
33
  for i in I: