Downloads · 30 days
16
40% of all-time downloads
anmol-unitmole/image-caption-generation-vision-encoder-decoder-model
image-caption-generation-vision-encoder-decoder-model is a image-to-text model from anmol-unitmole. Use it when you need a caption or text from an image. It is set up for transformers.
anmol-unitmole/image-caption-generation-vision-encoder-decoder-model
Downloads · 30 days
16
40% of all-time downloads
All-time downloads
40
Public
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.onnx1 GB · 100%
From the Hugging Face model README
anmol-unitmole/image-caption-generation-vision-encoder-decoder-model
image-caption-generation-vision-encoder-decoder-model
Training, held-out evaluation, browser-compatible ONNX export, dynamic quantization, and PyTorch-versus-ONNX parity validation are complete.
This repository contains the browser-compatible model configuration, processor, tokenizer, generation configuration, and quantized ONNX artifacts for a fine-tuned ViT-GPT-2 Vision Encoder-Decoder image-captioning model.
The model was fine-tuned locally using an NVIDIA GeForce RTX 5090. The browser artifacts are intended for Transformers.js and ONNX Runtime Web inference inside a static Hugging Face Space.
The final public Static Space remains subject to successful browser loading and end-to-end caption-generation validation.
nlpconnect/vit-gpt2-image-captioningVisionEncoderDecoderModelXenova/vit-gpt2-image-captioninganmol-unitmole/image-caption-generation-vision-encoder-decoder-modelThe model generates English-language captions from input images.
Supported project features include:
The model was trained using a staged adaptation strategy.
Training controls included:
The final experiment was executed locally using:
The primary experiment used Flickr30k.
The processed experiment contained:
| Split | Unique images | Caption records |
|---|---|---|
| Training | 29,000 | 144,767 |
| Validation | 1,014 | 5,062 |
| Test | 1,000 | 4,985 |
Multiple reference captions remained grouped for evaluation.
The complete Flickr30k dataset is not redistributed through this model repository. Users must obtain the dataset according to its original access and licensing requirements.
Supported browser image formats:
Input processing includes:
The model may provide:
Generated captions are model predictions and are not guaranteed to be factually correct.
The pretrained baseline and fine-tuned model were evaluated on the same held-out 1,000-image Flickr30k test subset.
| Metric | Pretrained baseline | Fine-tuned model |
|---|---|---|
| BLEU-1 | 0.5779 | 0.4350 |
| BLEU-4 | 0.1366 | 0.1078 |
| METEOR | 0.3337 | 0.4050 |
| ROUGE-L | 0.3759 | 0.3041 |
| CIDEr | 0.2336 | 0.0595 |
| CLIPScore | 0.6601 | 0.7211 |
| Distinct-1 | 0.0652 | 0.0708 |
| Distinct-2 | 0.2331 | 0.2478 |
| Unique-caption ratio | 0.9500 | 1.0000 |
| Average repetition rate | 0.1126 | 0.1463 |
| Mean GPU latency | 0.1163 seconds | 0.2762 seconds |
The fine-tuned model did not outperform the pretrained baseline on every metric.
Observed improvements included:
Observed regressions included:
These mixed results are reported intentionally. The experiment demonstrates that fine-tuning can improve semantic similarity and lexical diversity while reducing reference-overlap metrics or generation efficiency.
The fine-tuned model should therefore not be described as universally superior to the pretrained baseline.
The fine-tuned Python checkpoint contains approximately:
Browser deployment uses quantized ONNX artifacts rather than the original PyTorch checkpoint.
The model was exported using the image-to-text-with-past task and ONNX opset 18.
The browser export produced:
encoder_model.onnxdecoder_model.onnxdecoder_with_past_model.onnxdecoder_model_merged.onnxThe files were then processed through dynamic ONNX Runtime quantization.
This repository contains the following quantized ONNX files:
onnx/
├── encoder_model_quantized.onnx
├── decoder_model_quantized.onnx
├── decoder_with_past_model_quantized.onnx
└── decoder_model_merged_quantized.onnx