How rajesh-22114/accident-detection works
This is a Flask image-classification application for detecting traffic accidents. The main workflow is: a user submits an image URL, the app preprocesses the downloaded image, runs TensorFlow Lite inference, and returns an accident/non-accident label. The README also documents Xception transfer learning and local training; the notebook is present, but its contents were not sampled, so its internal steps and wiring are not represented.
Main entry points: app.py Flask app · accident_model.tflite TFLite model · capstone.ipynb Xception training · index.html Prediction page
Components 8
Web application
- Flask app
app.py - Prediction page
templates/index.html
Image inference
- Image preprocessing
app.py - TFLite interpreter
app.py - TFLite model
accident_model.tflite - Class prediction
app.py
Model development
- Xception training
capstone.ipynb
Other components
- User
Connections 8
- User → Flask app: submits image URL
- Flask app → Prediction page: renders page
- Flask app → Image preprocessing: preprocesses URL
- Flask app → TFLite interpreter: invokes inference
- TFLite interpreter → TFLite model: loads model
- Flask app → Class prediction: selects class
- Flask app → User: returns prediction
- Xception training → TFLite model: exports model