feat: fixed some issue

This commit is contained in:
Hazel 2025-04-23 17:14:17 +02:00
parent ad8f3b8e66
commit 0e73aff25d
2 changed files with 16 additions and 13 deletions

View File

@ -4,4 +4,4 @@ from .detect_humans import detect_humans
def cli():
print(f"Running secure_pixelation")
detect_humans("assets/human_detection/humans.png")
detect_humans("assets/human_detection/rev1.png")

View File

@ -159,6 +159,9 @@ def detect_human_parts(human: dict, face_padding: int = 20):
# indices of the points that seem to be likely correct
success_points = []
for i in range(5):
if np.sum(original_points[i]) == 0:
continue
s_count = 0
for j in range(5):
d = np.abs(optimized_distances[i][j])
@ -238,7 +241,7 @@ def detect_human_parts(human: dict, face_padding: int = 20):
for point in clean_points:
cv2.circle(image, (int(point[0]), int(point[1])), 4, color, -1)
if valid_face:
print("\nOriginal points:")
print(original_points)
print("\nOriginal pairwise distances:")