How seraj94ai/a-self-driving-car-using-behavioral-cloning works
Project Type and Purpose
• This is an offline ML-based self-driving car pipeline centered on behavioral cloning.
• It consists of two distinct phases:
a. Offline Model Development (data ingestion → preprocessing/augmentation → training)
b. Online Inference & Control (load trained model → receive camera frames → predict steering → send commands to simulator/car)
Main Components
A. Data Storage
• IMG/ directory (raw camera images from left, center, right)
• driving_log.csv (CSV mapping image paths → steering angles, throttle, brake, speed)
B. Data Processing & Augmentation
• self_driving.ipynb (Jupyter notebook containing Python routines for:
• Reading CSV + loading images
• Data augmentation (brightness jitter, flipping, panning, zoom)
)
C. Model Training
• NVIDIA-inspired convolutional neural network implemented in Keras/TensorFlow inside the notebook
• Training loop, validation, and final export of weights to model.h5
D. Model Artifact
• model.h5 (serialized Keras model weights & architecture)
E. Inference & Control
• drive.py (Python script that:
• Loads model.h5
• Connects to Udacity self-driving car simulator or real vehicle via network socket/WebSocket
• Streams camera frames, calls model.predict(), emits steering/throttle commands
)
F. Simulator / Vehicle
• External service: Udacity Self-Driving Car Simulator or onboard car hardware
Architectural Patterns & Principles
• Separation of Concerns:
• Offline pipeline (data & training) is decoupled from runtime pipeline (inference & control)
• Reproducibility:
• Model artifact (model.h5) acts as the single source of truth for inference
• Data Flow Orientation:
• Linear ML pipeline with clearly demarcated stages
Detail Level
• Do not omit the simulator interface: it’s crucial to show the real-time loop of frames in → predictions out.