Merge pull request 'yolorestart' (#2) from yolopart_restart into main
Reviewed-on: #2
This commit is contained in:
		
							
								
								
									
										9
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								main.py
									
									
									
									
									
								
							@@ -10,7 +10,10 @@ from PyQt5.QtGui import QImage, QPixmap, QFont, QPainter, QPen, QColor
 | 
			
		||||
import os
 | 
			
		||||
from yolopart.detector import LicensePlateYOLO
 | 
			
		||||
from OCR_part.ocr_interface import ocr_predict
 | 
			
		||||
#from CRNN_part.crnn_interface import crnn_predict(不使用CRNN)
 | 
			
		||||
from OCR_part.ocr_interface import initialize_ocr_model
 | 
			
		||||
#不使用CRNN所以注释掉
 | 
			
		||||
#from CRNN_part.crnn_interface import crnn_predict
 | 
			
		||||
#from CRNN_part.crnn_interface import initialize_crnn_model
 | 
			
		||||
 | 
			
		||||
class CameraThread(QThread):
 | 
			
		||||
    """摄像头线程类"""
 | 
			
		||||
@@ -160,6 +163,10 @@ class MainWindow(QMainWindow):
 | 
			
		||||
        self.init_detector()
 | 
			
		||||
        self.init_camera()
 | 
			
		||||
 | 
			
		||||
        # 初始化OCR/CRNN模型(具体用哪个模块识别车牌号就写在这儿)
 | 
			
		||||
        initialize_ocr_model()
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    def init_ui(self):
 | 
			
		||||
        """初始化用户界面"""
 | 
			
		||||
        self.setWindowTitle("车牌识别系统")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user