An open API service indexing awesome lists of open source software.

https://github.com/sofian2022/projetpfa-autonomousbvehicles

A modular autonomous vehicle project in Python featuring real-time object detection (MobileNet SSD), license plate recognition (YOLOv8, EasyOCR), and traffic sign classification (CNN)
https://github.com/sofian2022/projetpfa-autonomousbvehicles

autonomous-vehicles computer-vision deep-learning keras license-plate-recognition object-detection opencv python-pytorch raspberry-pi robotics self-driving-car tensorflow traffic-sign-recognition yolov8

Last synced: about 1 year ago
JSON representation

A modular autonomous vehicle project in Python featuring real-time object detection (MobileNet SSD), license plate recognition (YOLOv8, EasyOCR), and traffic sign classification (CNN)

Awesome Lists containing this project

README

          


Project Banner

# πŸš— Autonomous Vehicle Project

[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)](https://github.com/sofian2022/Projet_PFA-Autonomous_Vehicles)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

Welcome to the Autonomous Vehicle Project! This repository contains a modular, multi-component system for smart vehicle perception and control, developed as part of a PFA (Projet de Fin d'AnnΓ©e). It integrates state-of-the-art computer vision and deep learning for real-time object detection, license plate recognition, and traffic sign classification, with hardware control for a physical prototype.

---

## ✨ Features

| 🚦 | **Traffic Sign Recognition** | Classifies traffic signs using a CNN trained on the GTSRB dataset, with a user-friendly GUI. |
| --- | ------------------------------ | -------------------------------------------------------------------------------------------------------- |
| πŸ” | **Real-time Object Detection** | Detects objects (cars, pedestrians, cyclists) using a pre-trained MobileNet SSD model. |
| 🏷️ | **License Plate Recognition** | Detects license plates with YOLOv8, recognizes characters with EasyOCR, and checks status in a database. |
| πŸ› οΈ | **Hardware Integration** | Scripts for controlling camera, motors, servos, ultrasonic sensors, and LEDs. |

---

## πŸ—‚οΈ Project Structure

```
.
β”œβ”€β”€ LIcense Plate Number Detection/
β”‚ β”œβ”€β”€ check_vehicle_status.py
β”‚ β”œβ”€β”€ license_plate_recognition.py
β”‚ β”œβ”€β”€ add_sample_vehicles.py
β”‚ β”œβ”€β”€ db_connector.py
β”‚ β”œβ”€β”€ Test_WebCam.py
β”‚ └── license_plate_detector.pt
β”‚
β”œβ”€β”€ Traffic signs Detection And Recognition/
β”‚ β”œβ”€β”€ Train.ipynb
β”‚ β”œβ”€β”€ Test_images/
β”‚ β”œβ”€β”€ Test/
β”‚ β”‚ β”œβ”€β”€ rpiCam.py
β”‚ β”‚ β”œβ”€β”€ interface.py
β”‚ β”‚ └── cameraPC.py
β”‚ β”œβ”€β”€ model/
β”‚ β”‚ β”œβ”€β”€ traffic_classifiernew.h5
β”‚ β”‚ └── model_trained_epoch30.p
β”‚ └── images/
β”‚ β”œβ”€β”€ project.jpg
β”‚ β”œβ”€β”€ predictions.png
β”‚ └── GUI.jpg
β”‚
β”œβ”€β”€ Object Detection/
β”‚ β”œβ”€β”€ detect.py
β”‚ β”œβ”€β”€ MobileNetSSD_deploy.prototxt.txt
β”‚ └── MobileNetSSD_deploy.caffemodel
β”‚
β”œβ”€β”€ Materiels_Test/
β”‚ β”œβ”€β”€ servoMotor.py
β”‚ β”œβ”€β”€ leds.py
β”‚ β”œβ”€β”€ ultrasonic.py
β”‚ β”œβ”€β”€ motor.py
β”‚ └── Camera.py
β”‚
β”œβ”€β”€ README.md
└── requirements.txt
```

---

## πŸ› οΈ Technologies Used

- **Python 3**
- **PyTorch** (YOLOv8 for license plate detection)
- **TensorFlow/Keras** (traffic sign recognition)
- **Caffe** (object detection model)
- **OpenCV** (image/video processing)
- **EasyOCR** (license plate OCR)
- **Pillow** (GUI image handling)
- **MongoDB** (vehicle/license plate database)
- **Tkinter** (traffic sign classifier GUI)
- **NumPy**, **Matplotlib**, **ultralytics**, **requests**

---

## πŸš€ Quick Start

1. **Clone the repository:**
```bash
git clone https://github.com/sofian2022/Projet_PFA-Autonomous_Vehicles.git
cd Projet_PFA-Autonomous_Vehicles
```
2. **Create a virtual environment (recommended):**
```bash
python -m venv venv
source venv/bin/activate # On Windows use venv\Scripts\activate
```
3. **Install dependencies:**
```bash
pip install -r requirements.txt
```
4. **Database Setup (for License Plate Recognition):**
- Ensure MongoDB is running.
- Update connection details in `LIcense Plate Number Detection/db_connector.py` if needed.
- Populate the database with `add_sample_vehicles.py` if desired.

---

## πŸ–₯️ Usage

- **Object Detection:**

```bash
cd Object Detection
python detect.py
```

Starts real-time object detection using your webcam.

- **License Plate Recognition:**
Main script: `license_plate_recognition.py` (see script for usage details; can process images or video streams).

- **Traffic Sign Classifier GUI:**

```bash
cd "Traffic signs Detection And Recognition/Test"
python interface.py
```

Opens a GUI for uploading and classifying traffic sign images.

- **Hardware Tests:**
Scripts in `Materiels_Test/` are for Raspberry Pi or similar hardware with the appropriate components.

---

## πŸ“Έ Screenshots


Traffic Sign Predictions
Traffic Sign GUI

---

## πŸ“„ License

This project is open-source. Please credit the original authors if you use or modify this code.