generated from Hazel/python-project
feat: fixed some issue
This commit is contained in:
parent
ad8f3b8e66
commit
0e73aff25d
@ -4,4 +4,4 @@ from .detect_humans import detect_humans
|
|||||||
def cli():
|
def cli():
|
||||||
print(f"Running secure_pixelation")
|
print(f"Running secure_pixelation")
|
||||||
|
|
||||||
detect_humans("assets/human_detection/humans.png")
|
detect_humans("assets/human_detection/rev1.png")
|
||||||
|
@ -159,6 +159,9 @@ def detect_human_parts(human: dict, face_padding: int = 20):
|
|||||||
# indices of the points that seem to be likely correct
|
# indices of the points that seem to be likely correct
|
||||||
success_points = []
|
success_points = []
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
|
if np.sum(original_points[i]) == 0:
|
||||||
|
continue
|
||||||
|
|
||||||
s_count = 0
|
s_count = 0
|
||||||
for j in range(5):
|
for j in range(5):
|
||||||
d = np.abs(optimized_distances[i][j])
|
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:
|
for point in clean_points:
|
||||||
cv2.circle(image, (int(point[0]), int(point[1])), 4, color, -1)
|
cv2.circle(image, (int(point[0]), int(point[1])), 4, color, -1)
|
||||||
|
|
||||||
|
if valid_face:
|
||||||
print("\nOriginal points:")
|
print("\nOriginal points:")
|
||||||
print(original_points)
|
print(original_points)
|
||||||
print("\nOriginal pairwise distances:")
|
print("\nOriginal pairwise distances:")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user