代码拉取完成,页面将自动刷新
同步操作将从 davidhu/基于YOLOv5+PyQt5+Python的AI视觉检测系统 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\ui\MainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1516, 886)
font = QtGui.QFont()
font.setFamily("Adobe Myungjo Std M")
font.setPointSize(9)
MainWindow.setFont(font)
self.centralWidget = QtWidgets.QWidget(MainWindow)
self.centralWidget.setStyleSheet("background-color:rgb(240, 240, 240)")
self.centralWidget.setObjectName("centralWidget")
self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.centralWidget)
self.verticalLayout_7.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_7.setSpacing(6)
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.widget = QtWidgets.QWidget(self.centralWidget)
self.widget.setMinimumSize(QtCore.QSize(0, 40))
self.widget.setMaximumSize(QtCore.QSize(16777215, 60))
self.widget.setLayoutDirection(QtCore.Qt.LeftToRight)
self.widget.setObjectName("widget")
self.horizontalLayout_10 = QtWidgets.QHBoxLayout(self.widget)
self.horizontalLayout_10.setContentsMargins(2, 2, 2, 2)
self.horizontalLayout_10.setSpacing(6)
self.horizontalLayout_10.setObjectName("horizontalLayout_10")
self.horizontalLayout_9 = QtWidgets.QHBoxLayout()
self.horizontalLayout_9.setSpacing(6)
self.horizontalLayout_9.setObjectName("horizontalLayout_9")
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_9.addItem(spacerItem)
self.show_label = QtWidgets.QLabel(self.widget)
self.show_label.setMinimumSize(QtCore.QSize(300, 0))
self.show_label.setText("")
self.show_label.setObjectName("show_label")
self.horizontalLayout_9.addWidget(self.show_label)
self.main_title = QtWidgets.QLabel(self.widget)
self.main_title.setMinimumSize(QtCore.QSize(0, 30))
font = QtGui.QFont()
font.setFamily("Adobe 宋体 Std L")
font.setPointSize(16)
font.setBold(True)
font.setWeight(75)
self.main_title.setFont(font)
self.main_title.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.main_title.setAlignment(QtCore.Qt.AlignCenter)
self.main_title.setObjectName("main_title")
self.horizontalLayout_9.addWidget(self.main_title)
self.datetimeshow_label = QtWidgets.QLabel(self.widget)
self.datetimeshow_label.setMinimumSize(QtCore.QSize(300, 0))
font = QtGui.QFont()
font.setFamily("黑体")
self.datetimeshow_label.setFont(font)
self.datetimeshow_label.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
self.datetimeshow_label.setStyleSheet("")
self.datetimeshow_label.setAlignment(QtCore.Qt.AlignCenter)
self.datetimeshow_label.setObjectName("datetimeshow_label")
self.horizontalLayout_9.addWidget(self.datetimeshow_label)
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_9.addItem(spacerItem1)
self.horizontalLayout_9.setStretch(2, 1)
self.horizontalLayout_10.addLayout(self.horizontalLayout_9)
self.verticalLayout_7.addWidget(self.widget)
self.main_layout = QtWidgets.QTabWidget(self.centralWidget)
self.main_layout.setStyleSheet("")
self.main_layout.setTabPosition(QtWidgets.QTabWidget.North)
self.main_layout.setTabShape(QtWidgets.QTabWidget.Rounded)
self.main_layout.setTabsClosable(False)
self.main_layout.setMovable(False)
self.main_layout.setTabBarAutoHide(False)
self.main_layout.setObjectName("main_layout")
self.img_detect = QtWidgets.QWidget()
self.img_detect.setObjectName("img_detect")
self.horizontalLayout_8 = QtWidgets.QHBoxLayout(self.img_detect)
self.horizontalLayout_8.setContentsMargins(11, 11, 11, 11)
self.horizontalLayout_8.setSpacing(6)
self.horizontalLayout_8.setObjectName("horizontalLayout_8")
self.verticalLayout_6 = QtWidgets.QVBoxLayout()
self.verticalLayout_6.setSpacing(6)
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.groupBox_6 = QtWidgets.QGroupBox(self.img_detect)
self.groupBox_6.setMinimumSize(QtCore.QSize(20, 70))
self.groupBox_6.setMaximumSize(QtCore.QSize(16777215, 80))
self.groupBox_6.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.groupBox_6.setFlat(False)
self.groupBox_6.setObjectName("groupBox_6")
self.verticalLayout_14 = QtWidgets.QVBoxLayout(self.groupBox_6)
self.verticalLayout_14.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_14.setSpacing(6)
self.verticalLayout_14.setObjectName("verticalLayout_14")
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.horizontalLayout_5.setSpacing(7)
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
self.show_model_label = QtWidgets.QLabel(self.groupBox_6)
self.show_model_label.setMinimumSize(QtCore.QSize(160, 25))
font = QtGui.QFont()
font.setFamily("黑体")
self.show_model_label.setFont(font)
self.show_model_label.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
self.show_model_label.setStyleSheet("background-color:rgb(98, 198, 147);\n"
"border:1px solid black;")
self.show_model_label.setAlignment(QtCore.Qt.AlignCenter)
self.show_model_label.setObjectName("show_model_label")
self.horizontalLayout_5.addWidget(self.show_model_label)
self.loadmodel = QtWidgets.QPushButton(self.groupBox_6)
self.loadmodel.setMinimumSize(QtCore.QSize(100, 25))
self.loadmodel.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.loadmodel.setAutoFillBackground(False)
self.loadmodel.setStyleSheet("background-color:rgb(146, 189, 108);\n"
"border:1px solid;\n"
"")
self.loadmodel.setObjectName("loadmodel")
self.horizontalLayout_5.addWidget(self.loadmodel)
spacerItem2 = QtWidgets.QSpacerItem(598, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_5.addItem(spacerItem2)
self.verticalLayout_14.addLayout(self.horizontalLayout_5)
self.verticalLayout_6.addWidget(self.groupBox_6)
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
self.horizontalLayout_6.setSpacing(6)
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
self.verticalLayout_5 = QtWidgets.QVBoxLayout()
self.verticalLayout_5.setSpacing(6)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.groupBox = QtWidgets.QGroupBox(self.img_detect)
self.groupBox.setMinimumSize(QtCore.QSize(200, 210))
self.groupBox.setMaximumSize(QtCore.QSize(200, 260))
self.groupBox.setLayoutDirection(QtCore.Qt.LeftToRight)
self.groupBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.groupBox.setFlat(False)
self.groupBox.setObjectName("groupBox")
self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.groupBox)
self.verticalLayout_8.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_8.setSpacing(6)
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.horizontalLayout_11 = QtWidgets.QHBoxLayout()
self.horizontalLayout_11.setSpacing(6)
self.horizontalLayout_11.setObjectName("horizontalLayout_11")
self.IoU = QtWidgets.QLabel(self.groupBox)
self.IoU.setObjectName("IoU")
self.horizontalLayout_11.addWidget(self.IoU)
self.IoU_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
self.IoU_doubleSpinBox.setMaximum(1.0)
self.IoU_doubleSpinBox.setSingleStep(0.01)
self.IoU_doubleSpinBox.setStepType(QtWidgets.QAbstractSpinBox.DefaultStepType)
self.IoU_doubleSpinBox.setObjectName("IoU_doubleSpinBox")
self.horizontalLayout_11.addWidget(self.IoU_doubleSpinBox)
self.verticalLayout_8.addLayout(self.horizontalLayout_11)
self.horizontalLayout_12 = QtWidgets.QHBoxLayout()
self.horizontalLayout_12.setSpacing(6)
self.horizontalLayout_12.setObjectName("horizontalLayout_12")
self.conf_thres = QtWidgets.QLabel(self.groupBox)
self.conf_thres.setObjectName("conf_thres")
self.horizontalLayout_12.addWidget(self.conf_thres)
self.conf_thres_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox)
self.conf_thres_doubleSpinBox.setMaximum(1.0)
self.conf_thres_doubleSpinBox.setSingleStep(0.01)
self.conf_thres_doubleSpinBox.setObjectName("conf_thres_doubleSpinBox")
self.horizontalLayout_12.addWidget(self.conf_thres_doubleSpinBox)
self.verticalLayout_8.addLayout(self.horizontalLayout_12)
self.horizontalLayout_13 = QtWidgets.QHBoxLayout()
self.horizontalLayout_13.setSpacing(6)
self.horizontalLayout_13.setObjectName("horizontalLayout_13")
self.exposure = QtWidgets.QLabel(self.groupBox)
self.exposure.setObjectName("exposure")
self.horizontalLayout_13.addWidget(self.exposure)
self.exposure_label = QtWidgets.QLabel(self.groupBox)
self.exposure_label.setMinimumSize(QtCore.QSize(20, 0))
self.exposure_label.setMaximumSize(QtCore.QSize(25, 16777215))
self.exposure_label.setObjectName("exposure_label")
self.horizontalLayout_13.addWidget(self.exposure_label)
self.exposure_horizontalSlider = QtWidgets.QSlider(self.groupBox)
self.exposure_horizontalSlider.setMinimumSize(QtCore.QSize(50, 0))
self.exposure_horizontalSlider.setMaximum(500)
self.exposure_horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.exposure_horizontalSlider.setTickPosition(QtWidgets.QSlider.TicksAbove)
self.exposure_horizontalSlider.setObjectName("exposure_horizontalSlider")
self.horizontalLayout_13.addWidget(self.exposure_horizontalSlider)
self.verticalLayout_8.addLayout(self.horizontalLayout_13)
self.horizontalLayout_14 = QtWidgets.QHBoxLayout()
self.horizontalLayout_14.setSpacing(6)
self.horizontalLayout_14.setObjectName("horizontalLayout_14")
self.max_det = QtWidgets.QLabel(self.groupBox)
self.max_det.setObjectName("max_det")
self.horizontalLayout_14.addWidget(self.max_det)
self.max_det_label = QtWidgets.QLabel(self.groupBox)
self.max_det_label.setMinimumSize(QtCore.QSize(20, 0))
self.max_det_label.setMaximumSize(QtCore.QSize(25, 16777215))
self.max_det_label.setObjectName("max_det_label")
self.horizontalLayout_14.addWidget(self.max_det_label)
self.max_det_horizontalSlider = QtWidgets.QSlider(self.groupBox)
self.max_det_horizontalSlider.setMinimumSize(QtCore.QSize(50, 0))
self.max_det_horizontalSlider.setMaximum(500)
self.max_det_horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.max_det_horizontalSlider.setInvertedAppearance(False)
self.max_det_horizontalSlider.setTickPosition(QtWidgets.QSlider.TicksAbove)
self.max_det_horizontalSlider.setTickInterval(0)
self.max_det_horizontalSlider.setObjectName("max_det_horizontalSlider")
self.horizontalLayout_14.addWidget(self.max_det_horizontalSlider)
self.verticalLayout_8.addLayout(self.horizontalLayout_14)
self.horizontalLayout_15 = QtWidgets.QHBoxLayout()
self.horizontalLayout_15.setSpacing(6)
self.horizontalLayout_15.setObjectName("horizontalLayout_15")
self.cam_num_label = QtWidgets.QLabel(self.groupBox)
self.cam_num_label.setLayoutDirection(QtCore.Qt.LeftToRight)
self.cam_num_label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.cam_num_label.setObjectName("cam_num_label")
self.horizontalLayout_15.addWidget(self.cam_num_label)
self.cam_num_spinBox = QtWidgets.QSpinBox(self.groupBox)
self.cam_num_spinBox.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.cam_num_spinBox.setObjectName("cam_num_spinBox")
self.horizontalLayout_15.addWidget(self.cam_num_spinBox)
self.verticalLayout_8.addLayout(self.horizontalLayout_15)
self.horizontalLayout_16 = QtWidgets.QHBoxLayout()
self.horizontalLayout_16.setSpacing(6)
self.horizontalLayout_16.setObjectName("horizontalLayout_16")
self.main_title_label = QtWidgets.QLabel(self.groupBox)
self.main_title_label.setLayoutDirection(QtCore.Qt.LeftToRight)
self.main_title_label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.main_title_label.setObjectName("main_title_label")
self.horizontalLayout_16.addWidget(self.main_title_label)
self.main_title_edit = QtWidgets.QLineEdit(self.groupBox)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.main_title_edit.sizePolicy().hasHeightForWidth())
self.main_title_edit.setSizePolicy(sizePolicy)
self.main_title_edit.setMaximumSize(QtCore.QSize(150, 16777215))
font = QtGui.QFont()
font.setFamily("Adobe Myungjo Std M")
font.setPointSize(9)
self.main_title_edit.setFont(font)
self.main_title_edit.setLayoutDirection(QtCore.Qt.LeftToRight)
self.main_title_edit.setObjectName("main_title_edit")
self.horizontalLayout_16.addWidget(self.main_title_edit)
self.verticalLayout_8.addLayout(self.horizontalLayout_16)
self.save_to_config = QtWidgets.QPushButton(self.groupBox)
self.save_to_config.setMinimumSize(QtCore.QSize(0, 28))
self.save_to_config.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.save_to_config.setStyleSheet("background-color:rgb(146, 189, 108);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:40px;\n"
"height:25px;\n"
"padding:5px;")
self.save_to_config.setObjectName("save_to_config")
self.verticalLayout_8.addWidget(self.save_to_config)
self.verticalLayout_5.addWidget(self.groupBox)
self.groupBox_7 = QtWidgets.QGroupBox(self.img_detect)
self.groupBox_7.setMinimumSize(QtCore.QSize(0, 100))
self.groupBox_7.setMaximumSize(QtCore.QSize(16777215, 200))
self.groupBox_7.setObjectName("groupBox_7")
self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.groupBox_7)
self.verticalLayout_10.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_10.setSpacing(6)
self.verticalLayout_10.setObjectName("verticalLayout_10")
self.verticalLayout_9 = QtWidgets.QVBoxLayout()
self.verticalLayout_9.setSpacing(6)
self.verticalLayout_9.setObjectName("verticalLayout_9")
self.upload_img = QtWidgets.QPushButton(self.groupBox_7)
self.upload_img.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.upload_img.setStyleSheet("background-color:rgb(146, 189, 108);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:40px;\n"
"height:25px;\n"
"padding:5px;")
self.upload_img.setObjectName("upload_img")
self.verticalLayout_9.addWidget(self.upload_img)
self.start_detect = QtWidgets.QPushButton(self.groupBox_7)
self.start_detect.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.start_detect.setStyleSheet("background-color:rgb(146, 189, 108);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:40px;\n"
"height:25px;\n"
"padding:5px;")
self.start_detect.setObjectName("start_detect")
self.verticalLayout_9.addWidget(self.start_detect)
self.verticalLayout_10.addLayout(self.verticalLayout_9)
self.verticalLayout_5.addWidget(self.groupBox_7)
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_5.addItem(spacerItem3)
self.groupBox_3 = QtWidgets.QGroupBox(self.img_detect)
self.groupBox_3.setMinimumSize(QtCore.QSize(200, 200))
self.groupBox_3.setMaximumSize(QtCore.QSize(200, 250))
self.groupBox_3.setObjectName("groupBox_3")
self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3)
self.gridLayout_2.setContentsMargins(11, 5, 11, 11)
self.gridLayout_2.setHorizontalSpacing(20)
self.gridLayout_2.setVerticalSpacing(5)
self.gridLayout_2.setObjectName("gridLayout_2")
self.tabWidget = QtWidgets.QTabWidget(self.groupBox_3)
self.tabWidget.setElideMode(QtCore.Qt.ElideNone)
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.verticalLayout_12 = QtWidgets.QVBoxLayout(self.tab)
self.verticalLayout_12.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_12.setSpacing(6)
self.verticalLayout_12.setObjectName("verticalLayout_12")
self.auto_run_btn = QtWidgets.QPushButton(self.tab)
self.auto_run_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.auto_run_btn.setStyleSheet("background-color:rgb(140, 137, 134);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:40px;\n"
"height:25px;\n"
"padding:5px;")
self.auto_run_btn.setObjectName("auto_run_btn")
self.verticalLayout_12.addWidget(self.auto_run_btn)
self.stop_run_btn = QtWidgets.QPushButton(self.tab)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.stop_run_btn.sizePolicy().hasHeightForWidth())
self.stop_run_btn.setSizePolicy(sizePolicy)
self.stop_run_btn.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.stop_run_btn.setStyleSheet("background-color:rgb(140, 137, 134);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:80px;\n"
"height:25px;\n"
"padding:5px;")
self.stop_run_btn.setObjectName("stop_run_btn")
self.verticalLayout_12.addWidget(self.stop_run_btn)
self.tabWidget.addTab(self.tab, "")
self.tab_3 = QtWidgets.QWidget()
self.tab_3.setObjectName("tab_3")
self.verticalLayout_11 = QtWidgets.QVBoxLayout(self.tab_3)
self.verticalLayout_11.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_11.setSpacing(6)
self.verticalLayout_11.setObjectName("verticalLayout_11")
self.open_camera = QtWidgets.QPushButton(self.tab_3)
self.open_camera.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.open_camera.setStyleSheet("background-color:rgb(123, 170, 156);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:80px;\n"
"height:25px;\n"
"padding:5px;")
self.open_camera.setObjectName("open_camera")
self.verticalLayout_11.addWidget(self.open_camera)
self.close_camera = QtWidgets.QPushButton(self.tab_3)
self.close_camera.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.close_camera.setStyleSheet("background-color:rgb(255, 85, 0);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:80px;\n"
"height:25px;\n"
"padding:5px;")
self.close_camera.setObjectName("close_camera")
self.verticalLayout_11.addWidget(self.close_camera)
self.takePicButton = QtWidgets.QPushButton(self.tab_3)
self.takePicButton.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.takePicButton.setStyleSheet("background-color:rgb(146, 189, 108);\n"
"border:1px solid;\n"
"border-radius:10px;\n"
"width:40px;\n"
"height:25px;\n"
"padding:5px;")
self.takePicButton.setObjectName("takePicButton")
self.verticalLayout_11.addWidget(self.takePicButton)
self.tabWidget.addTab(self.tab_3, "")
self.gridLayout_2.addWidget(self.tabWidget, 1, 0, 1, 1)
self.verticalLayout_5.addWidget(self.groupBox_3)
self.horizontalLayout_6.addLayout(self.verticalLayout_5)
self.verticalLayout_4 = QtWidgets.QVBoxLayout()
self.verticalLayout_4.setSpacing(6)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.groupBox_2 = QtWidgets.QGroupBox(self.img_detect)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
self.groupBox_2.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setPointSize(9)
self.groupBox_2.setFont(font)
self.groupBox_2.setObjectName("groupBox_2")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox_2)
self.horizontalLayout.setContentsMargins(11, 11, 11, 11)
self.horizontalLayout.setSpacing(6)
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setSpacing(6)
self.verticalLayout.setObjectName("verticalLayout")
self.label_12 = QtWidgets.QLabel(self.groupBox_2)
self.label_12.setMaximumSize(QtCore.QSize(16777215, 20))
self.label_12.setObjectName("label_12")
self.verticalLayout.addWidget(self.label_12)
self.realtimePic = QtWidgets.QLabel(self.groupBox_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.realtimePic.sizePolicy().hasHeightForWidth())
self.realtimePic.setSizePolicy(sizePolicy)
self.realtimePic.setMinimumSize(QtCore.QSize(400, 300))
self.realtimePic.setMaximumSize(QtCore.QSize(400, 300))
self.realtimePic.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.realtimePic.setFrameShadow(QtWidgets.QFrame.Plain)
self.realtimePic.setAlignment(QtCore.Qt.AlignCenter)
self.realtimePic.setObjectName("realtimePic")
self.verticalLayout.addWidget(self.realtimePic)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setSpacing(6)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.label_14 = QtWidgets.QLabel(self.groupBox_2)
self.label_14.setMaximumSize(QtCore.QSize(16777215, 20))
self.label_14.setObjectName("label_14")
self.verticalLayout_2.addWidget(self.label_14)
self.capturePic = QtWidgets.QLabel(self.groupBox_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.capturePic.sizePolicy().hasHeightForWidth())
self.capturePic.setSizePolicy(sizePolicy)
self.capturePic.setMinimumSize(QtCore.QSize(400, 300))
self.capturePic.setMaximumSize(QtCore.QSize(400, 300))
self.capturePic.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.capturePic.setFrameShadow(QtWidgets.QFrame.Plain)
self.capturePic.setAlignment(QtCore.Qt.AlignCenter)
self.capturePic.setObjectName("capturePic")
self.verticalLayout_2.addWidget(self.capturePic)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setSpacing(6)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.label_15 = QtWidgets.QLabel(self.groupBox_2)
self.label_15.setMaximumSize(QtCore.QSize(16777215, 20))
self.label_15.setObjectName("label_15")
self.verticalLayout_3.addWidget(self.label_15)
self.resultPic = QtWidgets.QLabel(self.groupBox_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.resultPic.sizePolicy().hasHeightForWidth())
self.resultPic.setSizePolicy(sizePolicy)
self.resultPic.setMinimumSize(QtCore.QSize(400, 300))
self.resultPic.setMaximumSize(QtCore.QSize(400, 300))
self.resultPic.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.resultPic.setFrameShadow(QtWidgets.QFrame.Plain)
self.resultPic.setAlignment(QtCore.Qt.AlignCenter)
self.resultPic.setObjectName("resultPic")
self.verticalLayout_3.addWidget(self.resultPic)
self.horizontalLayout.addLayout(self.verticalLayout_3)
self.horizontalLayout.setStretch(0, 1)
self.horizontalLayout.setStretch(1, 1)
self.horizontalLayout.setStretch(2, 1)
self.verticalLayout_4.addWidget(self.groupBox_2)
self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
self.horizontalLayout_7.setSpacing(6)
self.horizontalLayout_7.setObjectName("horizontalLayout_7")
self.groupBox_5 = QtWidgets.QGroupBox(self.img_detect)
self.groupBox_5.setMaximumSize(QtCore.QSize(400, 160))
self.groupBox_5.setObjectName("groupBox_5")
self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox_5)
self.gridLayout_3.setContentsMargins(11, 11, 11, 11)
self.gridLayout_3.setSpacing(6)
self.gridLayout_3.setObjectName("gridLayout_3")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setSpacing(6)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_9 = QtWidgets.QLabel(self.groupBox_5)
self.label_9.setObjectName("label_9")
self.horizontalLayout_2.addWidget(self.label_9)
self.label_10 = QtWidgets.QLabel(self.groupBox_5)
self.label_10.setObjectName("label_10")
self.horizontalLayout_2.addWidget(self.label_10)
self.gridLayout_3.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setSpacing(6)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label_13 = QtWidgets.QLabel(self.groupBox_5)
self.label_13.setObjectName("label_13")
self.horizontalLayout_3.addWidget(self.label_13)
self.take_picture_date = QtWidgets.QDateEdit(self.groupBox_5)
self.take_picture_date.setObjectName("take_picture_date")
self.horizontalLayout_3.addWidget(self.take_picture_date)
self.gridLayout_3.addLayout(self.horizontalLayout_3, 1, 0, 1, 1)
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
self.horizontalLayout_4.setSpacing(6)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.label_11 = QtWidgets.QLabel(self.groupBox_5)
self.label_11.setObjectName("label_11")
self.horizontalLayout_4.addWidget(self.label_11)
self.take_picture_time = QtWidgets.QTimeEdit(self.groupBox_5)
self.take_picture_time.setObjectName("take_picture_time")
self.horizontalLayout_4.addWidget(self.take_picture_time)
self.gridLayout_3.addLayout(self.horizontalLayout_4, 2, 0, 1, 1)
self.horizontalLayout_7.addWidget(self.groupBox_5)
self.now_frame_label = QtWidgets.QLabel(self.img_detect)
self.now_frame_label.setMinimumSize(QtCore.QSize(300, 0))
self.now_frame_label.setMaximumSize(QtCore.QSize(16777215, 50))
self.now_frame_label.setObjectName("now_frame_label")
self.horizontalLayout_7.addWidget(self.now_frame_label)
spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_7.addItem(spacerItem4)
self.groupBox_8 = QtWidgets.QGroupBox(self.img_detect)
self.groupBox_8.setMinimumSize(QtCore.QSize(380, 0))
self.groupBox_8.setMaximumSize(QtCore.QSize(16777215, 150))
self.groupBox_8.setObjectName("groupBox_8")
self.verticalLayout_13 = QtWidgets.QVBoxLayout(self.groupBox_8)
self.verticalLayout_13.setContentsMargins(11, 11, 11, 11)
self.verticalLayout_13.setSpacing(6)
self.verticalLayout_13.setObjectName("verticalLayout_13")
self.detect_result_info = QtWidgets.QTextEdit(self.groupBox_8)
self.detect_result_info.setMinimumSize(QtCore.QSize(0, 0))
self.detect_result_info.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.detect_result_info.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.detect_result_info.setFrameShadow(QtWidgets.QFrame.Plain)
self.detect_result_info.setLineWidth(1)
self.detect_result_info.setObjectName("detect_result_info")
self.verticalLayout_13.addWidget(self.detect_result_info)
self.detect_result_info_label = QtWidgets.QLabel(self.groupBox_8)
self.detect_result_info_label.setMinimumSize(QtCore.QSize(0, 30))
self.detect_result_info_label.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.detect_result_info_label.setIndent(-1)
self.detect_result_info_label.setObjectName("detect_result_info_label")
self.verticalLayout_13.addWidget(self.detect_result_info_label)
self.horizontalLayout_7.addWidget(self.groupBox_8)
self.groupBox_4 = QtWidgets.QGroupBox(self.img_detect)
self.groupBox_4.setMinimumSize(QtCore.QSize(200, 0))
self.groupBox_4.setMaximumSize(QtCore.QSize(200, 160))
self.groupBox_4.setObjectName("groupBox_4")
self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_4)
self.gridLayout_5.setContentsMargins(11, 11, 11, 11)
self.gridLayout_5.setSpacing(6)
self.gridLayout_5.setObjectName("gridLayout_5")
self.finalResult = QtWidgets.QLabel(self.groupBox_4)
font = QtGui.QFont()
font.setFamily("黑体")
font.setPointSize(16)
self.finalResult.setFont(font)
self.finalResult.setCursor(QtGui.QCursor(QtCore.Qt.ForbiddenCursor))
self.finalResult.setAutoFillBackground(False)
self.finalResult.setStyleSheet("color:rgb(255, 255, 255);\n"
"background-color:gray")
self.finalResult.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.finalResult.setFrameShadow(QtWidgets.QFrame.Raised)
self.finalResult.setAlignment(QtCore.Qt.AlignCenter)
self.finalResult.setObjectName("finalResult")
self.gridLayout_5.addWidget(self.finalResult, 0, 0, 1, 1)
self.horizontalLayout_7.addWidget(self.groupBox_4)
self.verticalLayout_4.addLayout(self.horizontalLayout_7)
self.verticalLayout_4.setStretch(0, 1)
self.horizontalLayout_6.addLayout(self.verticalLayout_4)
self.verticalLayout_6.addLayout(self.horizontalLayout_6)
self.horizontalLayout_8.addLayout(self.verticalLayout_6)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icons/icons/824.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.main_layout.addTab(self.img_detect, icon, "")
self.video_detect = QtWidgets.QWidget()
self.video_detect.setObjectName("video_detect")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icons/icons/pre1.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.main_layout.addTab(self.video_detect, icon1, "")
self.verticalLayout_7.addWidget(self.main_layout)
MainWindow.setCentralWidget(self.centralWidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 1516, 23))
self.menuBar.setStyleSheet("color:rgb(188, 190, 192);\n"
"background-color:rgb(64, 66, 68);")
self.menuBar.setObjectName("menuBar")
self.menu_F = QtWidgets.QMenu(self.menuBar)
self.menu_F.setObjectName("menu_F")
self.menu = QtWidgets.QMenu(self.menuBar)
self.menu.setObjectName("menu")
self.menu_2 = QtWidgets.QMenu(self.menuBar)
self.menu_2.setObjectName("menu_2")
MainWindow.setMenuBar(self.menuBar)
self.mainToolBar = QtWidgets.QToolBar(MainWindow)
self.mainToolBar.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.mainToolBar.setMouseTracking(False)
self.mainToolBar.setFocusPolicy(QtCore.Qt.NoFocus)
self.mainToolBar.setAcceptDrops(False)
self.mainToolBar.setStyleSheet("background-color:rgb(208, 208, 209);\n"
"\n"
"")
self.mainToolBar.setAllowedAreas(QtCore.Qt.AllToolBarAreas)
self.mainToolBar.setOrientation(QtCore.Qt.Horizontal)
self.mainToolBar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
self.mainToolBar.setObjectName("mainToolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.mainToolBar)
self.statusBar = QtWidgets.QStatusBar(MainWindow)
font = QtGui.QFont()
font.setPointSize(12)
self.statusBar.setFont(font)
self.statusBar.setAutoFillBackground(False)
self.statusBar.setStyleSheet("color:white;\n"
"background-color:rgb(64, 66, 68);")
self.statusBar.setObjectName("statusBar")
MainWindow.setStatusBar(self.statusBar)
self.open_capturedPic_dir = QtWidgets.QAction(MainWindow)
self.open_capturedPic_dir.setCheckable(False)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/icons/icons/open3.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.open_capturedPic_dir.setIcon(icon2)
self.open_capturedPic_dir.setShortcutVisibleInContextMenu(True)
self.open_capturedPic_dir.setObjectName("open_capturedPic_dir")
self.about_this_software = QtWidgets.QAction(MainWindow)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/icons/icons/101.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.about_this_software.setIcon(icon3)
self.about_this_software.setObjectName("about_this_software")
self.help_doc = QtWidgets.QAction(MainWindow)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/icons/icons/328.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.help_doc.setIcon(icon4)
self.help_doc.setObjectName("help_doc")
self.save_photo = QtWidgets.QAction(MainWindow)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/icons/icons/save1.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.save_photo.setIcon(icon5)
self.save_photo.setObjectName("save_photo")
self.parameter_config = QtWidgets.QAction(MainWindow)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/icons/icons/802.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.parameter_config.setIcon(icon6)
self.parameter_config.setObjectName("parameter_config")
self.open_resultPic_dir = QtWidgets.QAction(MainWindow)
self.open_resultPic_dir.setIcon(icon2)
self.open_resultPic_dir.setObjectName("open_resultPic_dir")
self.detect_model_config = QtWidgets.QAction(MainWindow)
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/icons/icons/130.bmp"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.detect_model_config.setIcon(icon7)
self.detect_model_config.setObjectName("detect_model_config")
self.communication_config = QtWidgets.QAction(MainWindow)
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/icons/icons/194.JPG"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.communication_config.setIcon(icon8)
self.communication_config.setObjectName("communication_config")
self.menu_F.addAction(self.open_capturedPic_dir)
self.menu_F.addAction(self.open_resultPic_dir)
self.menu.addAction(self.communication_config)
self.menu.addAction(self.detect_model_config)
self.menu.addAction(self.parameter_config)
self.menu.addAction(self.save_photo)
self.menu_2.addAction(self.about_this_software)
self.menu_2.addAction(self.help_doc)
self.menuBar.addAction(self.menu_F.menuAction())
self.menuBar.addAction(self.menu.menuAction())
self.menuBar.addAction(self.menu_2.menuAction())
self.mainToolBar.addAction(self.open_capturedPic_dir)
self.mainToolBar.addAction(self.open_resultPic_dir)
self.mainToolBar.addAction(self.communication_config)
self.mainToolBar.addAction(self.detect_model_config)
self.mainToolBar.addAction(self.parameter_config)
self.mainToolBar.addAction(self.save_photo)
self.mainToolBar.addAction(self.about_this_software)
self.mainToolBar.addAction(self.help_doc)
self.retranslateUi(MainWindow)
self.main_layout.setCurrentIndex(0)
self.tabWidget.setCurrentIndex(1)
self.exposure_horizontalSlider.valueChanged['int'].connect(self.exposure_label.setNum) # type: ignore
self.max_det_horizontalSlider.valueChanged['int'].connect(self.max_det_label.setNum) # type: ignore
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "AI智能视觉检测系统"))
self.main_title.setText(_translate("MainWindow", "AI智能视觉检测系统"))
self.datetimeshow_label.setText(_translate("MainWindow", "show_date_time"))
self.groupBox_6.setTitle(_translate("MainWindow", "当前使用检测模型"))
self.show_model_label.setText(_translate("MainWindow", "showmodelLabel"))
self.loadmodel.setText(_translate("MainWindow", "加载模型"))
self.groupBox.setTitle(_translate("MainWindow", "参数调整"))
self.IoU.setText(_translate("MainWindow", "IoU"))
self.conf_thres.setText(_translate("MainWindow", "置信度"))
self.exposure.setText(_translate("MainWindow", "曝光度"))
self.exposure_label.setText(_translate("MainWindow", "0"))
self.max_det.setText(_translate("MainWindow", "max_det"))
self.max_det_label.setText(_translate("MainWindow", "0"))
self.cam_num_label.setText(_translate("MainWindow", "摄像头"))
self.cam_num_spinBox.setSuffix(_translate("MainWindow", "号摄像头"))
self.main_title_label.setText(_translate("MainWindow", "Title"))
self.save_to_config.setText(_translate("MainWindow", "保存至配置文件"))
self.groupBox_7.setTitle(_translate("MainWindow", "图片上传检测"))
self.upload_img.setText(_translate("MainWindow", "上传图片"))
self.start_detect.setText(_translate("MainWindow", "开始检测"))
self.groupBox_3.setTitle(_translate("MainWindow", "手动控制"))
self.auto_run_btn.setText(_translate("MainWindow", "自动运行"))
self.stop_run_btn.setText(_translate("MainWindow", "停止运行"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "系统"))
self.open_camera.setText(_translate("MainWindow", "打开摄像头"))
self.close_camera.setText(_translate("MainWindow", "关闭摄像头"))
self.takePicButton.setText(_translate("MainWindow", "拍照"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "摄像头"))
self.groupBox_2.setTitle(_translate("MainWindow", "图像显示"))
self.label_12.setText(_translate("MainWindow", "摄像头实时画面"))
self.realtimePic.setText(_translate("MainWindow", "摄像头实时画面"))
self.label_14.setText(_translate("MainWindow", "拍照触发捕获图像"))
self.capturePic.setText(_translate("MainWindow", "摄像头捕获图像"))
self.label_15.setText(_translate("MainWindow", "处理结果"))
self.resultPic.setText(_translate("MainWindow", "图像自动处理后结果显示"))
self.groupBox_5.setTitle(_translate("MainWindow", "工件信息"))
self.label_9.setText(_translate("MainWindow", "发动机序列号:"))
self.label_10.setText(_translate("MainWindow", "10-RE-1CN31610083"))
self.label_13.setText(_translate("MainWindow", "拍照日期:"))
self.label_11.setText(_translate("MainWindow", "拍照时间:"))
self.now_frame_label.setText(_translate("MainWindow", "TextLabel"))
self.groupBox_8.setTitle(_translate("MainWindow", "检测结果输出:"))
self.detect_result_info_label.setText(_translate("MainWindow", "TextLabel"))
self.groupBox_4.setTitle(_translate("MainWindow", "结果显示"))
self.finalResult.setText(_translate("MainWindow", "判断结果输出"))
self.main_layout.setTabText(self.main_layout.indexOf(self.img_detect), _translate("MainWindow", " 图像检测"))
self.main_layout.setTabText(self.main_layout.indexOf(self.video_detect), _translate("MainWindow", "视频检测"))
self.menu_F.setTitle(_translate("MainWindow", "文件(F)"))
self.menu.setTitle(_translate("MainWindow", "工具(T)"))
self.menu_2.setTitle(_translate("MainWindow", "帮助(H)"))
self.open_capturedPic_dir.setText(_translate("MainWindow", "打开拍照目录"))
self.open_capturedPic_dir.setToolTip(_translate("MainWindow", "打开拍照存储目录"))
self.open_capturedPic_dir.setShortcut(_translate("MainWindow", "Ctrl+O"))
self.about_this_software.setText(_translate("MainWindow", "关于软件"))
self.about_this_software.setToolTip(_translate("MainWindow", "关于此软件"))
self.help_doc.setText(_translate("MainWindow", "帮助文档"))
self.help_doc.setToolTip(_translate("MainWindow", "帮助文档"))
self.save_photo.setText(_translate("MainWindow", "保存照片"))
self.save_photo.setToolTip(_translate("MainWindow", "保存照片"))
self.save_photo.setShortcut(_translate("MainWindow", "Ctrl+S"))
self.parameter_config.setText(_translate("MainWindow", "加载配置文件"))
self.parameter_config.setToolTip(_translate("MainWindow", "加载图像处理参数文件配置"))
self.open_resultPic_dir.setText(_translate("MainWindow", "打开检测结果目录"))
self.open_resultPic_dir.setToolTip(_translate("MainWindow", "打开检测结果目录"))
self.detect_model_config.setText(_translate("MainWindow", "检测模型配置"))
self.detect_model_config.setToolTip(_translate("MainWindow", "检测模型配置"))
self.communication_config.setText(_translate("MainWindow", "通讯配置"))
import res_rc
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。