xuexingyu24 / License_Plate_Detection_Pytorch

A two stage lightweight and high performance license plate recognition in MTCNN and LPRNet
Other
641 stars 171 forks source link

在运行get_Onet_train_data.py遇到了问题。 #43

Open littleloverlalala opened 1 year ago

littleloverlalala commented 1 year ago

Traceback (most recent call last): File "D:\火狐下载\License_Plate_Detection_Pytorch-master\License_Plate_Detection_Pytorch-master\mtcnn\preprocessing\get_Onet_train_data.py", line 61, in bboxes = create_mtcnn_net(image, 50, device, p_model_path=None, r_model_path=None,o_model_path='../weights/onet_Weights') TypeError: create_mtcnn_net() got an unexpected keyword argument 'r_model_path'

_当我把这个r_model_path删了之后,又会报出:

Traceback (most recent call last): File "D:\火狐下载\License_Plate_Detection_Pytorch-master\License_Plate_Detection_Pytorch-master\mtcnn\preprocessing\get_Onet_train_data.py", line 61, in bboxes = create_mtcnn_net(image, 50, device, p_model_path=None,o_model_path='../weights/onet_Weights') File "D:\火狐下载\License_Plate_Detection_Pytorch-master\License_Plate_Detection_Pytorch-master\mtcnn\MTCNN.py", line 28, in create_mtcnn_net bboxes = detect_onet(onet, image, bboxes, device) File "D:\火狐下载\License_Plate_Detection_Pytorch-master\License_Plate_Detection_Pytorch-master\mtcnn\MTCNN.py", line 123, in detect_onet [dy, edy, dx, edx, y, ey, x, ex, w, h] = correct_bboxes(bboxes, width, height) File "D:\火狐下载\License_Plate_Detection_Pytorch-master\License_Plate_Detection_Pytorch-master\mtcnn\preprocessing..\util\util.py", line 138, in correct_bboxes x1, y1, x2, y2 = [bboxes[:, i] for i in range(4)] File "D:\火狐下载\License_Plate_Detection_Pytorch-master\License_Plate_Detection_Pytorch-master\mtcnn\preprocessing..\util\util.py", line 138, in x1, y1, x2, y2 = [bboxes[:, i] for i in range(4)] IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

请问该怎么解决呢?