Business Context
UrbanSafe, a smart city initiative, aims to enhance pedestrian safety by predicting pedestrian trajectories in real-time using data from city surveillance cameras. This predictive model will help in deploying resources efficiently to prevent accidents and improve urban planning.
Dataset
| Feature Group | Count | Examples |
|---|
| Position | 100K | x_coord, y_coord, timestamp |
| Speed | 100K | speed_x, speed_y |
| Context | 100K | weather, time_of_day, traffic_density |
- Size: 100K samples (each sample represents a time step in a trajectory), 6 features
- Target: Continuous — predicted future coordinates (x, y) of the pedestrian
- Class balance: Continuous regression problem, no class imbalance
- Missing data: 5% missing in speed features due to sensor errors
Requirements
- Design a custom loss function that penalizes large deviations from ground truth trajectory points.
- Implement a recurrent neural network (RNN) or LSTM model to predict future coordinates based on past trajectories and contextual features.
- Evaluate the model's performance using Mean Squared Error (MSE) and visualize the predicted vs. actual trajectories.
- Ensure the model can handle real-time predictions with low latency.
Constraints
- The model must predict future positions within a 2-second horizon with high accuracy.
- The custom loss function should be computationally efficient to allow real-time inference on edge devices.