Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuke-a-uchida committed Jul 5, 2018
1 parent 0bcc379 commit 06bf698
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utkface/detect_face_regions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import argparse
from pathlib import Path
from tqdm import tqdm
import pandas as pd
import cv2
import dlib
Expand All @@ -17,12 +19,12 @@ def get_args():

def main():
args = get_args()
root_dir = args.input
root_dir = Path(args.input)
output_path = args.output
detector = dlib.get_frontal_face_detector()
results = []

for image_path in root_dir.glob("*/*.jpg"):
for image_path in tqdm(root_dir.glob("*/*.jpg")):
img = cv2.imread(str(image_path))
input_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
detected = detector(input_img, 1)
Expand Down

0 comments on commit 06bf698

Please sign in to comment.