def process(self): try: from optical_character_recognition import main res, precision = main.predict(self.file_name) self.res_label.setText(res) except: QMessageBox.information(self, '错误!找不到模型', "找不到训练好的模型!请先训练模型!", QMessageBox.Yes)
def process(self): try: from car_platte_recognition import main res, precision = main.predict(self.file_name) self.res_label.setText('%s\n准确度%f%%' % (res, precision)) except: QMessageBox.information(self, '错误!找不到模型', "找不到训练好的模型!请先训练模型!", QMessageBox.Yes)
def process(self): try: from face_recognition import main list_, disp_image = main.predict(self.file_name) str_ = '一共找到%d张脸\n' % len(list_) for i, l in enumerate(list_): str_ += '%d:%s 准确度7%f%%\n' % (i, l[0], l[1]) self.respic_label.setPixmap( QPixmap(disp_image).scaled(400, 300, Qt.KeepAspectRatioByExpanding)) self.res_label.setText(str_) except: QMessageBox.information(self, '错误!找不到模型', "找不到训练好的模型!请先训练模型!", QMessageBox.Yes)