Skip to content

sinhaaarushi/AUTODRIVE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AutoDrive โ€” AI-Powered Self-Driving Car Simulation

An end-to-end autonomous driving simulation system built using computer vision and deep learning.

This project combines multiple AI models to process real-time camera input and make driving decisions including steering prediction, lane detection, and object detection.


Why this project?

Understanding autonomous driving requires combining multiple complex systems โ€” perception, decision-making, and real-time processing.

This project was built to simulate how self-driving systems integrate multiple models to interpret road conditions and make driving decisions in real time.

AUTODRIVE Demo

What I built

  • A multi-model AI pipeline integrating:

    • Steering angle prediction (CNN)
    • Lane detection (YOLO segmentation)
    • Object detection (YOLO)
  • Real-time inference system processing live frames

  • Multi-threaded execution for performance optimization

  • Visualization pipeline to overlay predictions on video feed


Key Highlights

  • Processes real-time frames for autonomous driving simulation
  • Integrates 3 different AI models into one pipeline
  • Designed for near real-time performance (~30 FPS)
  • Built complete training + inference workflow

๐ŸŽฏ Project Overview

AUTODRIVE is an advanced self-driving car simulation platform that combines multiple AI models to achieve autonomous driving capabilities. The system processes real-time camera feeds to predict steering angles, detect lanes, and identify objects on the road.

System Architecture

The AutoDrive system integrates multiple AI models into a real-time autonomous driving pipeline:

Camera Input โ†’ Preprocessing โ†’ โ†’ Lane Detection Model (YOLO Segmentation) โ†’ Object Detection Model (YOLO Detection) โ†’ Steering Angle Prediction Model (CNN) โ†’ Multi-threaded Inference Engine โ†’ Visualization & Driving Output

The system runs all models concurrently using multi-threading to achieve near real-time performance.

โœจ Key Features

  • Real-time Steering Prediction: Custom CNN model for accurate steering angle prediction
  • Lane Detection: YOLO-based lane segmentation for road boundary detection
  • Object Detection: Advanced object detection for vehicles, pedestrians, and obstacles
  • Multi-threaded Processing: Concurrent execution of multiple AI models
  • Real-time Visualization: Live display of original, segmented, and steering feedback
  • Confidence-based Filtering: Configurable confidence thresholds for reliable predictions

๐Ÿ› ๏ธ Tech Stack

  • Python 3.8+ - Core programming language
  • TensorFlow 1.x - Deep learning framework
  • OpenCV - Computer vision and image processing
  • YOLO (Ultralytics) - Object detection and segmentation
  • CNN - Custom convolutional neural network
  • NumPy & Pandas - Data manipulation
  • Matplotlib - Data visualization
  • Multi-threading - Concurrent processing

๐Ÿ“Š Performance Metrics

  • Dataset Size: 45,000+ driving images
  • Model Accuracy: 87% confidence threshold
  • Real-time Processing: 30 FPS inference
  • Multi-model Integration: 3 AI models working concurrently

๐Ÿš€ Installation

Prerequisites

  • Python 3.8 or higher
  • CUDA-compatible GPU (recommended)
  • 8GB+ RAM

Setup Instructions

  1. Clone the repository

    git clone https://github.com/sinhaaarushi/AUTODRIVE.git
    cd AUTODRIVE
  2. Install dependencies

    pip install -r requirements.txt
  3. Setup project structure

    python setup.py install
  4. Download pre-trained models

    # Create model directories
    mkdir -p saved_models/regression_model
    mkdir -p saved_models/lane_segmentation_model
    mkdir -p saved_models/object_detection_model
    
    # Download models (you'll need to provide the actual model files)
    # Place them in the respective directories

๐ŸŽฎ Usage

Running the Complete Simulation

python src/inference/run_fsd_inference.py

Lane Detection and Object Segmentation

python src/inference/run_segmentation_obj_det.py

Steering Angle Prediction

python src/inference/run_steering_angle_prediction.py

Training Custom Models

# Train steering angle prediction model
cd model_training/train_steering_angle
python train.py

# View training progress with TensorBoard
tensorboard --logdir=logs

๐Ÿ“ Project Structure

AUTODRIVE/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ””โ”€โ”€ model.py              # Custom CNN architecture
โ”‚   โ””โ”€โ”€ inference/
โ”‚       โ”œโ”€โ”€ run_fsd_inference.py  # Main simulation runner
โ”‚       โ”œโ”€โ”€ run_segmentation_obj_det.py
โ”‚       โ””โ”€โ”€ run_steering_angle_prediction.py
โ”œโ”€โ”€ model_training/
โ”‚   โ”œโ”€โ”€ train_steering_angle/     # Steering model training
โ”‚   โ””โ”€โ”€ train_lane_detection/     # Lane detection training
โ”œโ”€โ”€ data/
โ”‚   โ””โ”€โ”€ driving_dataset/          # 45,000+ training images
โ”œโ”€โ”€ saved_models/                 # Pre-trained model weights
โ”œโ”€โ”€ utils/                        # Utility functions
โ””โ”€โ”€ tests/                        # Unit tests

๐Ÿง  AI Models Architecture

1. Steering Angle Prediction Model

  • Architecture: Custom CNN with 5 convolutional layers
  • Input: 66x200x3 RGB images
  • Output: Steering angle in degrees
  • Features: Dropout regularization, L2 normalization

2. Lane Detection Model

  • Model: YOLO11 for lane segmentation
  • Input: Full resolution camera images
  • Output: Lane boundary masks
  • Features: Real-time lane detection with confidence filtering

3. Object Detection Model

  • Model: YOLO11s for object detection
  • Input: Full resolution camera images
  • Output: Bounding boxes and class predictions
  • Features: Multi-class detection (vehicles, pedestrians, etc.)

Engineering Challenges

Some key challenges addressed in this project:

  • Running multiple deep learning models concurrently
  • Optimizing inference pipeline for near real-time performance
  • Synchronizing outputs from lane detection, object detection, and steering prediction
  • Managing model loading and GPU memory usage
  • Designing modular architecture for training and inference

๐ŸŽฅ Demo Screenshots

Real-time Simulation

Simulation Demo

Lane Detection

Lane Detection

Object Detection

Object Detection

Steering Prediction

Steering Prediction

๐Ÿ”ง Configuration

Model Parameters

# Confidence thresholds
LANE_CONFIDENCE = 0.5
OBJECT_CONFIDENCE = 0.5

# Image processing
IMAGE_WIDTH = 200
IMAGE_HEIGHT = 66

# Training parameters
BATCH_SIZE = 100
LEARNING_RATE = 1e-4
EPOCHS = 30

๐Ÿ“ˆ Training Process

  1. Data Preparation: 45,000+ images with corresponding steering angles
  2. Model Training: Custom training pipeline with TensorBoard logging
  3. Validation: Real-time validation on test dataset
  4. Model Saving: Checkpoint system for model persistence

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author

Aarushi Sinha

๐Ÿ™ Acknowledgments

  • NVIDIA for CUDA support
  • Ultralytics for YOLO implementation
  • TensorFlow team for the deep learning framework
  • OpenCV community for computer vision tools

๐Ÿ“ž Contact

About

AI-Powered Self-Driving Car Simulation with Multi-Model Computer Vision System

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors