Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,3 +12,51 @@ short_description: image_caption_generator
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
title: Image Captioning LSTM
|
| 19 |
+
emoji: 📸
|
| 20 |
+
colorFrom: blue
|
| 21 |
+
colorTo: purple
|
| 22 |
+
sdk: gradio
|
| 23 |
+
sdk_version: 4.12.0
|
| 24 |
+
app_file: app.py
|
| 25 |
+
pinned: false
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
# Image Captioning with LSTM
|
| 29 |
+
|
| 30 |
+
This application generates descriptive captions for images using a deep learning model trained on the Flickr8K dataset.
|
| 31 |
+
|
| 32 |
+
## Model Architecture
|
| 33 |
+
|
| 34 |
+
- **Image Encoder**: ResNet50 (pre-trained on ImageNet) extracts visual features
|
| 35 |
+
- **Caption Decoder**: LSTM-based sequence generator with embedding layer
|
| 36 |
+
- **Vocabulary Size**: ~8000 unique words
|
| 37 |
+
- **Max Caption Length**: 40 tokens
|
| 38 |
+
|
| 39 |
+
## Features
|
| 40 |
+
|
| 41 |
+
- **Greedy Search**: Fast caption generation by selecting the most probable word at each step
|
| 42 |
+
- **Beam Search**: Improved caption quality by exploring multiple candidate sequences (k=3)
|
| 43 |
+
|
| 44 |
+
## Training Dataset
|
| 45 |
+
|
| 46 |
+
The model was trained on the Flickr8K dataset containing:
|
| 47 |
+
- 8,000 images
|
| 48 |
+
- 5 captions per image (40,000 captions total)
|
| 49 |
+
|
| 50 |
+
## How to Use
|
| 51 |
+
|
| 52 |
+
1. Upload an image
|
| 53 |
+
2. Choose caption generation method (Greedy or Beam Search)
|
| 54 |
+
3. Click Submit to generate caption
|
| 55 |
+
|
| 56 |
+
## Model Performance
|
| 57 |
+
|
| 58 |
+
The model achieves competitive BLEU scores on the test set, providing natural and descriptive captions for a variety of scenes.
|
| 59 |
+
|
| 60 |
+
## Citation
|
| 61 |
+
|
| 62 |
+
Dataset: M. Hodosh, P. Young and J. Hockenmaier (2013) "Framing Image Description as a Ranking Task: Data, Models and Evaluation Metrics", Journal of Artificial Intelligence Research, Volume 47, pages 853-899
|