
毕业设计项目——基于YOLOv5的道路标志识别系统,使用了MySQL数据库,PyQt5进行界面设计
毕业设计项目——基于YOLOv5的道路标志识别系统,使用了MySQL数据库,PyQt5进行界面设计
·
这是一个关于yolov5的道路标志识别项目,使用Pyqt5开发界面,Yolov5训练模型,数据库Mysql,包含五个模块:初始化参数、标志识别、数据库、数据分析和图像处理。
软件截图
-
标志识别模块
左下角三个勾选框分别是结果保存、启动数据库录入、以及模型可视化分析
-
图像处理与数据增强模块
右侧栏是自定义参数的批量图像数据增强(按一定概率对一个文件夹所有图片使用勾选的数据增加方法)
-
初始化参数模块
模型基本参数勾选配置
-
数据库模块
-
数据分析模块
-
登录界面
开始
运行main.py
。
账户密码
- admin 123456
- 1 2
- 修改main函数可直接进入
项目模块
pt
文件夹:存放模型main_with
文件夹:login.py
(登陆ui)、win.py
(主ui)dialog
文件夹:rtsp弹出界面apprcc_rc.py
:资源文件login_ji.py
:界面登陆逻辑文件run-exp52
:300轮训练后的道路标志识别模型tt100k_to_voc-main
文件夹:json转yolo格式- 数据集:TT100k : Traffic-Sign Detection and Classification in the Wild
安装依赖
pip install -r requirements.txt
base ----------------------------------------
matplotlib>=3.2.2
numpy>=1.18.5
opencv-python>=4.1.2
Pillow
PyYAML>=5.3.1
scipy>=1.4.1
torch1.7.1
torchvision0.8.2
tqdm>=4.41.0
pyqt5
pyqt5-tools
logging -------------------------------------
tensorboard>=2.4.1
wandb
plotting ------------------------------------
seaborn>=0.11.0
pandas
export --------------------------------------
coremltools>=4.1
onnx>=1.9.0
scikit-learn==0.19.2 # for coreml quantization
extras --------------------------------------
Cython # for pycocotools https://github.com/cocodataset/cocoapi/issues/172
pycocotools>=2.0 # COCO mAP
albumentations>=1.0.3
thop # FLOPs computation
部分源码展示:
import sys
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
class Example(QWidget):
def __init__(self):
super(Example, self).__init__()
self.v_layout = QVBoxLayout()
self.setLayout(self.v_layout)
self.bl1 = QLabel('0', self)
self.bl1.setAlignment(Qt.AlignCenter)
self.bl2 = QLabel('0', self)
self.bl2.setAlignment(Qt.AlignCenter)
self.btn_start1 = QPushButton('start1', clicked=self.start1)
self.btn_start2 = QPushButton('start2', clicked=self.start2)
self.btn_stop1 = QPushButton('stop1', clicked=self.stop1)
self.btn_stop2 = QPushButton('stop2', clicked=self.stop2)
self.hbox1 = QHBoxLayout()
self.hbox2 = QHBoxLayout()
self.hbox1.addWidget(self.btn_start1)
self.hbox1.addWidget(self.btn_stop1)
self.hbox2.addWidget(self.btn_start2)
self.hbox2.addWidget(self.btn_stop2)
self.v_layout.addWidget(self.bl1)
self.v_layout.addWidget(self.bl2)
self.v_layout.addLayout(self.hbox1)
self.v_layout.addLayout(self.hbox2)
self.thd1 = MyThread(1)
self.thd1.signal.connect(self.process1)
self.thd2 = MyThread(2)
self.thd2.signal.connect(self.process2)
self.show()
def process1(self, content):
self.bl1.setText(content)
def process2(self, content):
self.bl2.setText(content)
def start1(self):
self.thd1.start()
self.thd1.thd_on = True
def start2(self):
self.thd2.start()
self.thd2.thd_on = True
def stop1(self):
self.thd1.thd_on = False
self.thd1.exit()
def stop2(self):
self.thd2.thd_on = False
self.thd2.exit()
class MyThread(QThread): # 线程类
signal = pyqtSignal(str)
def __init__(self, gap):
super(MyThread, self).__init__()
self.count = 0
self.thd_on = True
self.gap = gap
def run(self): # 线程执行函数
while self.thd_on:
print(self.count)
self.count += self.gap
self.signal.emit(str(self.count))
self.sleep(1)
if __name__ == '__main__':
app = QApplication(sys.argv)
example = Example()
sys.exit(app.exec_())
本项目适合做计算机相关专业的毕业设计,[课程设计],技术难度适中、工作量比较充实。
更多推荐
所有评论(0)