Compare commits
	
		
			2 Commits
		
	
	
		
			8ace9df86a
			...
			74821bb02c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 74821bb02c | |||
| 88a80c225c | 
							
								
								
									
										4
									
								
								.idea/License_plate_recognition.iml
									
									
									
										generated
									
									
									
								
							
							
						
						@@ -5,8 +5,4 @@
 | 
				
			|||||||
    <orderEntry type="jdk" jdkName="cnm" jdkType="Python SDK" />
 | 
					    <orderEntry type="jdk" jdkName="cnm" jdkType="Python SDK" />
 | 
				
			||||||
    <orderEntry type="sourceFolder" forTests="false" />
 | 
					    <orderEntry type="sourceFolder" forTests="false" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
  <component name="PyDocumentationSettings">
 | 
					 | 
				
			||||||
    <option name="format" value="PLAIN" />
 | 
					 | 
				
			||||||
    <option name="myDocStringFormat" value="Plain" />
 | 
					 | 
				
			||||||
  </component>
 | 
					 | 
				
			||||||
</module>
 | 
					</module>
 | 
				
			||||||
| 
		 Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB  | 
| 
		 Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB  | 
| 
		 Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB  | 
| 
		 Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB  | 
| 
		 Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB  | 
@@ -333,8 +333,12 @@ def LPRNmodel_predict(image_array):
 | 
				
			|||||||
    
 | 
					    
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        # 使用OpenCV调整图像大小到模型要求的尺寸
 | 
					        # 使用OpenCV调整图像大小到模型要求的尺寸
 | 
				
			||||||
        image_array = cv2.resize(image_array, (128, 48))
 | 
					        image_array = cv2.resize(image_array, (94, 24))
 | 
				
			||||||
        print(f"666999图片尺寸: {image_array.shape}")
 | 
					        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)
 | 
					        predicted_text, confidence = lpr_model.predict(image_array)
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								lightCRNN_part/best_model.pth
									
									
									
									
									
										Normal file
									
								
							
							
						
						
							
								
								
									
										4
									
								
								main.py
									
									
									
									
									
								
							
							
						
						@@ -761,7 +761,7 @@ class MainWindow(QMainWindow):
 | 
				
			|||||||
             if self.current_recognition_method == "CRNN":
 | 
					             if self.current_recognition_method == "CRNN":
 | 
				
			||||||
                 from CRNN_part.crnn_interface import LPRNmodel_predict
 | 
					                 from CRNN_part.crnn_interface import LPRNmodel_predict
 | 
				
			||||||
             elif self.current_recognition_method == "LPRNET":
 | 
					             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":
 | 
					             elif self.current_recognition_method == "OCR":
 | 
				
			||||||
                 from OCR_part.ocr_interface import LPRNmodel_predict
 | 
					                 from OCR_part.ocr_interface import LPRNmodel_predict
 | 
				
			||||||
             
 | 
					             
 | 
				
			||||||
@@ -799,7 +799,7 @@ class MainWindow(QMainWindow):
 | 
				
			|||||||
             from CRNN_part.crnn_interface import LPRNinitialize_model
 | 
					             from CRNN_part.crnn_interface import LPRNinitialize_model
 | 
				
			||||||
             LPRNinitialize_model()
 | 
					             LPRNinitialize_model()
 | 
				
			||||||
         elif method == "LPRNET":
 | 
					         elif method == "LPRNET":
 | 
				
			||||||
             from LPRNET_part.lpr_interface import LPRNinitialize_model
 | 
					             from lightCRNN_part.lightcrnn_interface import LPRNinitialize_model
 | 
				
			||||||
             LPRNinitialize_model()
 | 
					             LPRNinitialize_model()
 | 
				
			||||||
         elif method == "OCR":
 | 
					         elif method == "OCR":
 | 
				
			||||||
             from OCR_part.ocr_interface import LPRNinitialize_model
 | 
					             from OCR_part.ocr_interface import LPRNinitialize_model
 | 
				
			||||||
 
 | 
				
			|||||||