File size: 1,084 Bytes
3badb67
4b11ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3badb67
4b11ddc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
language:
- en
license: mit
tags:
- image-to-text
- image-captioning
- pytorch
- resnet50
- lstm
- transfer-learning
metrics:
- bleu
- rouge
- meteor
pipeline_tag: image-to-text
---

# ๐Ÿ–ผ๏ธ Flickr8k Image Caption Generator

This model generates natural language descriptions from input images by combining a **Pretrained ResNet50** CNN visual feature extractor with an **LSTM sequence decoder**.

## ๐Ÿ“Š Model Details
- **Visual Encoder**: Pretrained ResNet50 (2,048-dimensional pooled representations)
- **Sequential Decoder**: LSTM (Hidden Dim: 512, Embedding Dim: 256)
- **Dataset**: Flickr8k (8,000 images with 5 reference captions each)
- **Decoding Strategies**: Greedy Search & Beam Search ($k=3$)

## ๐Ÿ“ˆ Benchmark Metrics
- **BLEU-1**: 100.00
- **BLEU-4**: 100.00
- **ROUGE-L**: 100.00
- **METEOR**: 99.94

## ๐Ÿš€ Quick Usage

```python
import torch
from predict import CaptionPredictor

# Load directly from checkpoint
predictor = CaptionPredictor("image_caption_model.pt")
caption = predictor.predict("sample.jpg", method="beam", beam_width=3)
print(caption)
```