Skip to content

About

An end-to-end Flask web application that generates contextual visual captions from images using the BLIP vision-language model, with integrated text-to-speech audio synthesis.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Markdown

Image Caption Generator & Text-to-Speech Web Application

An end-to-end deep learning web application built with Flask, TensorFlow/Keras, and gTTS (Google Text-to-Speech). The application processes an input image, extracts deep spatial visual features, generates natural language descriptive captions using a recurrent sequence model, and synthesizes audio playback for accessibility.


Architecture Overview

Input Image │ ▼ Feature Extraction (CNN Backbone / Pre-computed Features) │ ▼ Caption Generation (LSTM / Sequence Model) │ ▼ Generated Text Caption │ ▼ Audio Synthesis (gTTS -> static/audio.mp3) │ ▼ Interactive Flask Web Interface


Features

  • Automated Captioning: Generates contextual natural language sentences describing uploaded images.
  • Audio Playback: Converts generated captions into spoken audio (.mp3) for accessibility.
  • Interactive UI: Clean web interface built with HTML5, CSS3, and JavaScript for seamless image uploads and result previews.
  • Fine-Tuning Workflow: Includes training and fine-tuning pipelines documented in fineTune.ipynb.

Repository Structure

IMGCAPGEN/ ├── app.py # Flask application routes and inference integration ├── main.py # Model inference and feature processing logic ├── fineTune.ipynb # Training, fine-tuning, and feature extraction notebook ├── requirements.txt # Project dependencies ├── static/ │ ├── css/main.css # Web styling │ ├── js/main.js # Frontend interaction logic │ └── audio.mp3 # Synthesized caption audio ├── templates/ │ ├── base.html # Base HTML template layout │ └── index.html # Main upload and dashboard view ├── uploads/ # Temporary storage for user-uploaded images (.gitkeep) └── working/ # Pre-trained weights & extracted features (.gitkeep)


Model Weights & Feature Artifacts

Due to GitHub's 100 MB file limit, large pre-trained binaries (features.pkl, model.h5, model1.h5) are hosted externally:

  1. Download the model binaries from [(https://drive.google.com/file/d/175Dhva1B9wj-GI-LrV_LY6gzumigZ8Yj/view)].
  2. Place the extracted files directly into the working/ directory: working/ ├── features.pkl ├── model.h5 └── model1.h5

Getting Started

1. Prerequisites

  • Python 3.8 – 3.11
  • Virtual environment tool (venv)

2. Setup Environment

git clone [https://github.com/](https://github.com/)<YOUR_GITHUB_USERNAME>/<YOUR_REPO_NAME>.git
cd <YOUR_REPO_NAME>

python -m venv venv
venv\Scripts\activate      # On macOS/Linux: source venv/bin/activate
pip install -r requirements.txt
3. Run Application
Bash
python app.py
Open your browser at http://127.0.0.1:5000.

About

An end-to-end Flask web application that generates contextual visual captions from images using the BLIP vision-language model, with integrated text-to-speech audio synthesis.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages