Svashasan Logo
Phase 2 of 6 Internal / Confidential

Prediction Model Report

Prediction Engine v2 · CNN + LSTM + Full Sensor Fusion

Prepared by: Svashasan R&D
Status: Active Review

Executive Assessment

The svashasan_prediction_phase2 codebase (~31 artifacts) represents a significant engineering leap from the Phase 1 notebook prototype. The architecture is now modular, temporally aware, and multi-modal — a strong foundation for the full Svashasan autonomous stack.

Area Score (/10) Status Verdict
Repository Architecture8GoodProper modularization
Data Pipeline6PartialStrong structure, synthetic gaps remain
Model Architecture8GoodMultimodal + temporal reasoning
Training Stack7GoodCallbacks + weighted loss
Inference Design8GoodSequence buffering added
Testing5PartialMinimal coverage
Production Readiness5PartialMissing deployment layer
Autonomous Readiness6ModeratePerception progressing

Overall Phase 2 Score: 6.6 / 10

Phase-2 MVP | Strong Foundation


1. Repository Architecture Review

Phase 2 eliminated the single-notebook dependency entirely. The codebase is now a proper Python package with clean separation of concerns across data, models, training, inference, and config layers.

ComponentStatusNotes
Data separationClean
Model isolationGood abstraction
Training packageProper train/eval split
Inference moduleProduction direction
Config systemYAML present
Deployment moduleEmpty — needs export_onnx.py, ros2_node.py
SimulationEmpty — needs carla_runner.py, metrics.py
CI/CDMissing entirely

Architecture Win: Single-notebook dependency fully removed — codebase is now importable as a robust Python package.

2. Data Layer Review (/data)

Modality Strengths

Sequence loading (T frames)
Temporal batching
Multi-sensor support
Camera preprocessing
IMU preprocessing (6-axis)
GPS preprocessing (relative)
LiDAR BEV embedding

Structural Gaps

IssuePriority
LiDAR embedding-only layoutHigh
Missing timestamp sync layerCritical
Sensor validation missing on loadMedium
Dataset schema checks absentMedium
Integrity Directives Needed: timestamp_align() | validate_modalities() | sync_sensors()

3. Model Architecture Review (/models)

CNN Branch (/cnn.py)

Inspired by the DAVE-2 blueprint incorporating BatchNorm, Dropout layers, and configurable filter dimensions. Integrated with TimeDistributed wrapper frameworks to facilitate shared weight evaluation sequentially across all T active frames.

Temporal Layer (/temporal.py)

LSTM encoder (2-layer stacked)Active
Transformer encoderPhase 3 Stub
Sequence processing support
Drop-in module wrapper designsConfig-driven only

Fusion Model (/fusion.py)

The 6-branch temporal fusion engine represents the primary algorithmic progress of Phase 2. Inputs are mapped per-frame via unified TimeDistributed layers, concatenated sequentially, and routed through a stacked 2-layer LSTM stack prior to processing in dual-output command heads.

Multi-modal fusion (6 inputs)
Sequence reasoning flow Stacked LSTM
Dual command heads (steer/throttle)
YOLO perception alignment
Attention-driven fusion module Phase 3
Trajectory projection pathways Planned Add
Occupancy forecast pipeline Critical Gap
Autonomous planning head Critical Gap

4. Perception Review (/perception.py)

YOLOv8n architecture is aligned to AV navigation requirements via specialized category constraints, scene coordinate generation, and strongly typed output layouts.

Currently Implemented
  • YOLO AV category filtering
  • Scene coordinate mappings
  • DetectionResult structures
Planned Extensions
  • Dynamic object tracking (DeepSORT)
  • Lane boundary estimation (LaneNet)
  • Depth computation networks (MiDaS)

5. Training Review (/trainer.py)

FeatureStatus
Weighted steering/throttle loss (0.7 / 0.3)
Early stopping mechanisms
Best model checkpoint exports
TensorBoard logging alignment
MLflow platform synchronization
Mixed precision execution (Float16)Verify setting flag

6. Evaluation Review (/evaluate.py)

Configured Local Diagnostics

Steering error indicators
Throttle error metrics
In-sequence variation rates
Worst-case tail limits (P95)

Required Target Autonomy Metrics

