Guess I’m late. Although I’m not an expert, I can give you some idea. You can use some network like ResNet, DenseNet to ‘encode’ the image into a 1-D tensor, and then use this tensor to generate captions using a transformer.