How asilyn/traffic-sign-ml works
Traffic Sign Recognition ML is a browser-based traffic-sign detection product backed by a Flask inference API. Users choose an image or camera feed, submit frames for classification, and view confidence-ranked results; the UI also supports live overlays and locally cached history. The backend preprocesses images and returns class metadata and alternate predictions. Training scripts are a separate model-preparation capability. Several frontend and ML modules are unsampled, so their internal links are omitted or marked unverified rather than inferred from filenames.
Main entry points: Image-input.tsx Image input · routes.py API routes · predict_service.py CNN predictor · DetectionPage.tsx Detection page
Components 18
Web experience
- Landing page
client/src/components/landing-page/LandingPage.tsx - Detection page
client/src/components/detection-page/DetectionPage.tsx - Detection history
client/src/components/detection-history/DetectionHistory.tsx - Detection results
client/src/components/detection-result/DetectionResult.tsx - Prediction types
client/src/types/prediction.ts
Image capture
- Image input
client/src/components/image-input/Image-input.tsx - Upload view
client/src/components/image-input/UploadView.tsx - Camera view
client/src/components/image-input/CameraView.tsx - Capture utilities
client/src/components/image-input/utils
Inference service
- API client
client/src/lib/api.ts - Flask app
server/app/__init__.py - API routes
server/app/api/routes.py - CNN predictor
server/app/ml/predict_service.py
ML lifecycle
- Model artifacts
server/app/ml/dataset - Model training
server/app/ml/notebook/train2.py - Detection classifier
server/app/ml/services/detection_classifier.py - YOLO inference
server/app/ml/yolo_predict_service.py
Other components
- Driver
Connections 18
- Driver → Landing page: opens
client/src/components/landing-page/LandingPage.tsx - Landing page → Detection page: navigates to
client/src/components/landing-page/LandingPage.tsx - Driver → Image input: provides image
README.md - Image input → Upload view: renders
client/src/components/image-input/Image-input.tsx - Image input → Camera view: renders
client/src/components/image-input/Image-input.tsx - Image input → Capture utilities: uses
client/src/components/image-input/Image-input.tsx - Image input → API client: submits frames
- API client → API routes: posts image
client/src/lib/api.ts - API routes → CNN predictor: calls predictor
server/app/api/routes.py - CNN predictor → Model artifacts: loads model
server/app/ml/predict_service.py - CNN predictor → API routes: returns predictions
server/app/api/routes.py - API routes → Flask app: registers routes
server/app/__init__.py - Detection page → Detection results: shows results
- Detection page → Detection history: shows history
- API client → Prediction types: types results
client/src/lib/api.ts - Model training → Model artifacts: produces artifacts
README.md - Detection classifier → CNN predictor: optional classifier
- YOLO inference → API routes: optional detection