Traffic-Sign-Recognition-PyQt5-YOLOv5-GUI

Road Sign Recognition Project Based on YOLOv5 (YOLOv5 GUI)

English | 简体中文

训练策略

This system is a road sign recognition application leveraging YOLOv5🚀 😊. It employs a MySQL database 💽, PyQt5 for the interface design 🎨, PyTorch deep learning framework⚡. Additionally, it incorporates CSS styles 🌈.

The system comprises five key modules:

  1. System Login Module 🔑: Responsible for user authentication.
  2. Initialization Parameter Module 📋: Provides settings for initializing YOLOv5 model parameters.
  3. Sign Recognition Module 🔍: The core functionality responsible for recognizing road signs and updating the database with the results.
  4. Database Module 💾: Consists of two sub-modules - basic database operations and data analysis.
  5. Image Processing Module 🖼️: Handles the processing of individual images and associated data.

The entire system is designed to support various data input methods and model switching. Additionally, it offers image enhancement techniques such as mosaic and mixup 📈.

00013.jpg

Screenshots

The right column is a batch image data enhancement with custom parameters (using the checked data increment method for all images in a folder with a certain probability)

img_1.png

Video Demo

YOUTUBE DEMO: Road Sign Recognition System Based on YOLOV5 BiliBili Demo: Road Sign Recognition System Based on YOLOV5

Install Dependencies

To install the required dependencies, run:

pip install -r requirements.txt

Quick Start

1. Setting Up the Database

To run the application, you need to set up your MySQL database. Follow these steps to prepare your database:

2. Configuring Database Connection in Code

After setting up the database, update the connection Settings in the code to change the authentication information for your local database (these four variables are at the beginning of the code, around line 59, as follows); P.S. These authentication messages are called twice in the code (around lines 111 and 1783)

# Database connection settings as global variables
DB_HOST = 'localhost'    # Database host
DB_USER = 'root'         # Database user
DB_PASSWORD = '1234'     # Database password
DB_NAME = 'traffic_sign_recognition'  # Database name

Note on Cryptography Package

If you encounter a RuntimeError: 'cryptography' package is required for sha256_password or caching_sha2_password auth methods, This is because the database authentication has gone wrong and the database needs to be properly created and the password entered. This error will also be reported if you do not have the mysql service started locally, so make sure your mysql service is started.

3. Run main.py.

4. Enter your account and password to log in

Here are the default login credentials:

Username Password
admin 123456
1 2

Or modify the main function in main.py: remove the logon logic to enter the system directly without authentication.


Project Structure

Since this project was done while I was learning YOLOv5 (quite a while ago), the main logic is concentrated in the main.py file. In other words, I didn’t modularize different functions, and I didn’t have a clear division of module structure. Now I want to divide it into modules, but I’m too lazy, ha ha :smile:. If you’re interested, you can modularize it so it’s clearer.

Acknowledgements

Contact Us

WeChat:AIGCSD

email: 2545197649@qq.com

Official Accounts:AI进修生

Star History

Track the GitHub star history of this project:

Star History Chart