mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
dict keys instead of items
This commit is contained in:
parent
d50ece9db0
commit
95e157e1d9
@ -435,7 +435,9 @@ disable=raw-checker-failed,
|
|||||||
global-statement,
|
global-statement,
|
||||||
no-member,
|
no-member,
|
||||||
no-name-in-module,
|
no-name-in-module,
|
||||||
unrecognized-option
|
unrecognized-option,
|
||||||
|
consider-using-dict-items,
|
||||||
|
consider-iterating-dictionary
|
||||||
|
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
# Enable the message, report, category or checker with the given id(s). You can
|
||||||
# either give multiple identifier separated by comma (,) or put this option
|
# either give multiple identifier separated by comma (,) or put this option
|
||||||
|
@ -19,8 +19,8 @@ def detect_face(face_detector, img, align=True):
|
|||||||
obj = RetinaFace.detect_faces(img, model=face_detector, threshold=0.9)
|
obj = RetinaFace.detect_faces(img, model=face_detector, threshold=0.9)
|
||||||
|
|
||||||
if isinstance(obj, dict):
|
if isinstance(obj, dict):
|
||||||
for item in obj.items():
|
for face_idx in obj.keys():
|
||||||
identity = item[1]
|
identity = obj[face_idx]
|
||||||
facial_area = identity["facial_area"]
|
facial_area = identity["facial_area"]
|
||||||
|
|
||||||
y = facial_area[1]
|
y = facial_area[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user