Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seems a bug in function "get_landmarks_from_directory( )" #303

Open
BIGJUN777 opened this issue Jan 5, 2022 · 0 comments
Open

It seems a bug in function "get_landmarks_from_directory( )" #303

BIGJUN777 opened this issue Jan 5, 2022 · 0 comments

Comments

@BIGJUN777
Copy link

BIGJUN777 commented Jan 5, 2022

Hi there,

When I used the get_landmarks_from_directory( ) function as recommended here, it was strange that the detected results of some images were wrong. Please check the images below:
image

While when I used the get_landmarks( ) function to process each image with the code below, it turned out that all detected results seemed good.

def my_get_landmarks_from_directory(fa, path):
    img_list_raw = glob.glob(os.path.join(path, '*'))
    img_list = [p for p in img_list_raw if is_image(p)]
    predictions, no_face_detected = {}, []
    for p in tqdm(img_list):
        input = cv2.imread(p)
        preds = fa.get_landmarks(input[..., ::-1])
        if preds is None:
            no_face_detected.append(p)
        predictions[p] = preds if preds is None else preds[0].tolist()
    
    return predictions, no_face_detected

image

I tried to dive into the source code to figure out if there were any bugs in get_landmarks_from_directory( ) function but everything seemed good, which made me confused. I attach two images in which I got wrong results when using get_landmarks_from_directory( ). Please test them. Thanks a lot.
14527
19432

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant