How sharath3002/pothole_detection works
This Flask application detects potholes in submitted images, saves annotated detections and their coordinates, and exposes a map view of stored reports. Its main runtime flow is image submission → YOLO inference → annotated-image response, with detected potholes also persisted for later retrieval. The README also shows video-output and performance-log demos, but the sampled source does not establish their implementation; the map page’s client-side behavior is likewise not shown.
Main entry points: app.py Flask routes · index.html Home page · map.html Map page · best_float16.tflite YOLO model
Components 13
Web Interface
- Flask routes
app.py - Home page
templates/index.html - Map page
templates/map.html
Pothole Detection
- YOLO inference
app.py - YOLO model
models/best_saved_model/best_float16.tflite - Image decoding
app.py - Frame annotation
app.py - Response encoding
app.py - Video and metrics demos
README.md
Reports and Storage
- Pothole record
app.py - PostgreSQL
app.py - Saved images
app.py
Other components
- User
Connections 14
- User → Flask routes: submits image
app.py - Flask routes → Home page: renders
app.py - Flask routes → Map page: renders
app.py - Flask routes → Image decoding: decodes input
app.py - Image decoding → YOLO inference: passes frame
app.py - YOLO inference → YOLO model: predicts with
app.py - YOLO inference → Frame annotation: plots detections
app.py - Frame annotation → Saved images: writes image
app.py - Frame annotation → Pothole record: sets report image
app.py - Pothole record → PostgreSQL: commits report
app.py - Frame annotation → Response encoding: encodes result
app.py - Response encoding → Flask routes: returns response
app.py - Flask routes → PostgreSQL: queries reports
app.py - Flask routes → User: returns map data
app.py