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
Processing image in batch in testing/evaluation #10
Comments
The inference code is copied from https://github.com/tensorflow/models/blob/master/research/im2txt/im2txt/inference_utils/caption_generator.py#L141 I have a multi-gpu version. I may push to the repository some days later. I can send to you if you want it now. |
Thanks! You may find my email in my github homepage : ) |
image_generator return the image name and image. |
Hi, it seems that for name, sentences in tqdm(pool.imap(run, image_generator()),
total=14748) Thanks! |
You don't need the image_val.pkl file. You should re-write image_generator() function. You can just change 14748 to 5000. I was using this code for some other experiment. |
As metioned in #4, the testing/evaluation are slow. One reason is they do not support multi-gpu for one model.
And I found the crucial reason might be that they iterate images one by one instead of processing them in batch. I notice that you use different dataloaders between training and testing, where tfrec format and placeholder are used in training and testing respectively. I wonder why not testing/evaluation use the same dataloader and similar pipeline as training so that they can also process data in batch.
Parameter
batch_size
is defined incaption_infer.py
but it seems that the size larger than one will cause errors.unsupervised_captioning/caption_infer.py
Line 29 in ae17dc7
Could you please kindly provide a batch version?
Thanks!
The text was updated successfully, but these errors were encountered: