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

cannot identify image file <_io.BytesIO object at 0x7f5d0c1f5780> #2

Open
wjq-China opened this issue Dec 8, 2020 · 11 comments
Open

Comments

@wjq-China
Copy link

i'm trying input a url.such as "https://www.freepik.com/free-photo/portrait-white-man-isolated_3199590.htm#page=1&query=Portrait&position=0".After run ,it has a error:cannot identify image file <_io.BytesIO object at 0x7f5d0c1f5780>,why?

@vijishmadhavan
Copy link
Owner

You have to copy the image address, I will upload an instruction video soon.

I have done it for you, Please try it out.
https://image.freepik.com/free-photo/portrait-white-man-isolated_53876-40306.jpg

@wjq-China
Copy link
Author

ok, But how to use my own photo as input

@vijishmadhavan
Copy link
Owner

You will have to upload it to imgur.com or any other website, copy the direct link(something that ends with .jpg). I I know it is difficult as I have not created an app, will do it soon.

Hope you have a good photo with simple background.

@wjq-China
Copy link
Author

Ok, thank you

@miaoYuanyuan
Copy link

miaoYuanyuan commented Dec 19, 2020

ok, But how to use my own photo as input

I try it use my own photo by modify follow code:
`img = PIL.Image.open('/content/pic1.jpeg').convert("RGB")

img_t = T.ToTensor()(img)

img_fast = Image(img_t)

show_image(img_fast, figsize=(7,7), interpolation='nearest');

print(img_fast)

p,img_hr,b = learn.predict(img_fast)

Image(img_hr).show(figsize=(7,7))`

@vijishmadhavan
Copy link
Owner

Did it work?

@miaoYuanyuan
Copy link

yeah, it work well

@antback
Copy link

antback commented Dec 22, 2020

Hi, I have done exactly the same as @miaoYuanyuan but all resulting images look like this:

https://imgur.com/a/nk1w71D

Do you know what could be the problem?

@vijishmadhavan
Copy link
Owner

vijishmadhavan commented Dec 22, 2020 via email

@antback
Copy link

antback commented Dec 22, 2020

I have tested in windows 10 running in VirtualBox and in mac osx. Here is the script I'm using:

https://www.dropbox.com/s/cx1n97klmx3r5uy/artline.py?dl=0

Thanks @vijishmadhavan.

@vijishmadhavan
Copy link
Owner

vijishmadhavan commented Jan 20, 2021 via email

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

4 participants