sirius-ai / LPRNet_Pytorch

Pytorch Implementation For LPRNet, A High Performance And Lightweight License Plate Recognition Framework.
Apache License 2.0
908 stars 227 forks source link

修改--test_img_dirs后除了94x24大小的图片都会报错 #17

Open IamWilliamWang opened 4 years ago

IamWilliamWang commented 4 years ago

除了94x24大小的所有图片都会报这个错,出什么问题了?

Traceback (most recent call last):  File "test_LPRNet.py", line 176, in    test()  File "test_LPRNet.py", line 74, in test    Greedy_Decode_Eval(lprnet, test_dataset, args)  File "test_LPRNet.py", line 105, in Greedy_Decode_Eval    prebs = Net(images)  File "/home/wang/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call    result = self.forward(*input, **kwargs)  File "/home/wang/LPRNet_Pytorch/model/LPRNet.py", line 76, in forward    x = torch.cat(global_context, 1) RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 124 and 28 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:7

sirius-ai commented 4 years ago

LPRNet本来就是设计输入大小为94x24的,所以你修改了输入大小后当然会报错了!

feitianhouren commented 2 years ago

You can zoom image to "94*24" size.