How gayitrijarajapu/automatic-image-caption-generator works
This is a Streamlit image-captioning app. A user submits an image and language through the browser interface; the Python app validates the request, runs object detection and image captioning, optionally translates the caption, and returns results for display and browser-based speech. The main workflow and model calls are visible in app.py. The README documents browser voice output and the supplied interface, but frontend/index.html was not excerpted, so its internal behavior is not mapped.
Main entry points: app.py Request handling · index.html Browser interface · yolov8m.pt YOLO weights
Components 14
User interface
- Browser interface
frontend/index.html
App workflow
- Request handling
app.py - Image preparation
app.py - Session response
app.py
Image inference
- Cached model loader
app.py - YOLO weights
yolov8m.pt - Object detection
app.py - BLIP caption model
- Caption generation
app.py
Caption outputs
- Detected objects
app.py - Caption translation
app.py - Google Translate
- Browser speech
Other components
- User
Connections 17
- User → Browser interface: submits image
README.md - Browser interface → Request handling: sends request
app.py - Request handling → Image preparation: decodes image
app.py - Request handling → Object detection: analyzes image
app.py - Request handling → Caption generation: analyzes image
app.py - Image preparation → Object detection: provides image
app.py - Image preparation → Caption generation: provides image
app.py - Object detection → Cached model loader: loads detector
app.py - Caption generation → Cached model loader: loads captioner
app.py - Cached model loader → YOLO weights: loads weights
app.py - Object detection → Detected objects: extracts detections
app.py - Caption generation → BLIP caption model: runs inference
app.py - Request handling → Caption translation: translates caption
app.py - Caption translation → Google Translate: requests translation
app.py - Request handling → Session response: stores response
app.py - Session response → Browser interface: returns results
app.py - Browser interface → Browser speech: speaks caption
README.md