We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c5fb8f commit 00a1aedCopy full SHA for 00a1aed
1 file changed
stage0_starting_script/face_detect.py
@@ -18,19 +18,19 @@
18
join("..", "sample_images", "owls.jpg")
19
]
20
21
+# Load the trained file from the module root.
22
+trained_file = data.lbp_frontal_face_cascade_filename()
23
+
24
+# Initialize the detector cascade.
25
+detector = Cascade(trained_file)
26
27
for path in image_paths:
28
img = PIL.Image.open(path)
29
30
img_metadata = {TAGS[k]: v for k, v in img._getexif().items() if k in TAGS}
31
32
# Detect faces ------------------------------------------------------------
33
- # Load the trained file from the module root.
- trained_file = data.lbp_frontal_face_cascade_filename()
-
- # Initialize the detector cascade.
- detector = Cascade(trained_file)
34
detected = detector.detect_multi_scale(img=np.asarray(img),
35
scale_factor=1.2,
36
step_ratio=1,
0 commit comments