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

Online images and base64 images support #1361

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

veedata
Copy link

@veedata veedata commented Aug 25, 2021

This PR adds the functionality to be able to load images directly from a URL and also allows for reading a base64 image. Primary motivation for creation of this feature is with the extensive online work being done, it is easier to have an all-in-one solution than to have a user import another library and have additional code unrelated to the user's use case.

Features

  • Support to load base 64 images
  • Support to directly load online images

Code Examples

Online Images

import face-recognition
image = load_image_online(r'https://github.com/ageitgey/face_recognition/blob/master/tests/test_images/obama.jpg?raw=true')
face_locations = face_recognition.face_locations(image)

Base64 Image

import face-recognition
image = load_image_file(base64_string, base64_image=True)
face_locations = face_recognition.face_locations(image)

Tests

  • docstring in function
  • flake8 formatting check
  • Added Tests for features
  • Github Actions all tests passing (3.5-3.9)

@Bah1996
Copy link

Bah1996 commented Dec 21, 2021

this code doesn't work for me

@veedata
Copy link
Author

veedata commented Dec 21, 2021

@Bah1996 the code in the PR still works for me.

Can you give me more details on how you installed the library and code you used? Additionally, steps to re-create the issue will also help me fix things.

@Bah1996
Copy link

Bah1996 commented Dec 22, 2021

can you give me the program code you used??

@Bah1996
Copy link

Bah1996 commented Dec 22, 2021

i used it implemented load_online_images

@Bah1996
Copy link

Bah1996 commented Dec 23, 2021

i want to use on django as REST API

@Bah1996
Copy link

Bah1996 commented Dec 23, 2021

@veedata i want to use on django as REST API

@trishantpahwa
Copy link

Why not merge yet?

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

Successfully merging this pull request may close these issues.

None yet

3 participants