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

API for generating images from captions #3

Open
Jessime opened this issue Feb 5, 2021 · 0 comments
Open

API for generating images from captions #3

Jessime opened this issue Feb 5, 2021 · 0 comments

Comments

@Jessime
Copy link

Jessime commented Feb 5, 2021

This is a cool tool, and I really enjoy the images I've gotten from the Demo.

I was hoping one of two things were possible, and I'm wondering if I'm just missing something basic. First, is there a web API? It'd be amazing to be able to do something similar to:

result = requests.get('https://vision-explorer.allenai.org/text_to_image_generation_api', data={'caption': 'Diamond rose horse'})
save_image(result.json()['image_str'])

Or, (and it looks like this is to something that I might actually be able to do) if there's no web API:

pip install -r requirements.txt
wget -O image_generator/snap/pretrained/G_60.pth https://ai2-vision-x-lxmert.s3-us-west-2.amazonaws.com/image_generator/G_60.pth
./image_generator/scripts/make_image.py --caption "Diamond rose horse" --outpath my_weird_pic.png

I guess my question is: if all I care about is having a caption and getting an image programmatically, what's the easiest way of doing that?

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