Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available:
1.53.0
metadata
sdk: streamlit
app_file: app.py
TrafCast
A traffic speed prediction system for Los Angeles using LSTM neural networks.
Overview
TrafCast predicts real-time traffic speeds across major Los Angeles highways and roads using deep learning. The system uses an LSTM (Long Short-Term Memory) model trained on historical traffic data to forecast speed patterns.
Model Details
- Architecture: LSTM neural network with 2,191,617 parameters
- Training Data: 32+ million data points from LA traffic sensors
- Performance: Best validation loss of 6.6276, test loss of 6.0229
- Features: Weather data, road characteristics, time patterns, and historical speeds
Quick Start
Prerequisites
- Python 3.8+
- Virtual environment (recommended)
Installation
Clone the repository
git clone <repository-url> cd TrafCastCreate and activate virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activateInstall dependencies
pip install -r requirements.txtRun the application
streamlit run app.py
The app will be available at http://localhost:8501
Usage
- Select roads from the available LA highways
- Choose a date and time for prediction
- Select visualization mode (Predicted, Real, or Comparison)
- Click "Apply Prediction" to generate traffic speed maps
Data
The model was trained on compressed CSV files containing traffic sensor data from major LA roads including I-405, US-101, I-5, and state highways.