Commit e88bc3bb authored by 赵威's avatar 赵威

update return type

parent 9c3c4d1c
......@@ -24,10 +24,10 @@ def main():
face_detector = dlib.get_frontal_face_detector()
shape_predictor = dlib.shape_predictor(shape_model_path)
if img:
if img.any():
faces = face_to_vec(img, face_rec, face_detector, shape_predictor)
if faces:
if len(faces) > 0:
for face in faces:
print(face)
print("\n")
......
......@@ -18,7 +18,7 @@ def url_to_ndarray(url):
return data
else:
print("http get: {}".format(result.status_code))
return None
return np.array([])
def file_to_ndarray(path):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment