# -*- coding: utf-8 -*- import math # Form implementation generated from reading ui file 'win.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # 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 from PyQt5.QtCore import QTimer from PyQt5.QtWidgets import QMessageBox from PyQt5.QtGui import QPixmap, QIcon, QImage from PyQt5.QtWidgets import QLabel from PyQt5.QtCore import pyqtSignal from PyQt5.Qt import QPixmap, QPoint, Qt, QPainter, QIcon from PyQt5.QtWidgets import QWidget import cv2 import json from name import CT_name_zh, CT_name # 演示用coco 后续换成 import numpy as np class LabelMouse(QLabel): double_clicked = pyqtSignal() # 鼠标双击事件 def mouseDoubleClickEvent(self, event): self.double_clicked.emit() def mouseMoveEvent(self): """ 当鼠标划过标签label2时触发事件 :return: """ print('当鼠标划过标签label2时触发事件') def component_polygon_Circle_max(ih, iw, poly): # Calculate the distances to the contour box = cv2.boundingRect(poly[:, None, :]) x, y, w, h = box raw_dist = np.empty([ih, iw]) mask = np.zeros([ih, iw, 3], dtype=np.int32) cv2.fillPoly(mask, [poly.astype(np.int32)], color=(255, 255, 255)) # 在大图上画该类的所有检测多边形 for i in range(x, x + w, ): for j in range(y, y + h, ): if mask[j, i, 0] == 255: raw_dist[j, i] = cv2.pointPolygonTest(poly[:, None:, ], (i, j), True) # 获取最大值即内接圆半径,中心点坐标 _, maxVal, _, maxLoc = cv2.minMaxLoc(raw_dist) return maxVal * 2, maxLoc class Label_click_Mouse(QLabel): clicked = pyqtSignal() # # 鼠标点击事件 # def mousePressEvent(self, event): # self.clicked.emit() # def __init__(self, *args, **kwargs): # super(Label_click_Mouse, self).__init__(*args, **kwargs) # #clicked = pyqtSignal() def __init__(self, *args, **kwargs): super(Label_click_Mouse, self).__init__(*args, **kwargs) self.frame = None self.scaled_img = None self.point = QPoint(0, 0) # [100,100]# self.scale = 1 self.start_pos = None self.lstart_pos = None self.end_pos = None self.left_click = False self.json_file = "" self.lable_i = -1 self.lable_click = False self.delta_scale = 1 self.wheel = False self.text_lables = [] self.lpoints = [] # 计算圆盘的像素长度 self.circle_p1 = QPoint(0, 0) self.circle_p2 = QPoint(0, 0) self.gsd = 0 # 图像的分辨率 # # 鼠标点击事件 # def mousePressEvent(self, event): # self.clicked.emit() def set_init(self): # w = self.geometry().width() h = self.geometry().height() # self.point = QPoint(0, h//8) #[100,100]# self.point = QPoint(0, 0) self.scale = 1 self.start_pos = None self.lstart_pos = None self.end_pos = None self.left_click = False self.lable_i = -1 self.lable_click = False self.label_i = -1 self.delta_scale = 1 self.wheel = False print("set_init, len(self.lpoints): ", len(self.lpoints)) # if len(self.lpoints)>0: len_ = len(self.lpoints) for i in range(len_): print("del self.lpoints[:],i: ", i) # self.lpoints[len_ - 1 - i].hide() del self.lpoints[len_ - 1 - i] self.lpoints = [] print("len(self.lpoints): ", len(self.lpoints)) # if len(self.text_lables)>0: len_ = len(self.text_lables) for i in range(len_): print("del self.text_lables[:],i: ", i) self.text_lables[len_ - 1 - i].hide() del self.text_lables[len_ - 1 - i] self.text_lables = [] print("len(self.text_lables): ", len(self.text_lables)) self.segments = [] def set_image(self, img_path, json_file=""): """ open image file :param img_path: image file path :return: """ # img = QImageReader(img_path) # img.setScaledSize(QSize(self.size().width(), self.size().height())) # img = img.read() # img = cv2.imread(img_path) # self.set_point(img.shape[0],img.shape[1]) # print("准备执行set_image 函数") self.set_init() self.json_file = json_file # print("img_path: ", type(img_path)) if isinstance(img_path, str): self.img = QPixmap(img_path) else: h, w, d = img_path.shape img_path = cv2.cvtColor(img_path, cv2.COLOR_BGR2RGB) img_path = QImage(img_path.data, w, h, w * d, QImage.Format_RGB888) self.img = QPixmap(img_path) w = self.geometry().width() h = self.geometry().height() ih, iw = self.img.height(), self.img.width() # print(ih, iw) # # 保持纵横比 # 找出短边 if w < h: self.scale = w / iw else: self.scale = h / ih # print("scal, w,iw,h,ih: ", scal,w,iw,h,ih) # self.scale=scal if self.json_file: self.scaled_segments = [] self.segments = [] self.class_id = [] self.class_name = [] self.infos = [] # self.text_lables = [] # self.lpoints = [] new_dict = {v: k for k, v in CT_name.items()} with open(self.json_file, 'r') as f: data = json.load(f) class_number = data['shapes'] # 类型个数 i = 0 for cn in class_number: # CT_name_zh = {'crack': '裂纹', 'hole': '孔洞', 'debonding': '脱粘','rarefaction': '疏松'} if cn['label'] in list(CT_name_zh.keys()): # segments.append(np.array(cn['points'],dtype=np.float32)) #获取每个轮廓点 segment = np.array(cn['points'], dtype=np.int32) self.segments.append(segment) if cn['label'] in ["hole", "rarefaction"]: area = round(cv2.contourArea(segment) * self.gsd * self.gsd, 1) width = round(math.sqrt(4 * area / math.pi), 1) # width = int(width * self.gsd) self.infos.append("(A: " + str(area) + "mm²; W: " + str(width) + "mm)") else: lenth = round(cv2.arcLength(segment, True) / 2 * self.gsd, 1) # 计算宽度 width, maxLoc = component_polygon_Circle_max(ih, iw, segment) width = round(width * self.gsd, 1) self.infos.append("(L: " + str(lenth) + "mm; W: " + str(width) + "mm)") self.class_name.append(CT_name_zh[cn['label']]) # 获取对应的class name self.class_id.append(new_dict[cn['label']]) # 获取对应的class id self.text_lables.append(QtWidgets.QLabel(self)) # self.layout().addWidget(self.text_lables[i]) self.lpoints.append(QPoint(0, 0)) # self.layout().addWidget(self.lpoints[i]) i += 1 self.textSize = int(0.04 * self.img.height()) self.resize_seg() self.resize_img() self.repaint() def resize_seg(self): self.scaled_segments = [] # print("self.label_i before self.lpoints[self.label_i]: ", 5, self.lpoints[5].x(), self.lpoints[5].y(),self.delta_scale) for i in range(len(self.segments)): self.scaled_segments.append(self.segments[i] * self.scale) self.scaled_textSize = int(self.scale * self.textSize) # self.lpoints[i] *=self.scale # print("self.label_i after self.lpoints[self.label_i]: ", 5, self.lpoints[5].x(), self.lpoints[5].y()) # print("self.scaled_segments: ", self.scaled_segments) def resize_img(self): ih, iw = self.img.height(), self.img.width() new_w = int(iw * self.scale) new_h = int(ih * self.scale) # print(new_w, new_h) self.scaled_img = self.img.scaled(new_w, new_h, Qt.KeepAspectRatio, Qt.SmoothTransformation) # ,aspectRatioMode= Qt.AspectRatioMode,transformMode = Qt.SmoothTransformation def paintEvent(self, event): if self.scaled_img: # print("准备执行resize_img函数") self.resize_img() painter = QPainter() painter.begin(self) # painter.scale(self.scale, self.scale) painter.setRenderHints(QPainter.Antialiasing | QPainter.SmoothPixmapTransform) painter.drawPixmap(self.point, self.scaled_img) if self.json_file != "": self.resize_seg() painter.setPen(QtGui.QColor(167, 255, 100)) # painter.setFont(QtGui.QFont('simhei',self.scaled_textSize)) # painter.drawText(self.point,"你好") # # print(len(self.scaled_segments), len(self.class_name), len(self.class_id)) for i in range(len(self.scaled_segments)): xy_index = np.argmin(self.scaled_segments[i], axis=0) # 其中,axis=1表示按行计算 x = self.scaled_segments[i][xy_index[1], 0] y = self.scaled_segments[i][xy_index[1], 1] s = "font-size: " + str( self.scaled_textSize) + "px;font-weight: 500;font-family:'Microsoft Yahei UI'; color:red;border: 1px solid green;" # print("self.scaled_textSize: ", self.scaled_textSize) self.text_lables[i].setText(self.class_name[i] + self.infos[i]) self.text_lables[i].setStyleSheet(s) # self.text_lables[i].move(int(self.point.x() + self.lpoints[i].x()+x), int(self.point.y() + self.lpoints[i].y()+y)) self.text_lables[i].move(int(self.point.x() + self.lpoints[i].x() + x), int(self.point.y() + self.lpoints[i].y() + y)) # if self.wheel and i == 5: # self.text_lables[i].move(10,10)#(245, 302) # print(" delta_scale: ", self.delta_scale) # print(" move: ", self.point.x() + self.lpoints[i].x() + x, # self.point.y() + self.lpoints[i].y() + y) # print(" move: ", self.point.x(), self.lpoints[i].x(), x, self.point.y(), self.lpoints[i].y(), y) # print(int(self.lpoint.x()+x), int(self.lpoint.y()+y)) self.text_lables[i].adjustSize() self.text_lables[i].show() painter.drawLine(int(self.point.x() + self.lpoints[i].x() + x), int(self.point.y() + self.lpoints[i].y() + y), int(self.point.x() + x), int(self.point.y() + y), ) painter.end() def wheelEvent(self, event): angle = event.angleDelta() / 8 # 返回QPoint对象,为滚轮转过的数值,单位为1/8度 angleY = angle.y() # 获取当前鼠标相对于view的位置 if angleY > 0: self.delta_scale = 1.1 # self.wheel_n +=1 self.scale *= 1.1 else: # 滚轮下滚 self.delta_scale = 0.9 # self.wheel_n -= 1 self.scale *= 0.9 # self.scale *=self.delta_scale # print("self.delta_scale: ", self.delta_scale) self.wheel = True # ih, iw = self.img.height(), self.img.width() # new_w = int(iw * self.scale) # new_h = int(ih * self.scale) # self.delta_scale = new_w/self.scaled_img.width() #保持直线长度和图片尺寸的比例不变,这样缩放图的时候直线才会等比例缩放 for i in range(len(self.segments)): # print("self.delta_scale: ", self.delta_scale) self.lpoints[i] *= self.delta_scale self.repaint() # print("wheelEvent: ", self.lpoints[5].x(), self.scaled_img.width(), # self.lpoints[5].x() / self.scaled_img.width()) self.wheel = False def mouseMoveEvent(self, e): """ mouse move events for the widget :param e: QMouseEvent :return: """ # print("e.pos(): ",e.pos()) if self.left_click: if not self.lable_click: # 鼠标左键按下并且移到鼠标 self.end_pos = e.pos() - self.start_pos # self.lend_pos = e.pos() - self.lstart_pos # print("e.pos(),self.start_pos,self.end_pos: ", e.pos(),self.start_pos,self.end_pos) self.point = self.point + self.end_pos # for i in range(len(self.text_lables)): # self.lpoints[i]=self.lpoints[i] + self.lend_pos self.start_pos = e.pos() # self.lstart_pos = e.pos() self.repaint() else: # 鼠标点在了文字内,并且移动鼠标 end_pos = e.pos() - self.lstart_pos # print("self.lpoints[self.label_i], self.label_i:", self.lstart_pos, self.lpoints[self.label_i],self.label_i) self.lpoints[self.label_i] = self.lpoints[self.label_i] + end_pos # print("mouseMoveEvent self.lpoints[self.label_i].x(),self.lpoints[self.label_i].y() : ", # self.lpoints[self.label_i].x(), self.lpoints[self.label_i].y()) self.lstart_pos = e.pos() self.repaint() def mousePressEvent(self, e): # 鼠标左键按下事件 """ mouse press events for the widget :param e: QMouseEvent :return: """ if e.button() == Qt.LeftButton: self.left_click = True self.start_pos = e.pos() self.lstart_pos = e.pos() if self.json_file != "": print("鼠标左键按下,len(self.text_lables):", len(self.text_lables), self.class_name) for i in range(len(self.text_lables)): x = self.text_lables[i].x() y = self.text_lables[i].y() w = self.text_lables[i].size().width() h = self.text_lables[i].size().height() # print(x,y,w,h) if e.pos().x() > x and e.pos().x() < x + w and e.pos().y() > y and e.pos().y() < y + h: print(f"鼠标点在了第{i}个框内,{self.class_name[i]}") self.lable_click = True self.label_i = i break def mouseReleaseEvent(self, e): """ mouse release events for the widget :param e: QMouseEvent :return: """ if e.button() == Qt.LeftButton: self.left_click = False self.lable_click = False self.label_i = -1 # print("mouseReleaseEvent: ",self.lpoints[5].x(), self.scaled_img.width(), # self.lpoints[5].x() / self.scaled_img.width()) self.circle_p1 = self.circle_p2 self.circle_p2 = e.pos() / self.scale # 单按钮对话框,出现到指定时长后自动消失 class MessageBox(QMessageBox): def __init__(self, *args, title='提示', count=1, time=1000, auto=False, **kwargs): super(MessageBox, self).__init__(*args, **kwargs) self._count = count self._time = time self._auto = auto # 是否自动关闭 assert count > 0 # 必须大于0 assert time >= 500 # 必须>=500毫秒 self.setStyleSheet(''' QDialog{background:rgb(75, 75, 75); color:white;} QLabel{color:white; background: rgb(75, 75, 75); font-size: 15px; font-weight: light; color:white;}''') self.setWindowTitle(title) self.setIconPixmap(QPixmap(":/img/icon/笑脸.png")) self.setStandardButtons(self.Close) # 关闭按钮 self.closeBtn = self.button(self.Close) # 获取关闭按钮 self.closeBtn.setText('关闭') self.closeBtn.setVisible(False) self._timer = QTimer(self, timeout=self.doCountDown) self._timer.start(self._time) def doCountDown(self): # self.closeBtn.setText('关闭(%s)' % self._count) self._count -= 1 if self._count <= 0: # self.closeBtn.setText('关闭') # self.closeBtn.setEnabled(True) self._timer.stop() if self._auto: # 自动关闭 self.accept() self.close() class InfoMessageBox(QMessageBox): def __init__(self, *args, **kwargs): super(MessageBox, self).__init__(*args, **kwargs) self.setStyleSheet(''' QDialog{background:rgb(75, 75, 75); color:white;} QLabel{color:white; background: rgb(75, 75, 75); font-size: 15px; font-weight: light; color:white;}''') # self.setWindowTitle(title) self.setIconPixmap(QPixmap(":/img/icon/笑脸.png")) # self.setStandardButtons(self.Close) # 关闭按钮 # self.closeBtn = self.button(self.Close) # 获取关闭按钮 # self.closeBtn.setText('关闭') # self.closeBtn.setVisible(False) class ImageBox(QWidget): def __init__(self): super(ImageBox, self).__init__() self.img = None self.scaled_img = None self.point = QPoint(0, 0) self.start_pos = None self.end_pos = None self.left_click = False self.scale = 1 # def init_ui(self): # self.setWindowTitle("ImageBox") def set_point(self, w, h): self.point = QPoint(w // 2, h // 2) def set_image(self, img_path): """ open image file :param img_path: image file path :return: """ # img = QImageReader(img_path) # img.setScaledSize(QSize(self.size().width(), self.size().height())) # img = img.read() self.img = img_path # QPixmap(img_path) self.scaled_img = self.img def paintEvent(self, e): """ receive paint events :param e: QPaintEvent :return: """ if self.scaled_img: painter = QPainter() painter.begin(self) painter.scale(self.scale, self.scale) painter.drawPixmap(self.point, self.scaled_img) painter.end() def wheelEvent(self, event): angle = event.angleDelta() / 8 # 返回QPoint对象,为滚轮转过的数值,单位为1/8度 angleY = angle.y() # 获取当前鼠标相对于view的位置 if angleY > 0: self.scale *= 1.1 else: # 滚轮下滚 self.scale *= 0.9 self.adjustSize() self.update() def mouseMoveEvent(self, e): """ mouse move events for the widget :param e: QMouseEvent :return: """ if self.left_click: self.end_pos = e.pos() - self.start_pos self.point = self.point + self.end_pos self.start_pos = e.pos() self.repaint() def mousePressEvent(self, e): """ mouse press events for the widget :param e: QMouseEvent :return: """ if e.button() == Qt.LeftButton: self.left_click = True self.start_pos = e.pos() def mouseReleaseEvent(self, e): """ mouse release events for the widget :param e: QMouseEvent :return: """ if e.button() == Qt.LeftButton: self.left_click = False class Ui_mainWindow(object): def setupUi(self, mainWindow): mainWindow.setObjectName("mainWindow") mainWindow.resize(1319, 762) mainWindow.setMouseTracking(True) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/img/icon/图片1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) mainWindow.setWindowIcon(icon) mainWindow.setStyleSheet("#mainWindow{border:none;}") self.centralwidget = QtWidgets.QWidget(mainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.groupBox_18 = QtWidgets.QGroupBox(self.centralwidget) self.groupBox_18.setStyleSheet("#groupBox_18{border-image: url(:/img/icon/background.jpg);\n" "border: 0px solid #42adff;\n" "border-radius:5px;}") self.groupBox_18.setTitle("") self.groupBox_18.setObjectName("groupBox_18") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.groupBox_18) self.verticalLayout_6.setContentsMargins(0, 0, 0, 0) self.verticalLayout_6.setSpacing(0) self.verticalLayout_6.setObjectName("verticalLayout_6") self.groupBox = QtWidgets.QGroupBox(self.groupBox_18) self.groupBox.setMinimumSize(QtCore.QSize(0, 45)) self.groupBox.setMaximumSize(QtCore.QSize(16777215, 45)) self.groupBox.setStyleSheet("#groupBox{\n" "background-color: rgba(75, 75, 75, 200);\n" "border: 0px solid #42adff;\n" "border-left: 0px solid rgba(29, 83, 185, 255);\n" "border-right: 0px solid rgba(29, 83, 185, 255);\n" "border-bottom: 1px solid rgba(200, 200, 200,100);\n" ";\n" "border-radius:0px;}") self.groupBox.setTitle("") self.groupBox.setObjectName("groupBox") self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBox) self.horizontalLayout.setContentsMargins(-1, 0, -1, 0) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName("horizontalLayout") self.label_4 = QtWidgets.QLabel(self.groupBox) self.label_4.setStyleSheet("QLabel\n" "{\n" " font-size: 24px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_4.setObjectName("label_4") self.horizontalLayout.addWidget(self.label_4) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setSpacing(0) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.minButton = QtWidgets.QPushButton(self.groupBox) self.minButton.setMinimumSize(QtCore.QSize(50, 28)) self.minButton.setMaximumSize(QtCore.QSize(50, 28)) self.minButton.setStyleSheet("QPushButton {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(223, 223, 223, 0);}\n" "QPushButton::focus{outline: none;}\n" "QPushButton::hover {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(223, 223, 223, 150);}") self.minButton.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/img/icon/最小化.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.minButton.setIcon(icon1) self.minButton.setObjectName("minButton") self.horizontalLayout_5.addWidget(self.minButton) self.maxButton = QtWidgets.QPushButton(self.groupBox) self.maxButton.setMinimumSize(QtCore.QSize(50, 28)) self.maxButton.setMaximumSize(QtCore.QSize(50, 28)) self.maxButton.setStyleSheet("QPushButton {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(223, 223, 223, 0);}\n" "QPushButton::focus{outline: none;}\n" "QPushButton::hover {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(223, 223, 223, 150);}") self.maxButton.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/img/icon/正方形.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon2.addPixmap(QtGui.QPixmap(":/img/icon/还原.png"), QtGui.QIcon.Active, QtGui.QIcon.On) icon2.addPixmap(QtGui.QPixmap(":/img/icon/还原.png"), QtGui.QIcon.Selected, QtGui.QIcon.On) self.maxButton.setIcon(icon2) self.maxButton.setCheckable(True) self.maxButton.setObjectName("maxButton") self.horizontalLayout_5.addWidget(self.maxButton) self.closeButton = QtWidgets.QPushButton(self.groupBox) self.closeButton.setMinimumSize(QtCore.QSize(50, 28)) self.closeButton.setMaximumSize(QtCore.QSize(50, 28)) self.closeButton.setStyleSheet("QPushButton {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(223, 223, 223, 0);}\n" "QPushButton::focus{outline: none;}\n" "QPushButton::hover {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(223, 223, 223, 150);}") self.closeButton.setText("") icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/img/icon/关闭.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.closeButton.setIcon(icon3) self.closeButton.setObjectName("closeButton") self.horizontalLayout_5.addWidget(self.closeButton) self.horizontalLayout.addLayout(self.horizontalLayout_5) self.verticalLayout_6.addWidget(self.groupBox) self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setSpacing(0) self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.groupBox_8 = QtWidgets.QGroupBox(self.groupBox_18) self.groupBox_8.setMinimumSize(QtCore.QSize(320, 0)) self.groupBox_8.setMaximumSize(QtCore.QSize(320, 16777215)) self.groupBox_8.setBaseSize(QtCore.QSize(3, 0)) self.groupBox_8.setStyleSheet("#groupBox_8{\n" "background-color: rgba(75, 75, 75, 200);\n" "border: 0px solid #42adff;\n" "border-radius:0px;}\n" "") self.groupBox_8.setTitle("") self.groupBox_8.setObjectName("groupBox_8") self.layoutWidget = QtWidgets.QWidget(self.groupBox_8) self.layoutWidget.setGeometry(QtCore.QRect(10, 500, 211, 37)) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout_13 = QtWidgets.QHBoxLayout(self.layoutWidget) self.horizontalLayout_13.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_13.setObjectName("horizontalLayout_13") self.label_8 = QtWidgets.QLabel(self.layoutWidget) self.label_8.setMinimumSize(QtCore.QSize(0, 35)) self.label_8.setMaximumSize(QtCore.QSize(80, 16777215)) self.label_8.setStyleSheet("QLabel\n" "{\n" " font-size: 18px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_8.setObjectName("label_8") self.horizontalLayout_13.addWidget(self.label_8) self.beicepin = QtWidgets.QLineEdit(self.layoutWidget) self.beicepin.setObjectName("beicepin") self.horizontalLayout_13.addWidget(self.beicepin) self.layoutWidget_2 = QtWidgets.QWidget(self.groupBox_8) self.layoutWidget_2.setGeometry(QtCore.QRect(10, 540, 211, 37)) self.layoutWidget_2.setObjectName("layoutWidget_2") self.horizontalLayout_14 = QtWidgets.QHBoxLayout(self.layoutWidget_2) self.horizontalLayout_14.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_14.setObjectName("horizontalLayout_14") self.label_12 = QtWidgets.QLabel(self.layoutWidget_2) self.label_12.setMinimumSize(QtCore.QSize(0, 35)) self.label_12.setMaximumSize(QtCore.QSize(80, 16777215)) self.label_12.setStyleSheet("QLabel\n" "{\n" " font-size: 18px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_12.setObjectName("label_12") self.horizontalLayout_14.addWidget(self.label_12) self.pici = QtWidgets.QLineEdit(self.layoutWidget_2) self.pici.setObjectName("pici") self.horizontalLayout_14.addWidget(self.pici) self.layoutWidget1 = QtWidgets.QWidget(self.groupBox_8) self.layoutWidget1.setGeometry(QtCore.QRect(90, 20, 206, 37)) self.layoutWidget1.setObjectName("layoutWidget1") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.layoutWidget1) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.detectbutton = QtWidgets.QPushButton(self.layoutWidget1) self.detectbutton.setMinimumSize(QtCore.QSize(55, 28)) self.detectbutton.setMaximumSize(QtCore.QSize(16777215, 28)) self.detectbutton.setStyleSheet("QPushButton{font-family: \"Microsoft YaHei\";\n" "font-size: 14px;\n" "font-weight: bold;\n" "color:white;\n" "text-align: center center;\n" "padding-left: 5px;\n" "padding-right: 5px;\n" "padding-top: 4px;\n" "padding-bottom: 4px;\n" "border-style: solid;\n" "border-width: 0px;\n" "border-color: rgba(255, 255, 255, 255);\n" "border-radius: 3px;\n" "background-color: rgba(48,148,243,0);}\n" "\n" "QPushButton:focus{outline: none;}\n" "\n" "QPushButton::pressed{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "\n" "QPushButton::disabled{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "QPushButton::hover {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(48,148,243,80);}") self.detectbutton.setObjectName("detectbutton") self.horizontalLayout_2.addWidget(self.detectbutton) self.trainbutton = QtWidgets.QPushButton(self.layoutWidget1) self.trainbutton.setMinimumSize(QtCore.QSize(55, 28)) self.trainbutton.setMaximumSize(QtCore.QSize(16777215, 28)) self.trainbutton.setStyleSheet("QPushButton{font-family: \"Microsoft YaHei\";\n" "font-size: 14px;\n" "font-weight: bold;\n" "color:white;\n" "text-align: center center;\n" "padding-left: 5px;\n" "padding-right: 5px;\n" "padding-top: 4px;\n" "padding-bottom: 4px;\n" "border-style: solid;\n" "border-width: 0px;\n" "border-color: rgba(255, 255, 255, 255);\n" "border-radius: 3px;\n" "background-color: rgba(200, 200, 200,0);}\n" "\n" "QPushButton:focus{outline: none;}\n" "\n" "QPushButton::pressed{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "\n" "QPushButton::disabled{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "QPushButton::hover {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(48,148,243,80);}") self.trainbutton.setObjectName("trainbutton") self.horizontalLayout_2.addWidget(self.trainbutton) self.trainbutton_2 = QtWidgets.QPushButton(self.layoutWidget1) self.trainbutton_2.setMaximumSize(QtCore.QSize(16777215, 28)) self.trainbutton_2.setStyleSheet("QPushButton{font-family: \"Microsoft YaHei\";\n" "font-size: 14px;\n" "font-weight: bold;\n" "color:white;\n" "text-align: center center;\n" "padding-left: 5px;\n" "padding-right: 5px;\n" "padding-top: 4px;\n" "padding-bottom: 4px;\n" "border-style: solid;\n" "border-width: 0px;\n" "border-color: rgba(255, 255, 255, 255);\n" "border-radius: 3px;\n" "background-color: rgba(200, 200, 200,0);}\n" "\n" "QPushButton:focus{outline: none;}\n" "\n" "QPushButton::pressed{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "\n" "QPushButton::disabled{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "QPushButton::hover {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(48,148,243,80);}") self.trainbutton_2.setObjectName("trainbutton_2") self.horizontalLayout_2.addWidget(self.trainbutton_2) self.label_11 = QtWidgets.QLabel(self.groupBox_8) self.label_11.setGeometry(QtCore.QRect(10, 140, 72, 25)) self.label_11.setStyleSheet("QLabel\n" "{\n" " font-size: 18px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_11.setObjectName("label_11") self.resultWidget = QtWidgets.QListWidget(self.groupBox_8) self.resultWidget.setGeometry(QtCore.QRect(10, 180, 301, 270)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.resultWidget.sizePolicy().hasHeightForWidth()) self.resultWidget.setSizePolicy(sizePolicy) self.resultWidget.setMinimumSize(QtCore.QSize(0, 270)) self.resultWidget.setMaximumSize(QtCore.QSize(16777215, 270)) self.resultWidget.setStyleSheet("QListWidget{\n" "background-color: rgba(255, 255, 255, 255);\n" "border: 1px solid rgba(200, 200, 200,100);\n" "border-bottom: 0px solid rgba(200, 200, 200,100);\n" "border-radius:0px;\n" "font-family: \"Microsoft YaHei\";\n" "font-size: 12px;\n" "color: rgb(0, 0, 0);\n" "}\n" "") self.resultWidget.setObjectName("resultWidget") self.choose_file = QtWidgets.QPushButton(self.groupBox_8) self.choose_file.setGeometry(QtCore.QRect(90, 105, 76, 24)) self.choose_file.setObjectName("choose_file") self.choose_folder = QtWidgets.QPushButton(self.groupBox_8) self.choose_folder.setGeometry(QtCore.QRect(180, 105, 101, 24)) self.choose_folder.setObjectName("choose_folder") self.label_3 = QtWidgets.QLabel(self.groupBox_8) self.label_3.setGeometry(QtCore.QRect(10, 60, 72, 35)) self.label_3.setMinimumSize(QtCore.QSize(0, 35)) self.label_3.setMaximumSize(QtCore.QSize(80, 16777215)) self.label_3.setStyleSheet("QLabel\n" "{\n" " font-size: 18px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_3.setObjectName("label_3") self.comboBox = QtWidgets.QComboBox(self.groupBox_8) self.comboBox.setGeometry(QtCore.QRect(90, 57, 194, 35)) self.comboBox.setMinimumSize(QtCore.QSize(0, 35)) self.comboBox.setStyleSheet("QComboBox QAbstractItemView {\n" "font-family: \"Microsoft YaHei\";\n" "font-size: 16px;\n" "background:rgba(200, 200, 200,150);\n" "selection-background-color: rgba(200, 200, 200,50);\n" "color: rgb(218, 218, 218);\n" "outline:none;\n" "border:none;}\n" "QComboBox{\n" "font-family: \"Microsoft YaHei\";\n" "font-size: 16px;\n" "color: rgb(218, 218, 218);\n" "border-width:0px;\n" "border-color:white;\n" "border-style:solid;\n" "background-color: rgba(200, 200, 200,0);}\n" "\n" "QComboBox::drop-down {\n" "margin-top:8;\n" "height:20;\n" "background:rgba(255,255,255,0);\n" "border-image: url(:/img/icon/下拉_白色.png);\n" "}\n" "") self.comboBox.setObjectName("comboBox") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.comboBox.addItem("") self.label_5 = QtWidgets.QLabel(self.groupBox_8) self.label_5.setGeometry(QtCore.QRect(10, 20, 72, 35)) self.label_5.setMinimumSize(QtCore.QSize(0, 35)) self.label_5.setMaximumSize(QtCore.QSize(80, 16777215)) self.label_5.setStyleSheet("QLabel\n" "{\n" " font-size: 18px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_5.setObjectName("label_5") self.label_10 = QtWidgets.QLabel(self.groupBox_8) self.label_10.setGeometry(QtCore.QRect(10, 100, 72, 35)) self.label_10.setMinimumSize(QtCore.QSize(0, 35)) self.label_10.setMaximumSize(QtCore.QSize(80, 16777215)) self.label_10.setStyleSheet("QLabel\n" "{\n" " font-size: 18px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_10.setObjectName("label_10") self.layoutWidget_5 = QtWidgets.QWidget(self.groupBox_8) self.layoutWidget_5.setGeometry(QtCore.QRect(10, 460, 211, 37)) self.layoutWidget_5.setObjectName("layoutWidget_5") self.horizontalLayout_17 = QtWidgets.QHBoxLayout(self.layoutWidget_5) self.horizontalLayout_17.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_17.setObjectName("horizontalLayout_17") self.label_17 = QtWidgets.QLabel(self.layoutWidget_5) self.label_17.setMinimumSize(QtCore.QSize(0, 35)) self.label_17.setMaximumSize(QtCore.QSize(80, 16777215)) self.label_17.setStyleSheet("QLabel\n" "{\n" " font-size: 18px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.label_17.setObjectName("label_17") self.horizontalLayout_17.addWidget(self.label_17) self.shebei = QtWidgets.QLineEdit(self.layoutWidget_5) self.shebei.setObjectName("shebei_2") self.horizontalLayout_17.addWidget(self.shebei) self.horizontalLayout_7.addWidget(self.groupBox_8) self.groupBox_201 = QtWidgets.QGroupBox(self.groupBox_18) self.groupBox_201.setStyleSheet("#groupBox_201{\n" "background-color: rgba(95, 95, 95, 200);\n" "border: 0px solid #42adff;\n" "border-left: 1px solid rgba(200, 200, 200,100);\n" "border-right: 0px solid rgba(29, 83, 185, 255);\n" "border-radius:0px;}") self.groupBox_201.setTitle("") self.groupBox_201.setObjectName("groupBox_201") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_201) self.verticalLayout_4.setContentsMargins(-1, 0, -1, 0) self.verticalLayout_4.setObjectName("verticalLayout_4") self.groupBox_3 = QtWidgets.QGroupBox(self.groupBox_201) self.groupBox_3.setMinimumSize(QtCore.QSize(0, 42)) self.groupBox_3.setMaximumSize(QtCore.QSize(16777215, 42)) font = QtGui.QFont() font.setPointSize(1) font.setBold(True) font.setWeight(75) self.groupBox_3.setFont(font) self.groupBox_3.setStyleSheet("#groupBox_3{\n" "border: 0px solid #42adff;\n" "border-radius:0px;}") self.groupBox_3.setTitle("") self.groupBox_3.setObjectName("groupBox_3") self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.groupBox_3) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.label_6 = QtWidgets.QLabel(self.groupBox_3) font = QtGui.QFont() font.setFamily("Microsoft YaHei") font.setPointSize(-1) font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setStyleSheet("QLabel\n" "{\n" " font-size: 20px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}") self.label_6.setAlignment(QtCore.Qt.AlignCenter) self.label_6.setObjectName("label_6") self.horizontalLayout_3.addWidget(self.label_6) self.label_9 = QtWidgets.QLabel(self.groupBox_3) font = QtGui.QFont() font.setFamily("Microsoft YaHei") font.setPointSize(-1) font.setBold(True) font.setWeight(75) self.label_9.setFont(font) self.label_9.setStyleSheet("QLabel\n" "{\n" " font-size: 20px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: bold;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}") self.label_9.setAlignment(QtCore.Qt.AlignCenter) self.label_9.setObjectName("label_9") self.horizontalLayout_3.addWidget(self.label_9) self.verticalLayout_4.addWidget(self.groupBox_3) self.splitter = QtWidgets.QSplitter(self.groupBox_201) self.splitter.setEnabled(True) self.splitter.setStyleSheet("#splitter::handle{background: 1px solid rgba(200, 200, 200,100);}") self.splitter.setFrameShape(QtWidgets.QFrame.NoFrame) self.splitter.setLineWidth(10) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setHandleWidth(1) self.splitter.setObjectName("splitter") self.raw_video = Label_click_Mouse(self.splitter) self.raw_video.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.raw_video.sizePolicy().hasHeightForWidth()) self.raw_video.setSizePolicy(sizePolicy) self.raw_video.setMinimumSize(QtCore.QSize(200, 0)) font = QtGui.QFont() font.setFamily("微软雅黑") font.setPointSize(36) self.raw_video.setFont(font) self.raw_video.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor)) self.raw_video.setStyleSheet("color: rgb(218, 218, 218);\n" "") self.raw_video.setText("") self.raw_video.setScaledContents(False) self.raw_video.setAlignment(QtCore.Qt.AlignCenter) self.raw_video.setObjectName("raw_video") self.out_video = Label_click_Mouse(self.splitter) self.out_video.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Ignored) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.out_video.sizePolicy().hasHeightForWidth()) self.out_video.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("微软雅黑") font.setPointSize(36) self.out_video.setFont(font) self.out_video.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor)) self.out_video.setStyleSheet("color: rgb(218, 218, 218);\n" "") self.out_video.setText("") self.out_video.setScaledContents(False) self.out_video.setAlignment(QtCore.Qt.AlignCenter) self.out_video.setObjectName("out_video") self.verticalLayout_4.addWidget(self.splitter) self.horizontalLayout_12 = QtWidgets.QHBoxLayout() self.horizontalLayout_12.setContentsMargins(-1, -1, 0, -1) self.horizontalLayout_12.setObjectName("horizontalLayout_12") self.action = QtWidgets.QPushButton(self.groupBox_201) self.action.setMinimumSize(QtCore.QSize(55, 28)) self.action.setMaximumSize(QtCore.QSize(16777215, 28)) self.action.setStyleSheet("QPushButton{font-family: \"Microsoft YaHei\";\n" "font-size: 16px;\n" "font-weight: bold;\n" "color:white;\n" "text-align: center center;\n" "padding-left: 5px;\n" "padding-right: 5px;\n" "padding-top: 4px;\n" "padding-bottom: 4px;\n" "border-style: solid;\n" "border-width: 0px;\n" "border-color: rgba(255, 255, 255, 255);\n" "border-radius: 3px;\n" "background-color: rgba(200, 200, 200,0);}\n" "\n" "QPushButton:focus{outline: none;}\n" "\n" "QPushButton::pressed{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "\n" "QPushButton::disabled{font-family: \"Microsoft YaHei\";\n" " font-size: 14px;\n" " font-weight: bold;\n" " color:rgb(200,200,200);\n" " text-align: center center;\n" " padding-left: 5px;\n" " padding-right: 5px;\n" " padding-top: 4px;\n" " padding-bottom: 4px;\n" " border-style: solid;\n" " border-width: 0px;\n" " border-color: rgba(255, 255, 255, 255);\n" " border-radius: 3px;\n" " background-color: #bf513b;}\n" "QPushButton::hover {\n" "border-style: solid;\n" "border-width: 0px;\n" "border-radius: 0px;\n" "background-color: rgba(48,148,243,80);}") icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/img/icon/运行.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action.setIcon(icon4) self.action.setObjectName("action") self.horizontalLayout_12.addWidget(self.action) self.pre_page = QtWidgets.QPushButton(self.groupBox_201) self.pre_page.setObjectName("pre_page") self.horizontalLayout_12.addWidget(self.pre_page) self.next_page = QtWidgets.QPushButton(self.groupBox_201) self.next_page.setObjectName("next_page") self.horizontalLayout_12.addWidget(self.next_page) self.show_result = QtWidgets.QPushButton(self.groupBox_201) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/img/icon/数据探索.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.show_result.setIcon(icon5) self.show_result.setObjectName("show_result") self.horizontalLayout_12.addWidget(self.show_result) self.error_correction = QtWidgets.QPushButton(self.groupBox_201) self.error_correction.setObjectName("error_correction") self.horizontalLayout_12.addWidget(self.error_correction) self.result_export = QtWidgets.QPushButton(self.groupBox_201) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/img/icon/打开.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.result_export.setIcon(icon6) self.result_export.setObjectName("result_export") self.horizontalLayout_12.addWidget(self.result_export) self.verticalLayout_4.addLayout(self.horizontalLayout_12) self.horizontalLayout_7.addWidget(self.groupBox_201) self.verticalLayout_6.addLayout(self.horizontalLayout_7) self.groupBox_4 = QtWidgets.QGroupBox(self.groupBox_18) self.groupBox_4.setMinimumSize(QtCore.QSize(0, 30)) self.groupBox_4.setMaximumSize(QtCore.QSize(16777215, 30)) self.groupBox_4.setStyleSheet("#groupBox_4{\n" "background-color: rgba(75, 75, 75, 200);\n" "border: 0px solid #42adff;\n" "border-left: 0px solid rgba(29, 83, 185, 255);\n" "border-right: 0px solid rgba(29, 83, 185, 255);\n" "border-top: 1px solid rgba(200, 200, 200,100);\n" "border-radius:0px;}") self.groupBox_4.setTitle("") self.groupBox_4.setObjectName("groupBox_4") self.horizontalLayout_10 = QtWidgets.QHBoxLayout(self.groupBox_4) self.horizontalLayout_10.setContentsMargins(-1, 0, -1, 0) self.horizontalLayout_10.setSpacing(0) self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.statistic_label = QtWidgets.QLabel(self.groupBox_4) self.statistic_label.setMouseTracking(False) self.statistic_label.setStyleSheet("QLabel\n" "{\n" " font-size: 16px;\n" " font-family: \"Microsoft YaHei\";\n" " font-weight: light;\n" " border-radius:9px;\n" " background:rgba(66, 195, 255, 0);\n" "color: rgb(218, 218, 218);\n" "}\n" "") self.statistic_label.setText("") self.statistic_label.setObjectName("statistic_label") self.horizontalLayout_10.addWidget(self.statistic_label) self.verticalLayout_6.addWidget(self.groupBox_4) self.verticalLayout_2.addWidget(self.groupBox_18) mainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(mainWindow) QtCore.QMetaObject.connectSlotsByName(mainWindow) def retranslateUi(self, mainWindow): _translate = QtCore.QCoreApplication.translate mainWindow.setWindowTitle(_translate("mainWindow", "图像目标智能识别软件")) self.label_4.setText(_translate("mainWindow", "图像目标智能识别软件")) self.label_8.setText(_translate("mainWindow", "数据集:")) self.label_12.setText(_translate("mainWindow", "目标种类:")) self.detectbutton.setToolTip(_translate("mainWindow", "相机")) self.detectbutton.setText(_translate("mainWindow", "识别")) self.trainbutton.setToolTip(_translate("mainWindow", "文件")) self.trainbutton.setText(_translate("mainWindow", "训练")) self.trainbutton_2.setToolTip(_translate("mainWindow", "文件")) self.trainbutton_2.setText(_translate("mainWindow", "特征提取")) self.label_11.setText(_translate("mainWindow", "图片列表")) self.choose_file.setText(_translate("mainWindow", "选择图像")) self.choose_folder.setText(_translate("mainWindow", "选择图像文件夹")) self.label_3.setText(_translate("mainWindow", "模型选择")) self.comboBox.setItemText(0, _translate("mainWindow", "yolov5s.pt")) self.comboBox.setItemText(1, _translate("mainWindow", "yolov5m.pt")) self.comboBox.setItemText(2, _translate("mainWindow", "yolov5l.pt")) self.comboBox.setItemText(3, _translate("mainWindow", "yolov5x.pt")) self.label_5.setText(_translate("mainWindow", "模式选择")) self.label_10.setText(_translate("mainWindow", "数据选择")) self.label_17.setText(_translate("mainWindow", "雷达模式:")) self.label_6.setText(_translate("mainWindow", "原图像")) self.label_9.setText(_translate("mainWindow", "检测结果")) self.action.setToolTip(_translate("mainWindow", "文件")) self.action.setText(_translate("mainWindow", "开始")) self.pre_page.setText(_translate("mainWindow", "上一张")) self.next_page.setText(_translate("mainWindow", "下一张")) self.show_result.setText(_translate("mainWindow", "显示结果")) self.error_correction.setText(_translate("mainWindow", "纠错")) self.result_export.setText(_translate("mainWindow", "结果导出"))