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

Read images from urls #450

Merged
merged 6 commits into from
Mar 9, 2020
Merged

Read images from urls #450

merged 6 commits into from
Mar 9, 2020

Conversation

benjaminpkane
Copy link
Contributor

@benjaminpkane benjaminpkane commented Mar 9, 2020

Closes #449.

import eta.core.image as etai
img = etai.read("https://media.gettyimages.com/photos/red-bus-picture-id171297525?s=612x612")
print(img.shape)

@benjaminpkane benjaminpkane added enhancement Code enhancement feature Work on a feature request labels Mar 9, 2020
@benjaminpkane benjaminpkane requested a review from a team March 9, 2020 12:56
@benjaminpkane benjaminpkane self-assigned this Mar 9, 2020
Copy link
Contributor

@brimoor brimoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Note the one py2/3 comment

eta/core/web.py Outdated

def is_url(filename):
"""Return True if string is an http or ftp path."""
return (isinstance(filename, str) and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For py2/3 compatibility, use isinstance(filename, six.string_types) here!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(the pattern I gave is (I hope) consistently used throughout ETA)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I pulled this function from skimage, and overlooked cleaning it up. Done!

@brimoor brimoor mentioned this pull request Mar 9, 2020
@jasoncorso
Copy link
Contributor

Awesome, thanks for adding this so fast!

@benjaminpkane benjaminpkane merged commit 5da4dc5 into develop Mar 9, 2020
@benjaminpkane benjaminpkane deleted the imread-urls branch March 9, 2020 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Code enhancement feature Work on a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read images from URLs
3 participants