CLIP_prefix_caption icon indicating copy to clipboard operation
CLIP_prefix_caption copied to clipboard

inference

Open Twilighter9527 opened this issue 2 years ago • 4 comments

when I run the generate_beam for the caption,there are many space in the caption,Do you know why, thank you. image

Twilighter9527 avatar Jun 20 '22 03:06 Twilighter9527

Have you cheacked your training data? Your training captions may contain extra spaces which leads to this.

baaaad avatar Jun 23 '22 07:06 baaaad

there is not space in train data.And when inference, it's just need the clip_embedding tensor,not need tha caption.isn't it? image

Twilighter9527 avatar Jun 23 '22 07:06 Twilighter9527

I find that not all of your training caption end with the '.', since the end token for beamsearch is '.', thus the model may not know when to end inference but keeps predcting the 'space' till reach the max inference length. Yes, there's no need to input the caption when inference, i mean the training data will influence your model's ability when inference. Maybe you can process the training caption to all end with '.' and re-training your model to have a try?

baaaad avatar Jun 23 '22 07:06 baaaad

I find that not all of your training caption end with the '.', since the end token for beamsearch is '.', thus the model may not know when to end inference but keeps predcting the 'space' till reach the max inference length. Yes, there's no need to input the caption when inference, i mean the training data will influence your model's ability when inference. Maybe you can process the training caption to all end with '.' and re-training your model to have a try?

thank you. I will try it.

Twilighter9527 avatar Jun 23 '22 08:06 Twilighter9527

I got the same situation, may I ask that if this problem is solved through "process the training caption to all end with '.'" ?

baiyuting avatar Nov 20 '22 07:11 baiyuting

I really want to know how you generate this caption, I am new to this direction, do not know how you run the result, I follow the readme run, it seems that I can not evaluate the model and predict the caption

rongtongxueya avatar Jul 07 '23 00:07 rongtongxueya

I really want to know how you generate this caption, I am new to this direction, do not know how you run the result, I follow the readme run, it seems that I can not evaluate the model and predict the caption

https://github.com/thandal/CLIP_prefix_caption

Twilighter9527 avatar Jul 08 '23 08:07 Twilighter9527