Markdown
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.
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
- 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.
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)
Due to GitHub's 100 MB file limit, large pre-trained binaries (features.pkl, model.h5, model1.h5) are hosted externally:
- Download the model binaries from [(https://drive.google.com/file/d/175Dhva1B9wj-GI-LrV_LY6gzumigZ8Yj/view)].
- Place the extracted files directly into the
working/directory: working/ ├── features.pkl ├── model.h5 └── model1.h5
- Python 3.8 – 3.11
- Virtual environment tool (
venv)
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.