Steering command jerkHigh priority
Geometric deviation vectorsHigh priority
Driver takeover occurrencesCritical Gap
Disengagement frequencyCritical Gap

7. Inference Review (/predictor.py)

Primary production asset: Code structure meets modular implementation guidelines.

Rolling sensor input buffer

Deque mapping active

Per-frame processing loops

Target latency metrics defined

Typed controller return structures

Fully integrated

Pre-processing pipelines

Fully integrated

Asynchronous inputs pipeline

Planned add

ONNX runtime deployment paths

Requires integration

TensorRT optimized execution

Requires integration

ROS2 wrapper nodes

Vehicle execution priority

8. Testing Review

Current coverage limits: ~20–25% of source paths (active package: tests/test_models.py)

Model verification: Partial Loader tests End-to-end pipelines Execution benchmarks

Target Test Suite Directory Structure: test_loader.py · test_preprocess.py · test_inference.py · test_training.py · test_pipeline.py

9. Empty Modules — Critical Gap

FolderStatus & PriorityFiles Needed
deployment/
Empty High
export_onnx.py, tensorrt.py, ros2_node.py
simulation/
Empty Critical
carla_runner.py, metrics.py, scenario_runner.py

10. Technical Debt Summary

  • Empty deployment stack (ONNX, TensorRT, ROS2) High
  • Empty simulation layer (CARLA integration) Critical
  • Transformer temporal encoder modules Medium
  • Visual tracking and object path estimation (DeepSORT) High
  • Aut autonomy planning pipelines Critical

11. Founder Readiness Assessment

Phase Progress

Phase 1 Complete

Notebook prototype layouts

Phase 2 Current

Modular prediction engine architecture

Phase 3 In Progress

Transformer layers + path projection heads

Estimated AV Stack Maturity

Prediction Engine 70%
Perception 45%
Planning 5%
Overall AV Stack Integration 30%

12. Benchmark Performances & Targets

Performance Artifact Status: The repository currently defines how performance will be measured, but no active benchmark run artifacts exist (metrics.json, MLflow runs, checkpoints, evaluation outputs, etc.). The codebase does not contain actual training outputs or saved evaluation runs, so achieved benchmark performance is not reported yet. What exists below are benchmark targets and the evaluation framework.

Phase-2 Benchmark Targets

Category Metric Target Unit Status
SteeringMAE< 0.04radTarget defined
SteeringMAE< 2.3degreesEquivalent target
SteeringRMSENot specifiedradPost-Training
SteeringClose to 1.0scorePost-Training
ThrottleMAE< 0.05normalizedTarget defined
TemporalSteering Consistency< 0.02rad/frameTarget defined

Evaluation Suite Mathematical Formulations

Verification math deployed in the training/evaluate.py evaluation script:

Metric Group Implemented Formula
MAE (Steer/Throttle)mean(abs(y_true − y_pred))
RMSE (Steer/Throttle)sqrt(mean((y_true − y_pred)²))
Steering P95 Errorpercentile(abs(error), 95)
Temporal Steering Δmean(diff(predictions))

Production Acceptance Boundaries

Metric Acceptable Production Target
Steering MAE0.04 rad≤0.02 rad
Steering RMSE0.06≤0.03
Steering R²0.80≥0.95
Throttle MAE0.05≤0.02
Inference Latency<100 ms<20 ms

Local Diagnostics Readiness

Benchmark Framework 100%
Metrics Implementation 90%
Trained Model Run Outputs 0%
Run Evaluation Command Pipeline
evaluator = Evaluator(config)

report = evaluator.evaluate(
    model=model,
    test_ds=test_dataset
)

evaluator.print_report(report)

System Evaluation Verdict

This is no longer a prototype notebook. Svashasan now has an early autonomy platform foundation — modular, temporally aware, and multi-modal. The biggest blockers are the planning stack, simulation layer, and deployment pipeline.

Primary Wins

  • Modular Python package architecture
  • LSTM temporal reasoning (2-layer stacked)
  • 6-input multi-sensor fusion model
  • Dual-control outputs (steering + throttle)
  • Real-time rolling-buffer inference

Core Architectural Obstacles

  • Critical No planning stack
  • Critical No simulation environment
  • High Empty deployment layer
  • High No trajectory prediction head