OptiCaption is an AI-powered image captioning application that generates natural language descriptions from uploaded images. Built with Streamlit, Hugging Face Transformers, and Microsoft's Florence-2 vision-language model, the application provides accurate, context-aware captions in real time.
- Upload images in multiple formats (JPG, PNG, JPEG, WEBP)
- Generate AI-powered image captions instantly
- Clean and interactive Streamlit interface
- State-of-the-art Vision Language Model (Florence-2)
- Fast and easy deployment
- Supports CPU and GPU execution
- Python
- Streamlit
- Hugging Face Transformers
- PyTorch
- Pillow
- Florence-2 Large
OptiCaption/
│
├── app.py
├── requirements.txt
├── README.md
├── .gitignore
├── assets/
└── screenshots/
git clone https://github.com/your-username/OptiCaption.git
cd OptiCaptionpython -m venv venvWindows:
venv\Scripts\activateLinux/Mac:
source venv/bin/activatepip install -r requirements.txtstreamlit run app.pyThe application will open automatically in your browser.
- Upload an image.
- The image is processed using the Florence-2 Vision-Language Model.
- The model analyzes visual content and context.
- A descriptive caption is generated and displayed.
Input: Image of a dog playing with a ball in a park.
Generated Caption:
"A brown dog playing with a red ball on a grassy field."
- Multi-language caption generation
- Voice narration of captions
- Image tagging and object detection
- Caption customization options
- Cloud deployment with AWS
Contributions are welcome. Feel free to fork the repository and submit pull requests.
This project is licensed under the MIT License.
Tufan Chowdhury
B.Tech CSE Student | Cloud & AI Enthusiast
Connect with me on LinkedIn and GitHub for collaboration and project discussions.