Merge pull request 'yolorestart' (#2) from yolopart_restart into main

Reviewed-on: #2
This commit is contained in:
spdis 2025-08-30 12:33:05 +08:00
commit 658560c34f

View File

@ -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):
"""摄像头线程类"""
@ -159,6 +162,10 @@ class MainWindow(QMainWindow):
self.init_ui()
self.init_detector()
self.init_camera()
# 初始化OCR/CRNN模型具体用哪个模块识别车牌号就写在这儿
initialize_ocr_model()
def init_ui(self):
"""初始化用户界面"""