Skip to content

Commit

Permalink
resolving conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
tsu-ki committed Feb 5, 2025
1 parent 6cc9ecd commit 042e7d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/views/privacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def overlay_faces(img, color=(255, 255, 255)):
"""Apply white rectangles over detected faces in an image."""

# tracemalloc used to measure memory usage
# trace-malloc used to measure memory usage of the function
tracemalloc.start()
try:
if img is None:
Expand All @@ -18,6 +18,7 @@ def overlay_faces(img, color=(255, 255, 255)):

gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

# Load the pre-trained face detection model
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
if face_cascade.empty():
return img
Expand Down

0 comments on commit 042e7d8

Please sign in to comment.