Closed andytoo952 closed 1 year ago
Hi, you can modify this imagenet_dataloader/save_random_images_hdr.py to obtain the .npz files.
Thanks for your help!
Hi, you can modify this imagenet_dataloader/save_random_images_hdr.py to obtain the .npz files.
I use the save_random_images_hdr.py script to make an npz file of an LR image. Is it possible? Because the code seems to only save one img and label? ~
imgs_high = []
labels = []
for i, (data, data2) in enumerate(zip(dataloader, dataloader2)):
x, y = data
x2, y2 = data2
print(x2.shape)
# imgs.append(x)
imgs_high.append(x2)
labels.append(y)
# imgs = torch.cat(imgs, dim=0)
imgs_high = torch.cat(imgs_high, dim=0)
labels = torch.cat(labels, dim=0)
file_name_high = ('hdr_100_long_resolution_%d' % image_size2)
......
file_name_high_1 = ('hdr_100_long_resolution_%d.npz' % image_size2)
np.savez(file_name_high_1, imgs_high, labels)
How can I perform testing on other datasets, such as the LOL dataset, and obtain the desired results? What should the corresponding npz format look like? Thank you for your assistance.