深度学习YOLOv3压双黄线期末项目
一、引言
实现功能
目录
一、引言
实现功能
打开视频
连续检测车辆
能检测到道路中间的双黄线
能检测出车辆是否压双黄线
当车辆压到双黄线时给出提示
要求使用多线程实现功能
二、技术栈概览
三、代码功能深度剖析
视频文件选择功能(choosevideo 函数)
四、项目亮点提炼
五、总结与展望
1.打开视频
2.连续检测车辆
3.能检测到道路中间的双黄线
4.能检测出车辆是否压双黄线
5.当车辆压到双黄线时给出提示
6.要求使用多线程实现功能
二、技术栈概览
PyQt5 简介
以下是pyqt5界面代码:
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'untitled.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1096, 647) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.widget = QtWidgets.QWidget(self.centralwidget) self.widget.setStyleSheet("background-color: rgb(100, 150, 100);\n" "\n" "") self.widget.setObjectName("widget") self.frame = QtWidgets.QFrame(self.widget) self.frame.setGeometry(QtCore.QRect(310, 190, 441, 321)) self.frame.setStyleSheet("border: 1px solid #666; ") self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.label_2 = QtWidgets.QLabel(self.frame) self.label_2.setGeometry(QtCore.QRect(60, 10, 331, 291)) self.label_2.setStyleSheet("border-color: rgb(255, 255, 255);") self.label_2.setText("") self.label_2.setObjectName("label_2") self.widget_2 = QtWidgets.QWidget(self.widget) self.widget_2.setGeometry(QtCore.QRect(320, 520, 411, 99)) self.widget_2.setStyleSheet("background-color: rgb(255, 255, 255);") self.widget_2.setObjectName("widget_2") self.formLayout = QtWidgets.QFormLayout(self.widget_2) self.formLayout.setContentsMargins(0, 0, 0, 0) self.formLayout.setObjectName("formLayout") self.pushButton_2 = QtWidgets.QPushButton(self.widget_2) self.pushButton_2.setStyleSheet("background-color: rgb(0, 255, 0);") self.pushButton_2.setObjectName("pushButton_2") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.pushButton_2) self.pushButton = QtWidgets.QPushButton(self.widget_2) self.pushButton.setStyleSheet("background-color: rgb(0, 255, 0);") self.pushButton.setObjectName("pushButton") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.pushButton) self.pushButt