Valfride / lpr-rsr-ext

Official code for 'Super-Resolution of License Plate Images Using Attention Modules and Sub-Pixel Convolution Layers' (Computers & Graphics 2023)
https://doi.org/10.1016/j.cag.2023.05.005
25 stars 4 forks source link

CUDA out of memory #3

Open 112000533 opened 2 months ago

112000533 commented 2 months ago

I used V100-32GB to test the lpr-rsr-ext. But it can not train and CUDA out of memory. LJB4$XX1IL}UF@J N@E%4FC According to the paper, the GPU memory must be 48GB? And there is another question, the OCR pre-train-models are hdf5, but in testing .pt file are required.

Valfride commented 2 months ago

Hello,

Based on the screenshot you provided, it seems that the memory error could be attributed to various factors. The most likely culprit is the batch size you're using. Could you please let me know what batch size you're currently using?

Additionally, it's worth noting that the OCR models were trained using Keras, hence the file extension is .hdf5. Could you kindly send me a screenshot where the models are being loaded?

Rest assured, I'll do my best to assist you in resolving the issues with the code. Thank you for bringing these observations to my attention.

112000533 commented 2 months ago

the batch size is 4 . 屏幕截图 2024-04-23 003900 The save folder is "Mymodels" and OCR pretrain model is PKU-SR. The IMG_LR = (48, 16), IMG_HR = (192, 64), self.aspect_ratio = 3.0 but sill didn't work.

Valfride commented 2 months ago

Could you run with batch size 1? Just to assure if the error persists due to memory allocation issues. Also, from the first screenshot, the OCR models are being loaded correctly, as the training function is being executed.