Skip to content

Commit af6c41c

Browse files
committed
RGB to BGR
1 parent 28326b7 commit af6c41c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

age_estimator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def estimate_age(self, pil_img: Image.Image) -> float | None:
2222
Estimated age as float, or None if no face detected
2323
"""
2424
img = np.array(pil_img)
25+
img = img[:, :, ::-1] # Convert RGB to BGR for InsightFace
2526
faces = self.app.get(img)
2627
if len(faces) == 0:
2728
return None

0 commit comments

Comments
 (0)