diff --git a/.idea/License_plate_recognition.iml b/.idea/License_plate_recognition.iml index fb56de3..8169cd0 100644 --- a/.idea/License_plate_recognition.iml +++ b/.idea/License_plate_recognition.iml @@ -5,8 +5,4 @@ - - \ No newline at end of file diff --git a/LPRNET_part/ets/1.jpg b/LPRNET_part/1.jpg similarity index 100% rename from LPRNET_part/ets/1.jpg rename to LPRNET_part/1.jpg diff --git a/LPRNET_part/ets/2.jpg b/LPRNET_part/2.jpg similarity index 100% rename from LPRNET_part/ets/2.jpg rename to LPRNET_part/2.jpg diff --git a/LPRNET_part/ets/6ce2ec7dbed6cf3c8403abe2683c57e5.jpg b/LPRNET_part/6ce2ec7dbed6cf3c8403abe2683c57e5.jpg similarity index 100% rename from LPRNET_part/ets/6ce2ec7dbed6cf3c8403abe2683c57e5.jpg rename to LPRNET_part/6ce2ec7dbed6cf3c8403abe2683c57e5.jpg diff --git a/LPRNET_part/LPRNet__iteration_74000.pth b/LPRNET_part/LPRNet__iteration_74000.pth index 6189faa..037122c 100644 Binary files a/LPRNET_part/LPRNet__iteration_74000.pth and b/LPRNET_part/LPRNet__iteration_74000.pth differ diff --git a/LPRNET_part/ets/c11304d10bcd47911e458398d1ea445d.jpg b/LPRNET_part/c11304d10bcd47911e458398d1ea445d.jpg similarity index 100% rename from LPRNET_part/ets/c11304d10bcd47911e458398d1ea445d.jpg rename to LPRNET_part/c11304d10bcd47911e458398d1ea445d.jpg diff --git a/LPRNET_part/ets/c6ab0fbcfb2b6fbe15c5b3eb9806a28b.jpg b/LPRNET_part/c6ab0fbcfb2b6fbe15c5b3eb9806a28b.jpg similarity index 100% rename from LPRNET_part/ets/c6ab0fbcfb2b6fbe15c5b3eb9806a28b.jpg rename to LPRNET_part/c6ab0fbcfb2b6fbe15c5b3eb9806a28b.jpg diff --git a/LPRNET_part/lpr_interface.py b/LPRNET_part/lpr_interface.py index f3f8692..0f87201 100644 --- a/LPRNET_part/lpr_interface.py +++ b/LPRNET_part/lpr_interface.py @@ -333,8 +333,12 @@ def LPRNmodel_predict(image_array): try: # 使用OpenCV调整图像大小到模型要求的尺寸 - image_array = cv2.resize(image_array, (128, 48)) + image_array = cv2.resize(image_array, (94, 24)) print(f"666999图片尺寸: {image_array.shape}") + + # 显示修正后的图像 + cv2.imshow('Resized License Plate Image (94x24)', image_array) + cv2.waitKey(1) # 非阻塞显示,允许程序继续执行 # 预测车牌号 predicted_text, confidence = lpr_model.predict(image_array) diff --git a/lightCRNN_part/best_model.pth b/lightCRNN_part/best_model.pth new file mode 100644 index 0000000..122cf25 Binary files /dev/null and b/lightCRNN_part/best_model.pth differ diff --git a/main.py b/main.py index 6d9b365..132ad5a 100644 --- a/main.py +++ b/main.py @@ -761,7 +761,7 @@ class MainWindow(QMainWindow): if self.current_recognition_method == "CRNN": from CRNN_part.crnn_interface import LPRNmodel_predict elif self.current_recognition_method == "LPRNET": - from LPRNET_part.lpr_interface import LPRNmodel_predict + from lightCRNN_part.lightcrnn_interface import LPRNmodel_predict elif self.current_recognition_method == "OCR": from OCR_part.ocr_interface import LPRNmodel_predict @@ -799,7 +799,7 @@ class MainWindow(QMainWindow): from CRNN_part.crnn_interface import LPRNinitialize_model LPRNinitialize_model() elif method == "LPRNET": - from LPRNET_part.lpr_interface import LPRNinitialize_model + from lightCRNN_part.lightcrnn_interface import LPRNinitialize_model LPRNinitialize_model() elif method == "OCR": from OCR_part.ocr_interface import LPRNinitialize_model