Image-Caption icon indicating copy to clipboard operation
Image-Caption copied to clipboard

Is it possible to enable batch captioning?

Open mxc19912008 opened this issue 4 years ago • 1 comments

Hi,

Thanks for the repo! It is very functional!

For the caption.py, is it possible to enable batch captioning? Currently decoding is a bit slow.

Thank you!

mxc19912008 avatar Mar 29 '21 22:03 mxc19912008

Hi,

Thanks for the repo! It is very functional!

For the caption.py, is it possible to enable batch captioning? Currently decoding is a bit slow.

Thank you!

Hi,

Sorry, we don't have a plan to modify it to the batch version, since decoding is an autoregressive process based on beam search, which is hard to track and align the sizes of a batch of matrices. However, u can refer to this link: https://zhuanlan.zhihu.com/p/167072494 By the way, may multiprocessing help to speed up without redesigning the batched beam search?

Thanks.

RoyalSkye avatar Mar 30 '21 05:03 RoyalSkye