Skip to content

GeneralSubhra/Self-driving-car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Self-Driving Car using Udacity Simulator

This project is a deep learning-based self-driving car implementation using the Udacity Self-Driving Car Simulator. A convolutional neural network (CNN) is trained with images from the simulator to predict steering angles for autonomous driving.

πŸš— Project Overview

The car receives images from a front-facing camera in the simulator and uses a trained model to predict the steering angle in real time. The model is trained using TensorFlow and follows an end-to-end learning approach inspired by NVIDIA’s self-driving research.

πŸ”§ Technologies Used

  • Python 3
  • TensorFlow 2.x / Keras
  • OpenCV
  • NumPy
  • Udacity Self-Driving Car Simulator

πŸ“¦ Installation

  1. Clone this repository
git clone [https://github.com/GeneralSubhra/Self-driving-car]
cd self-driving-car-udacity
  1. Create and activate a virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Download the Udacity Simulator

Simulator download: Udacity Self-Driving Car Simulator

πŸš€ How to Run

πŸ“Έ Collect Training Data (Optional)

Use the simulator in training mode to drive manually and collect images + steering angles. The data will be saved into a CSV log and an image folder.

🧠 Train the Model

python train.py

This will train the model and save it as model.h5.

πŸ•ΉοΈ Drive Using the Trained Model

Run the simulator in autonomous mode, then:

python drive.py model.h5

πŸ“ Project Structure

.
β”œβ”€β”€ data/                   # Collected driving data (images + driving_log.csv)
β”œβ”€β”€ model/                  # Saved model(s)
β”œβ”€β”€ script.py                # Script to drive car in simulator using trained model
β”œβ”€β”€ app.py                # CNN architecture (TensorFlow/Keras)
β”œβ”€β”€ requirements.txt        # List of dependencies
└── README.md               # This file

βœ… To-Do / Future Work

  • Add lane detection and object avoidance
  • Train on multiple tracks
  • Implement PID control for smoother driving

🀝 Contributing

Contributions and suggestions are welcome! Please fork the repo and open a pull request.

πŸ“„ License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published