diff --git a/.pylintrc b/.pylintrc index 9648bef..5f08b83 100644 --- a/.pylintrc +++ b/.pylintrc @@ -435,7 +435,9 @@ disable=raw-checker-failed, global-statement, no-member, 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 # either give multiple identifier separated by comma (,) or put this option diff --git a/deepface/detectors/RetinaFaceWrapper.py b/deepface/detectors/RetinaFaceWrapper.py index 93ed3e1..514d962 100644 --- a/deepface/detectors/RetinaFaceWrapper.py +++ b/deepface/detectors/RetinaFaceWrapper.py @@ -19,8 +19,8 @@ def detect_face(face_detector, img, align=True): obj = RetinaFace.detect_faces(img, model=face_detector, threshold=0.9) if isinstance(obj, dict): - for item in obj.items(): - identity = item[1] + for face_idx in obj.keys(): + identity = obj[face_idx] facial_area = identity["facial_area"] y = facial_area[1]