Skip to content

Commit

Permalink
fix: 🐛 fix topiq_nr-face multiple inference error
Browse files Browse the repository at this point in the history
  • Loading branch information
chaofengc committed Jan 25, 2024
1 parent 53cd2db commit bc7ecb3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyiqa/archs/topiq_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ def preprocess_face(self, x):
# warning message
device = x.device
assert x.shape[0] == 1, f'Only support batch size 1, but got {x.shape[0]}'
self.face_helper.clean_all()
self.face_helper.input_img = x[0].permute(1, 2, 0).cpu().numpy() * 255
self.face_helper.input_img = self.face_helper.input_img[..., ::-1]
if self.face_helper.get_face_landmarks_5(only_center_face=True, eye_dist_threshold=5) > 0:
Expand Down

0 comments on commit bc7ecb3

Please sign in to comment.