How tehzeb/ai-vision-console works
AI Vision Console is a browser-based image-recognition app backed by FastAPI. Users submit images for OCR, object detection, or handwritten-digit classification; the backend decodes uploads, calls the corresponding model service, and returns recognition data and (where applicable) annotated images for display. OCR text can also be sent to offline speech synthesis. The custom digit model has a separate MNIST training workflow. The README documents UI capabilities beyond the sampled frontend excerpt; API and service links are based on sampled source, while UI details are documented capabilities.
Main entry points: main.py FastAPI Routes · image_utils.py Upload Decoding · app.js Recognition UI · ocr_service.py Text Recognition
Components 20
Web Console
- Recognition UI
frontend/js/app.js - Console Page
frontend/index.html - Themes and About
frontend/js/app.js
API Orchestration
- FastAPI Routes
backend/main.py - Runtime Settings
backend/config.py
Recognition Services
- Text Recognition
backend/services/ocr_service.py - Object Detection
backend/services/detection_service.py - Digit Inference
backend/services/digit_service.py - Speech Synthesis
backend/services/tts_service.py
Models and Image
- Upload Decoding
backend/utils/image_utils.py - Image Annotation
backend/utils/image_utils.py - DigitCNN
backend/models/digit_cnn.py - Trained Weights
backend/models/saved - MNIST Trainer
backend/models/train_digit_model.py
Other components
- Console User
- MNIST Dataset
- EasyOCR Engine
- Ultralytics YOLO
- pyttsx3 Engine
- WAV Response
Connections 26
- Console User → Recognition UI: uses
- Console Page → Recognition UI: hosts
- Recognition UI → Themes and About: controls
- Recognition UI → FastAPI Routes: requests
- FastAPI Routes → Console Page: serves
- FastAPI Routes → Runtime Settings: reads settings
- FastAPI Routes → Upload Decoding: decodes upload
- FastAPI Routes → Text Recognition: calls OCR
- FastAPI Routes → Object Detection: calls detector
- FastAPI Routes → Digit Inference: calls inference
- FastAPI Routes → Speech Synthesis: calls synthesis
- Upload Decoding → Text Recognition: passes image
- Upload Decoding → Object Detection: passes image
- Upload Decoding → Digit Inference: passes image
- Text Recognition → EasyOCR Engine: recognizes text
- Object Detection → Ultralytics YOLO: predicts objects
- Text Recognition → Image Annotation: annotates results
- Object Detection → Image Annotation: annotates results
- Digit Inference → DigitCNN: runs inference
- Digit Inference → Trained Weights: loads weights
- MNIST Trainer → MNIST Dataset: loads data
- MNIST Trainer → DigitCNN: trains architecture
- MNIST Trainer → Trained Weights: saves weights
- Speech Synthesis → pyttsx3 Engine: synthesizes speech
- Speech Synthesis → WAV Response: writes WAV
- FastAPI Routes → WAV Response: returns audio