Skip to content

sushmamareddy/Autonomous-Driving---SSL-RL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš˜ Self-Supervised Multi-Modal Perception + Reinforcement Learning for Autonomous Driving

This project presents a robust autonomous driving pipeline that combines Self-Supervised Learning (SSL) for perception and Proximal Policy Optimization (PPO) for decision-making in the CARLA simulator. We leverage RGB, Depth, and Semantic Segmentation inputs fused into a unified representation that drives a reinforcement learning agent to navigate complex environments.


๐Ÿ“Œ Key Features

  • ๐Ÿ”€ Multi-modal Perception: Fusion of RGB, depth, and segmentation modalities.
  • ๐Ÿง  Self-Supervised Learning: Contrastive loss and reconstruction loss for learning high-level visual embeddings.
  • ๐Ÿ•น๏ธ Deep Reinforcement Learning: PPO agent trained with perception embeddings for control in CARLA.
  • ๐Ÿ” Temporal Consistency: GRU-based temporal modeling in the perception system.
  • ๐Ÿงช Robust Reward Function: Penalizes collisions, lane deviation, off-road behavior; rewards smooth turns and optimal speed.

๐Ÿงฑ Architecture Overview

Inputs โ†’ Encoders (ResNet/DeepLab) โ†’ Fusion Transformer โ†’ Temporal GRU
โ†’ SSL heads (contrastive, reconstruction) โ†’ 256D Perception Embedding โ†’ PPO Policy

Additional modules:

  • Perception decoder for SSL supervision
  • Reinforcement Learning agent with continuous control output

๐Ÿงช Experimental Setup

  • Simulator: CARLA
  • RL Algorithm: PPO (Stable-Baselines3)
  • SSL Tasks: Contrastive learning, pixel reconstruction
  • Evaluation Metrics:
Metric Baseline RL SSL + RL
Total Reward 1500 4200
Collision Rate 4.5 1.2
Lane Deviation 0.78 m 0.32 m
Off-road % 22% 4%

๐Ÿง  Training Details

  • Pretraining: SSL on multi-modal CARLA scenes
  • Reinforcement Learning: PPO using 256D SSL embeddings
  • Hardware: NVIDIA A100 (64GB), training time ~6 days
  • Losses Used:
    • ๐Ÿ”น InfoNCE contrastive loss
    • ๐Ÿ”น L1 reconstruction loss
    • ๐Ÿ”น PPO loss with entropy regularization

๐Ÿ“‚ Project Structure

โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ models/               # ResNet/DeepLab, Transformer, GRU
โ”‚   โ”œโ”€โ”€ ssl_trainer.py        # Self-supervised pretraining
โ”‚   โ”œโ”€โ”€ rl_training_with_ssl.py  # Trained SSL + RL
โ”œโ”€โ”€ rl_agent/
โ”‚   โ”œโ”€โ”€ ppo_policy.py         # PPO policy and learning loop
โ”‚   โ”œโ”€โ”€ reward_function.py    # Custom reward function
โ”œโ”€โ”€ evaluation/
โ”‚   โ”œโ”€โ”€ metrics.py            # Evaluation metrics
โ”‚   โ”œโ”€โ”€ visualize.py          # Trajectory and reward plots
โ”œโ”€โ”€ carla_utils/
โ”‚   โ”œโ”€โ”€ environment_wrapper.py
โ”œโ”€โ”€ configs/
โ”‚   โ”œโ”€โ”€ perception.yaml
โ”‚   โ”œโ”€โ”€ rl.yaml
โ”œโ”€โ”€ README.md

๐Ÿ› ๏ธ How to Run

1. Clone the repo

git clone https://github.com/your-username/self-driving-ssl-rl.git
cd self-driving-ssl-rl

2. Setup environment

conda create -n sslrl python=3.6
conda activate sslrl
pip install -r requirements.txt

3. Run SSL pretraining

python perception/train_ssl.py --config configs/perception.yaml

4. Train RL

python rl_agent/ppo_policy.py --config configs/rl.yaml

4. Train SSL+RL

python rl_agent/ppo_policy.py --config configs/rl.yaml

๐Ÿ“Š Results

  • ๐Ÿš— Smoother and safer driving behavior
  • ๐Ÿ“‰ 3.3x reduction in collision rate
  • ๐Ÿšฆ Improved handling at junctions and turns

๐Ÿ”ฎ Future Work

  • ๐Ÿค– Human-in-the-loop reward tuning
  • ๐Ÿ” Online self-supervised learning with exploration
  • ๐Ÿงฉ Integration with template-based planning modules

๐Ÿ“œ Citation

If you use or reference this work in academic or industrial projects:

@misc{SushmaMareddy2025sslrl,
  title={Self-Supervised Multi-Modal Perception and Reinforcement Learning for Autonomous Driving},
  author={Sushma Mareddy, Ravan Ranveer Budda},
  year={2025},
  note={Project Report, NYU Courant}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages