Spaces:
Running on Zero
Download README.md from AdhamAshraf/image_caption_generator: direct link, hf CLI and curl.
- Browser
- Download file 1.65 kB
-
https://huggingface.co/spaces/AdhamAshraf/image_caption_generator/resolve/main/README.md
- Command line
-
hf download hf://spaces/AdhamAshraf/image_caption_generator/README.md
-
curl -L -o README.md https://huggingface.co/spaces/AdhamAshraf/image_caption_generator/resolve/main/README.md
A newer version of the Gradio SDK is available: 6.31.0
title: Image Caption Generator
emoji: 👁
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 6.26.0
python_version: '3.12'
app_file: app.py
pinned: false
Image Caption Generator
Upload an image and get an automatically generated caption. Built with a ResNet50 (frozen, transfer learning) + LSTM decoder, trained on the Flickr8k dataset.
This Space runs the regularized model checkpoint with beam search decoding (beam width 3) — the best-performing configuration from the project's optimization experiments (BLEU-4 = 0.1557 on the held-out test set, a ~27% relative improvement over the initial baseline).
- Full project, code, and documentation: https://github.com/adhamashraf7788/Image-Caption-Generator
- Model weights: https://huggingface.co/AdhamAshraf/image-caption-generator
How it works
- Image is resized/cropped/normalized and passed through a frozen, ImageNet-pretrained ResNet50 to extract a 2048-d feature vector.
- The feature vector is projected into a 256-d embedding and fed as the first input to an LSTM decoder.
- The LSTM generates the caption word-by-word using beam search (keeping the top-3 candidate sequences at each step, rather than greedily committing to a single best word).
See the main repo's README for full details on the dataset, architecture, training process, evaluation metrics, and optimization experiments (beam search + regularization comparisons).
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference