Transformer
More coherent captions
LSTM
Recurrent baseline
Attention
Inspectable focus
Trained a CNN-based image-captioning pipeline and compared LSTM and Transformer decoders. Built a Streamlit UI so you can try the resulting captions yourself.

I wanted to build something that could look at an image and describe what's in it. The idea was straightforward, but getting it to actually work well took some effort.
I used VGG-16 as the image encoder to extract feature vectors, then fed those into two different decoders: an LSTM and a Transformer with attention. I wrapped the whole thing in a Streamlit app so you can upload any image and get a caption back in a few seconds. It's a simple UI, but it makes the model feel real instead of just numbers in a notebook. The hardest part was honestly the training pipeline. VGG-16 is memory-hungry, the Transformer needed careful hyperparameter tuning, and I spent more time on data preprocessing than I'd like to admit.
The LSTM provided a useful recurrent baseline, while the Transformer produced more coherent, context-aware captions in qualitative comparisons. Its attention mechanism also made it easier to inspect which image features influenced each generated token.
VGG-16 for image feature extraction, then LSTM and Transformer decoders for generating captions
Compared a recurrent LSTM baseline with a Transformer whose attention produced more coherent captions
Streamlit app where you upload an image and get a caption back in seconds
Tuned the pipeline so inference runs fast enough to feel instant
Friction
Takeaways