File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1818 join (".." , "sample_images" , "owls.jpg" )
1919]
2020
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+
2127for path in image_paths :
2228 img = PIL .Image .open (path )
2329
2430 img_metadata = {TAGS [k ]: v for k , v in img ._getexif ().items () if k in TAGS }
2531
2632 # Detect faces ------------------------------------------------------------
2733
28- # Load the trained file from the module root.
29- trained_file = data .lbp_frontal_face_cascade_filename ()
30-
31- # Initialize the detector cascade.
32- detector = Cascade (trained_file )
33-
3434 detected = detector .detect_multi_scale (img = np .asarray (img ),
3535 scale_factor = 1.2 ,
3636 step_ratio = 1 ,
You can’t perform that action at this time.
0 commit comments