kwon-evan / deep-text-recognition-benchmark

OCR(especially License Plate Recognition) deep learing model written with pytorch-lightning
Apache License 2.0
2 stars 1 forks source link

Format naming photo #5

Closed sh1man999 closed 1 year ago

sh1man999 commented 1 year ago

Hello, please tell me what to name the photo for training, what format is it? What does it mean in the file name. Example CI0882LLE-3-1.jpg Why is this "-3-1"? Why lmdb is not used here?

kwon-evan commented 1 year ago

Hello, @sh1man999. "-3-1" is for duplicate labels. the dataset will slice the first "-" in the filename and use it as the answer. and the data I have is not lmdb. it is just a bunch of images with their label in filename. so I didnt use lmdb.

sh1man commented 1 year ago

can you tell me how to implement it via lmdb? and why didn't you use lmdb

kwon-evan commented 1 year ago

you can replace RawDataset to LmdbDataset. i dont remember the details, but i think it was because i didnt want to install LMDB and convert the data to LMDB format.

kwon-evan commented 1 year ago

I forgot to mention the format of the dataset - I didn't use a public dataset. The data is a folder of images with labelled file names.

data/
 ├AA0000BB-0.jpg
 ├AA0000BB-1.jpg
 ├AA0000BB-2.jpg
  ...
sh1man commented 1 year ago

If I have license plates of different formats, rectangular and square, what imgH height should I use to train

kwon-evan commented 1 year ago

image size doesnt matter, it is automatically resized to (100, 32) during preprocessing in dataloader.

sh1man commented 1 year ago

what about square numbers? Do you need to resize (100,100) and add pad?

kwon-evan commented 1 year ago

LPRNet takes as input a torch.tensor of size (100, 32). I've never tried a square, so if you have a square image, I recommend cropping it to the size of a licence plate. If you can't crop it, padding is also work too