Skip to content

Commit

Permalink
Now images would be saved also
Browse files Browse the repository at this point in the history
  • Loading branch information
Devasy23 committed Mar 5, 2024
1 parent 9268e2f commit 9196c1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions API/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ async def create_new_faceEntry(Employee: Employee):
image_filename = f"{Name}.png"
pil_image.save(image_filename)
# print path of the current working directory
# pil_image.save(f"Images\dbImages\{Name}.jpg")
pil_image.save(f"Images\dbImages\{Name}.jpg")
# Extract the face from the image
face_image_data = DeepFace.extract_faces(
image_filename, detector_backend="mtcnn", enforce_detection=False
)
# Calculate the embeddings of the face image
# plt.imsave(f"Images/Faces/{Name}.jpg", face_image_data[0]['face'])
plt.imsave(f"Images/Faces/{Name}.jpg", face_image_data[0]['face'])
embeddings = DeepFace.represent(
image_filename, model_name="Facenet", detector_backend="mtcnn"
)
Expand Down

0 comments on commit 9196c1b

Please sign in to comment.