This repository contains the code and resources for a self-driving car equipped with an object detection system based on the YOLOv5 model. The car is specifically designed for the World Robot Olympiad (WRO) competition, offering autonomous navigation and obstacle detection capabilities.
- Utilizes a rear driving motor and a steering motor, controlled by an L298N motor driver.
- Incorporates three Time-of-Flight (ToF) sensors for accurate distance measurement to nearby obstacles.
- Deploys a Raspberry Pi 4 for real-time object detection using the trained YOLOv5 model.
- Supports custom data labeling and processing using Roboflow.
- Performs model training on Google Colab, ensuring optimized performance.
-
Requirements Analysis: Thoroughly analyze the WRO competition requirements and constraints to guide the design and ensure compliance.
-
Mechanical Design: Create a sturdy and lightweight chassis that accommodates the motors and electronic components while adhering to size limitations.
-
Electrical Design: Establish a reliable power supply system using the L298N motor driver for motor control and communication between the Arduino and Raspberry Pi.
-
Sensor Integration: Integrate three ToF sensors connected to an Arduino via an I2C hub for accurate distance measurement and obstacle detection.
-
Object Detection Model Development: Develop the object detection system using the YOLOv5 model and custom data labeling and processing using Roboflow.
-
Software Integration: Deploy the trained YOLOv5 model on the Raspberry Pi 4 to enable real-time object detection.
-
Testing and Calibration: Conduct extensive testing in various scenarios to evaluate the performance of the object detection system and calibrate the sensors and model.
-
Optimization and Refinement: Fine-tune the YOLOv5 model, adjust sensor calibration parameters, and optimize power consumption to enhance the self-driving car's performance.
-
IMAGES AND VIDEOS: The following section provides a reference for the PCB design and the provide useful videos
PCB Schematic
PCB Design
roboflow link [https://app.roboflow.com/wro-pcq9c/boxfinder-gygic/deploy/1]
YouTube Videos
- object video for training [https://youtu.be/dY5cTE69LHM]
- progress video [https://youtu.be/xcinS8bJSI8]
-
Clone the repository:
git clone https://github.com/your-username/self-driving-car.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Prepare the dataset and perform data labeling using Roboflow.
-
Train the YOLOv5 model on Google Colab using the provided notebook.
-
Transfer the trained model to the Raspberry Pi 4.
-
Run the self-driving car code on the Raspberry Pi 4.
Contributions to this project are welcome. Feel free to submit issues, feature requests, and pull requests.
This project is licensed under the MIT License.
We would like to acknowledge the contributions of the open-source community and the developers of YOLOv5, Roboflow, and Google Colab for their valuable tools and resources.
- YOLOv5: https://github.com/ultralytics/yolov5
- Roboflow: https://roboflow.com
- Google Colab: https://colab.research.google.com