Which libraries can be used for image caption generation?
Image Caption Generation is an interesting problem to work on. I think your question was to know if there are any open-source libraries with built-in functions for Image Captioning. You can build Image Caption Generation models using Frameworks like Tensorflow, PyTorch, and Trax.
I'd also recommend you to read the following papers:

Show and Tell: A Neural Image Caption Generator. Link
Transfer learning from language models to image caption generators: Better models may not transfer better. Link
Image Captioning with Unseen Objects. Link

Also, here are a couple of blog posts you can read:

How to Develop a Deep Learning Photo Caption Generator from Scratch
Learn to Build Image Caption Generator with CNN &amp; LSTM
Image Captioning with Keras