mirror of
https://github.com/yakhyo/uniface.git
synced 2025-12-30 09:02:25 +00:00
fix: Fix type conversion and remove redundant type conversion (#29)
* ref: Remove type conversion and update face class * fix: change the type to float32 * chore: Update all examples, testing with latest version * docs: Update docs reflecting the recent changes
This commit is contained in:
committed by
GitHub
parent
f4458f0550
commit
3982d677a9
@@ -199,9 +199,9 @@ faces = detector.detect(image)
|
||||
|
||||
# Predict attributes
|
||||
for i, face in enumerate(faces):
|
||||
gender_id, age = age_gender.predict(image, face['bbox'])
|
||||
gender = 'Female' if gender_id == 0 else 'Male'
|
||||
print(f"Face {i+1}: {gender}, {age} years old")
|
||||
gender, age = age_gender.predict(image, face['bbox'])
|
||||
gender_str = 'Female' if gender == 0 else 'Male'
|
||||
print(f"Face {i+1}: {gender_str}, {age} years old")
|
||||
```
|
||||
|
||||
**Output:**
|
||||
|
||||
Reference in New Issue
Block a user