How durgaprasaddammu/pedestrian-detection works
This is a pedestrian-detection dashboard backed by a FastAPI service, with a separate script for dataset preparation, model training, evaluation, and plotting. The main user flow uploads or selects an image, routes it to a detector, and displays annotated results. The dashboard also presents model metrics and training histories. Some implementation details are only documented in the README; those relationships are cited there rather than inferred from unsampled code.
Main entry points: app.py FastAPI service · script.js Browser dashboard · Pedestriansdetection.py Model training · model Saved models and data
Components 17
Dashboard and API
- Browser dashboard
static/script.js - FastAPI service
app.py - Sample images
testImages
Detection and models
- Image decoding and routing
app.py - OpenCV HOG detector
app.py - Custom YOLO detector
app.py - Attention layer
Attention.py - Saved models and data
model - Annotation and response
app.py
Model comparisons
- Metrics cache and endpoint
app.py - History cache and endpoint
app.py - Comparison charts
static/script.js
Training and evaluation
- Dataset preparation
Pedestriansdetection.py - Model training
Pedestriansdetection.py - Metrics evaluation
Pedestriansdetection.py - Training plots
Pedestriansdetection.py
Other components
- Dashboard user
Connections 25
- Dashboard user → Browser dashboard: uses
README.md - Browser dashboard → FastAPI service: requests predictions
static/script.js - Browser dashboard → FastAPI service: fetches metrics
static/script.js - Browser dashboard → FastAPI service: fetches history
static/script.js - Browser dashboard → FastAPI service: loads samples
static/script.js - FastAPI service → Image decoding and routing: routes upload
app.py - Image decoding and routing → OpenCV HOG detector: selects color path
README.md - Image decoding and routing → Custom YOLO detector: selects grayscale path
README.md - Custom YOLO detector → Saved models and data: loads weights
README.md - Custom YOLO detector → Attention layer: uses layer
app.py - OpenCV HOG detector → Annotation and response: provides detections
README.md - Custom YOLO detector → Annotation and response: provides detections
README.md - Annotation and response → FastAPI service: returns result
app.py - FastAPI service → Sample images: lists and reads
app.py - FastAPI service → Metrics cache and endpoint: serves metrics
app.py - FastAPI service → History cache and endpoint: serves history
app.py - Metrics cache and endpoint → Comparison charts: supplies comparisons
static/script.js - History cache and endpoint → Comparison charts: supplies chart data
static/script.js - Dataset preparation → Saved models and data: saves processed data
Pedestriansdetection.py - Dataset preparation → Model training: provides dataset
Pedestriansdetection.py - Model training → Attention layer: uses layer
Pedestriansdetection.py - Model training → Saved models and data: saves models and histories
README.md - Model training → Metrics evaluation: evaluates models
Pedestriansdetection.py - Metrics evaluation → Training plots: feeds comparisons
Pedestriansdetection.py - Saved models and data → History cache and endpoint: provides histories
README.md