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

Generated images don't correspond to caption #34

Open
shenkev opened this issue Oct 11, 2017 · 10 comments
Open

Generated images don't correspond to caption #34

shenkev opened this issue Oct 11, 2017 · 10 comments

Comments

@shenkev
Copy link

shenkev commented Oct 11, 2017

Maybe I'm doing something stupid but essentially I followed your generating images (with pretrained model) steps:

python generate_thought_vectors.py --caption_file="Data/sample_captions.txt"

where sample_captions.txt has just these words: "the flower has yellow petals and the center of it is brown" (Is this format correct?)

python generate_images.py --model_path=Data/Models/latest_model_flowers_temp.ckpt --n_images=8

A single combined_image_0.jpg comes out in the val_samples folder but the images are DO NOT "have yellow petals and the center of it is brown". As far as I can tell, the model is not conditioning on the text properly. What am I doing wrong?

image

@paarthneekhara
Copy link
Owner

Can you try a simple caption like "A red flower" just to check if there is no blunder

@shenkev
Copy link
Author

shenkev commented Oct 11, 2017

This is the output for "A red flower" with n=5:

image

@shenkev
Copy link
Author

shenkev commented Oct 11, 2017

Maybe this is relevant?

I replaced ops.py according to the solution mentioned in this issue: #13

Then I changed sigmoid_cross_entropy_with_logits() to take the "logits" and "labels" arguments explicitly. i.e. sigmoid_cross_entropy_with_logits(logits=... , labels=... ) because it complained about passing arguments explicitly.

@paarthneekhara
Copy link
Owner

Well, there seems something wrong for sure. The output should not look messy like above. Did you train the model or use the pretrained one?

@shenkev
Copy link
Author

shenkev commented Oct 15, 2017

I used the pretrained model. I mean the fact that I'm pointing model_path to latest_model_flowers_temp.ckpt should guarantee that model is loaded. Also the name of the file latest_model_flowers_temp.ckpt indicates this is the up-to-date pretrained model.

python generate_images.py --model_path=Data/Models/latest_model_flowers_temp.ckpt --n_images=8

@paarthneekhara
Copy link
Owner

Incase you are still facing troubles, try using a more recent implementation https://github.com/zsdonghao/text-to-image

@shenkev
Copy link
Author

shenkev commented Oct 26, 2017

Thanks, I'll take a look

@chenxinjing
Copy link

chenxinjing commented Dec 4, 2017

@shenkev @paarthneekhara I also encountered the same problem, do you have a solution? I don't modify the parameters. I used tensorflow 1.3.

@Fuhongshuai
Copy link

I tried using a more recent implementation, but also encountered the same problem, do you have a solution?@shenkev @paarthneekhara

@silverlilin
Copy link

Incase you are still facing troubles, try using a more recent implementation https://github.com/zsdonghao/text-to-image

why do i detect the same result? The images obtained from different models are different.

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

5 participants