The AI Image Caption Generator is a Python-based application that utilizes OpenAI's CLIP model to generate meaningful captions for images. This tool provides users with an easy-to-use graphical interface (GUI) for selecting images and obtaining captions, along with additional features such as text-to-speech, translation, history tracking, and more.
- AI-Powered Captions – Uses the CLIP model to generate accurate image captions.
- Graphical User Interface (GUI) – Simple and user-friendly UI using Tkinter.
- Image Preview – Displays the selected image before generating a caption.
- Copy to Clipboard – Easily copy captions for further use.
- Text-to-Speech – Listen to the generated captions using a speech engine.
- Translation Support – Translate captions into multiple languages.
- Caption History – Stores generated captions for reference.
- Colorful Theme – An elegant and visually appealing UI.
- Multi-Device Support – Runs on both Windows and macOS.
- Lightweight & Fast – Works efficiently without high system requirements.
Ensure you have Python 3.8+ installed on your system. Install the required dependencies using the command below:
pip install torch torchvision torchaudio clip-by-openai pillow pyperclip pyttsx3 googletrans==4.0.0-rc1 opencv-python-headless tkinterClone the repository and navigate to the project directory:
git clone https://github.com/Burhanali2211/Offline_Caption_Generator.git
cd Offline_Caption_GeneratorRun the Python script:
python Offline_Caption_Generator.py- Click "Choose Image" and select an image.
- The AI generates a caption based on the image content.
- You can copy the caption, listen to it, or translate it.
- View history of previously generated captions.
- Python – Backend processing
- OpenAI CLIP Model – AI-powered captioning
- Tkinter – GUI interface
- PyTTSX3 – Text-to-speech conversion
- Google Translate API – Language translation
- Pyperclip – Clipboard management
This project is open-source and available under the MIT License.
Feel free to fork the repository and submit pull requests with improvements!