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

How to convert cyffld2._ffld2.FFLDDetection to np array? #7

Open
enlob opened this issue Jan 8, 2021 · 0 comments
Open

How to convert cyffld2._ffld2.FFLDDetection to np array? #7

enlob opened this issue Jan 8, 2021 · 0 comments

Comments

@enlob
Copy link

enlob commented Jan 8, 2021

import cyffld2
from PIL import Image
import numpy as np

if __name__ == "__main__":
    for i in range(10):
        path = 'images/out' + str(i+1) + '.jpg'
        image = np.array(Image.open(path))
        results = cyffld2.detect_frontal_faces(image, threshold=2.)
        print(type(results))
        print(results)
        print('Found {} faces'.format(len(results)))

results is a list of cyffld2._ffld2.FFLDDetection objects. How can I convert those objects to np array to display the face?

@enlob enlob changed the title How to convert ffld2 results to np array How to convert ffld2 results to np array? Jan 8, 2021
@enlob enlob changed the title How to convert ffld2 results to np array? How to convert cyffld2._ffld2.FFLDDetection to np array? Jan 15, 2021
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