ketan0808/OpenPitWall
<div align="center">
๐๏ธ OpenPitwall
Enterprise F1 AI Strategy Engine
<br/>
"The Pitwall Runs on Math. Ours Runs on Machine Learning."
<br/>
     
<br/>
An open-source-inspired, enterprise-grade Formula 1 race strategy platform. Predicts tire degradation cliffs, auto-generates race strategy reports, and provides context-aware AI decisions โ all running at 10Hz, locally, with zero cloud dependency.
</div>
๐ฏ What Problem Does This Solve?
In modern F1, the difference between P1 and P3 is often a single correct pit call made 3 laps earlier than your competitor. Strategy teams at top constructors use proprietary systems worth millions to forecast tire degradation, undercut windows, and compound selection.
OpenPitwall democratizes that intelligence.
It is a full-stack, production-grade analytics platform that combines:
- Deep Learning to predict tire cliff drop-offs before they happen
- RAG AI that reads historical race documents to add strategic memory
- Real-time telemetry streaming to a professional race cockpit UI
โก Core Capabilities
<table> <tr> <td width="50%">
๐ง Deep Predictive Network
A Stacked 2-Layer LSTM with Multi-Head Attention, Batch Normalization, and Dropout.
- Predicts tire pace delta 1 lap ahead
- Compound-weighted degradation coefficients
- Real-time Confidence Score output
- Cliff detection threshold:
>0.8sdrop = Pit Flag
</td> <td width="50%">
๐ RAG Knowledge Base
A local ChromaDB Vector Database that ingests unstructured documents.
- Upload FIA rulebooks, race reports, setup sheets
- HuggingFace
all-MiniLM-L6-v2embeddings - AI retrieves historical context before every strategy call
- "In 2022 at Monza on Lap 18, the undercut was decisive..."
</td> </tr> <tr> <td width="50%">
๐ก Real-Time Telemetry Engine
A FastAPI WebSocket multiplexer broadcasting at 10Hz.
- FastF1 historical data ingestion
- Custom CSV / JSON / XLSX data upload API
- Structured lap-by-lap SQLite persistence
- Live tire temp, RPM, engine temp, fuel load
</td> <td width="50%">
๐ AI Race Strategy Report
One click generates a full post-race debrief.
- LLaMA 3 Chief Strategist analysis
- What went well, what failed, why
- RAG-augmented historical comparisons
- Instant PDF export for team debriefs
</td> </tr> </table>
๐๏ธ System Architecture
graph TD
%% Structured Pipeline
A[FastF1 External API / Live CAN Bus] -->|Telemetry Stream| B(FastAPI Data Ingestion)
B -->|Cleaned Laps| C{PyTorch LSTM Inference}
B -->|Lap Times| D[(SQLite Data Warehouse)]
%% Unstructured Pipeline (RAG)
U1[Historical PDFs / Rulebooks] --> U2[Recursive Text Splitter]
U2 -->|Embeddings| U3[(ChromaDB Vector Store)]
%% AI Fusion
C -->|Pace & Cliff Metrics| E[Local LLM Race Engineer]
U3 -->|Retrieved Historical Context| E
C -->|Predicted Drop-off| F(WebSocket Multiplexer)
E -->|Context-Aware Strategy Call| F
%% Frontend
F -->|10Hz JSON Payload| G[Next.js Frontend]๐ Prediction Inputs โ What the Model Reads
Output: Predicted next-lap drop-off (seconds) + Confidence Score (%)
๐ฅ๏ธ The Cockpit UI
The dashboard is designed to look and feel like a professional F1 pitwall display:
- Dark telemetry cockpit aesthetic with real-time animated gauges
- Fixed ETL Console โ data streams in without disrupting layout
- AI Strategy Terminal โ radio-style strategy calls in real time
- Pace Forecasting Chart โ LSTM look-ahead visualized vs. actual
- Knowledge Base Tab โ drag-and-drop PDF vectorization interface
๐ฌ Technology Stack
๐ค Interested in Collaboration?
This project is under active development as a professional-grade motorsport analytics platform.
If you are from an F1, F2, MotoGP, or endurance racing team and want to explore how this system could enhance your data science or strategy engineering workflow โ I would love to connect.
๐ฌ Get in touch: GitHub Profile
Source code is maintained in a private repository to protect proprietary IP. Architecture documentation, model specifications, and API contracts available on request.
<div align="center">
Built with passion for motorsport, mathematics, and machine learning.
Star โญ this repo if you think AI belongs on the pitwall.
</div>
