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

图片尺寸、字符类别、最大字符数都需要改,应该怎么用? #79

Open nistarlwc opened 1 year ago

nistarlwc commented 1 year ago

图片尺寸需要改成,256 * 32 共有37种字符,英文+数字+额外一种符号 字符在10~20个,lpr_max_len = 20

想知道该怎么该这个网络才能用

nistarlwc commented 1 year ago

Traceback (most recent call last): File "F:/OCR/LPRNet_Pytorch/train_LPRNet.py", line 269, in train() File "F:/OCR/LPRNet_Pytorch/train_LPRNet.py", line 180, in train logits = lprnet(images) File "D:\anaconda3_win\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "F:\OCR\LPRNet_Pytorch\model\LPRNet.py", line 76, in forward x = torch.cat(global_context, 1) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 6 but got size 5 for tensor number 1 in the list.