MCPcopy Index your code
hub / github.com/Ai-trainee/Traffic-Sign-Recognition-PyQt5-YOLOv5-GUI

github.com/Ai-trainee/Traffic-Sign-Recognition-PyQt5-YOLOv5-GUI @v1.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.5 ↗ · + Follow
645 symbols 1,924 edges 52 files 42 documented · 7% updated 2y ago★ 2474 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Road Sign Recognition Project Based on YOLOv5 (YOLOv5 GUI)

English | 简体中文

训练策略

This is a road sign recognition project based on YOLOv5, developed with a PyQt5 interface, YOLOv5 trained model, and MySQL database. The project consists of five modules: parameter initialization, sign recognition, database, data analysis, and image processing(Please refer to the Chinese document for details),This project uses YOLOv5 v6.1. 00013.jpg

Screenshots

  • Sign Recognition Module

    img.png
  • Image Processing and Data Augmentation Module

    img_1.png
  • Parameter Initialization Module

    img_2.png
  • Database Module

    img_3.png
  • Data Analysis Module

    img_4.png
  • Login Interface

    img_5.png

Video 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:

  • Automatic Database Creation (Optional):
    • If you prefer an automated setup, a batch script is provided. Run the setup_database.bat script to create the database. This requires MySQL to be installed and configured on your system.
  • Manual Database Creation:
    • Alternatively, you can manually create the database in MySQL. Import and execute the data/regn_mysql.sql file in your MySQL environment to set up the necessary database and tables.

2. Configuring Database Connection in Code

After setting up the database, update the connection Settings in the code; These 4 variables in the beginning of the code, please change your local database authentication information; There are two calls in the recasting of this authentication information (approximately 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 necessary for certain MySQL authentication methods.

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

  • pt folder: Contains the YOLOv5 model file best.pt for road sign recognition.
  • main_with folder: Contains login.py for the login UI and win.py for the main UI.
  • dialog folder: Contains the RTSP pop-up interface.
  • apprcc_rc.py: The resource file for the project.
  • login_ji.py: Implements the login logic for the UI.
  • data/run/run-exp52: The YOLOv5 road sign recognition model trained for 300 epochs.
  • utils/tt100k_to_voc-main folder: Tool for converting JSON annotations to YOLO format.
  • result: Folder to save inference results.
  • run: Folder to save training logs and outputs.
  • Dataset: Download from TT100k : Traffic-Sign Detection and Classification in the Wild.
  • Database files: Located in the data folder, see -regn_mysql.sql for setup.

Acknowledgements

  • For converting the TT100K dataset to VOC format and selecting more than 100 images and XMLs for each category, see this CSDN blog post.
  • The PyQt5-YOLOv5 integration was inspired by this GitHub repository.

Star History

Track the GitHub star history of this project:

Star History Chart

Core symbols most depended-on inside this repo

Shape

Method 363
Function 193
Class 88
Route 1

Languages

Python100%

Modules by API surface

main.py121 symbols
models/common.py76 symbols
utils/general.py67 symbols
models/tf.py52 symbols
utils/datasets.py48 symbols
utils/plots.py26 symbols
utils/torch_utils.py24 symbols
utils/loggers/wandb/wandb_utils.py22 symbols
utils/wandb_logging/wandb_utils.py21 symbols
utils/activations.py20 symbols
models/yolo.py18 symbols
utils/metrics.py17 symbols

For agents

$ claude mcp add Traffic-Sign-Recognition-PyQt5-YOLOv5-GUI \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page