Skip to content

Commit bc7ecb3

Browse files
committed
fix: 🐛 fix topiq_nr-face multiple inference error
1 parent 53cd2db commit bc7ecb3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pyiqa/archs/topiq_arch.py

+1
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ def preprocess_face(self, x):
454454
# warning message
455455
device = x.device
456456
assert x.shape[0] == 1, f'Only support batch size 1, but got {x.shape[0]}'
457+
self.face_helper.clean_all()
457458
self.face_helper.input_img = x[0].permute(1, 2, 0).cpu().numpy() * 255
458459
self.face_helper.input_img = self.face_helper.input_img[..., ::-1]
459460
if self.face_helper.get_face_landmarks_5(only_center_face=True, eye_dist_threshold=5) > 0:

0 commit comments

Comments
 (0)