How sahilkhan-7/accident-damage-detection works
Main Components
A. Client Layer:
• Web Interface (HTML/CSS/JavaScript)
• Different views (login, signup, dashboard, estimate)
• Image upload interface
B. Application Layer:
• Flask Web Server
• Authentication System
• Image Processing Pipeline
• Cost Estimation Engine
C. AI/ML Layer:
• YOLOv8 Model
• Object Detection System
• Damage Assessment
D. Data Layer:
• MySQL Database
• File Storage (for images)
• JSON Configuration (car_parts_prices.json)
Component Relationships and Data Flow
User Interface → Flask Server → AI Model → Database
• ↑ ↓
• Cost Estimation ────┘
Specific Implementation Details
• Frontend Templates (templates/*.html)
• Core Application (app.py)
• Model Storage (models/best.pt)
• Configuration (config.py)
• Database Schema (db_schema.sql)
Key Interactions to Highlight
A. User Flow:
• Authentication flow (login/signup)
• Image upload process
• Result visualization
B. Processing Flow:
• Image preprocessing
• Model inference
• Cost calculation
• Result storage
C. Data Flow:
• Database operations
• File storage operations
• Configuration management
Technical Details
A. Technologies:
• Flask (Web Framework)
• YOLOv8 (AI Model)
• MySQL (Database)
• OpenCV (Image Processing)
• Ultralytics (YOLOv8 Integration)
B. API Endpoints:
• Authentication endpoints
• Image upload endpoint
• Estimation endpoint
• Profile management endpoints
Data Storage Layer (Bottom)
Left to right approach:
• Input processing → Core processing → Output generation
Remember to:
• Use consistent symbols and notation
• Brief descriptions for complex components
• Both data and control flow
• Error handling paths
• System boundaries