luo3300612 / image-captioning-DLCT

Official pytorch implementation of paper "Dual-Level Collaborative Transformer for Image Captioning" (AAAI 2021).
BSD 3-Clause "New" or "Revised" License
193 stars 31 forks source link

The Code to generate the caption of a figure. #34

Open z972778371 opened 2 years ago

z972778371 commented 2 years ago

Thank you so much for sharing your brilliant code with us. But could you share me the code to generate the caption for a image like the Figure 1 in your artical? I would appreciate it if you could share it with me! ^_^

eric8607242 commented 2 years ago

Hi, I create this repo for generating the caption of an image.

In this repo, I incorporate the repo image-captioning-DLCT and grid-feats-vqa to make image caption model inference more easily.

Given the image path, you can get the image caption sentence with only two function calls (initialize_model_states and inference).

Hope this repo helps you well. Thanks!