Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Training #12

Open
fadi212 opened this issue Aug 21, 2019 · 8 comments
Open

Custom Training #12

fadi212 opened this issue Aug 21, 2019 · 8 comments

Comments

@fadi212
Copy link

fadi212 commented Aug 21, 2019

How can we train on custom data and can we train the same model on Number Plates with multiple lines like two or three

@sirius-ai
Copy link
Owner

  1. if it is not chinese license plate and license plate lenth equal to 8, you should delete check(label) funtcion in LPRDataLoader.getitem;
  2. you should modify the list of CHARS base on your license plate characters, and the filename of train/test images should be its label character;
  3. T_length should be bigger or equal than twice max license plate lenth;
  4. our model not support multiple lines at currenct, maybe you can merge multiple lines into one line.

@2017TJM
Copy link

2017TJM commented Dec 26, 2019

2 'targets' to have scalar type Int; but got torch.cuda.FloatTensor instead (while checking arguments for ctc_loss_gpu)

@sirius-ai
Copy link
Owner

@2017TJM please let me know how to reproduce this issue, thanks!

@gunjan5489
Copy link

Hi , im getting below error while train when i change T_length = 24, since my dataset include Indian License Plate , with single and double line license plate.

File "LPRNet_Train.py", line 94, in
loss = ctc_loss(log_probs, labels, input_lengths=input_lengths, target_lengths=target_lengths)
File "/home/arohi/Gunjan/Python Programming/venv/lib/python3.5/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/arohi/Gunjan/Python Programming/venv/lib/python3.5/site-packages/torch/nn/modules/loss.py", line 1295, in forward
self.zero_infinity)
File "/home/arohi/Gunjan/Python Programming/venv/lib/python3.5/site-packages/torch/nn/functional.py", line 1781, in ctc_loss
zero_infinity)
RuntimeError: Expected input_lengths to have value at most 18, but got value 24 (while checking arguments for ctc_loss_cpu)

MH02AS8015
MH02CB5249

@anhthoai
Copy link

Anybody to help with 2 lines and 1 line license plates?

@duorouputao
Copy link

Have u solved the problem?

@gunjan5489
Copy link

Have u solved the problem?

the author has not done nothing relating to this issue

@jeungmin717
Copy link

@sirius-ai
Thanks for such a great work!

what does T_length mean?
i am confused with args.lpr_max_len

if I change lpr_max_len
then output shape could change?

for now my output shape is [1,50,18] Korean Character 50 is class score nums.
I want to make longer sequence than 18? is it available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants