Skip to content

Commit

Permalink
refactor: remove useless conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsay-so committed Sep 12, 2023
1 parent 0eb3eeb commit cc574a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions howdy/src/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def init_detector(lock):

# Use the CNN detector if enabled
if use_cnn:
face_detector = dlib.cnn_face_detection_model_v1(str(paths_factory.mmod_human_face_detector_path()))
face_detector = dlib.cnn_face_detection_model_v1(paths_factory.mmod_human_face_detector_path())
else:
face_detector = dlib.get_frontal_face_detector()

# Start the others regardless
pose_predictor = dlib.shape_predictor(str(paths_factory.shape_predictor_5_face_landmarks_path()))
face_encoder = dlib.face_recognition_model_v1(str(paths_factory.dlib_face_recognition_resnet_model_v1_path()))
pose_predictor = dlib.shape_predictor(paths_factory.shape_predictor_5_face_landmarks_path())
face_encoder = dlib.face_recognition_model_v1(paths_factory.dlib_face_recognition_resnet_model_v1_path())

# Note the time it took to initialize detectors
timings["ll"] = time.time() - timings["ll"]
Expand Down
3 changes: 1 addition & 2 deletions howdy/src/pam/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ subdir('po')
paths_h = configure_file(
input: 'paths.hh.in',
output: 'paths.hh',
configuration: pam_module_conf_data,
install_dir: get_option('pam_dir')
configuration: pam_module_conf_data
)

pamdir = get_option('pam_dir') != '' ? get_option('pam_dir') : join_paths(get_option('prefix'), get_option('libdir'), 'security')
Expand Down
2 changes: 1 addition & 1 deletion howdy/src/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def generate(frames, text_lines):
# Add the Howdy logo if there's space to do so
if len(frames) > 1:
# Load the logo from file
logo = cv2.imread(str(paths_factory.logo_path()))
logo = cv2.imread(paths_factory.logo_path())
# Calculate the position of the logo
logo_y = frame_height + 20
logo_x = frame_width * len(frames) - 210
Expand Down

0 comments on commit cc574a6

Please sign in to comment.