NJU-Jet / SR_Mobile_Quantization

Winner solution of mobile AI (CVPRW 2021).
148 stars 41 forks source link

How to genereate the pt file which required by DIV2K_train.txt? #17

Closed leiwen83 closed 2 years ago

leiwen83 commented 2 years ago

Hi,

For training process, it require, the pt format, while the original DIV2k is in png format. Is there some script which could be used to convert?

Thanks,

NJU-Jet commented 2 years ago

import imageio import pickle

with open('0.pt', 'wb') as f: pickle.dump(imageio.imread('0.png'), f)

leiwen83 commented 2 years ago

Got it.