codeslake / DMENet

[CVPR 2019] Official TensorFlow Implementation for "Deep Defocus Map Estimation using Domain Adaptation"
GNU Affero General Public License v3.0
122 stars 24 forks source link

test dataset #21

Closed ByChelsea closed 2 years ago

ByChelsea commented 2 years ago

Hi, Thanks for your great work. Image names in the test dataset (SYNDOF) do not correspond and I don't know how to read these images... The names in the "gt" file are "0000.png, 0001.png ...", but in the "image" file, they are "SYNTHIA_RAND_CITYSCAPES_image_0000017_f_85_fp_0_17_A_9_3.png, ..."

codeslake commented 2 years ago

Hi, You may obtain the file names of each folder first, and sort each of them, then read each image from the sorted lists.

ByChelsea commented 2 years ago

Thank you! I'll try.

ByChelsea commented 2 years ago

By the way, the size of the images in the "gt" folder are "1280x752", but the sizes in the "image" folder are "1280x760". How should I deal with this?

codeslake commented 2 years ago

Apply a mod crop on images in the image folder:

def refine_image(img):
    h, w = img.shape[:2]

    return img[0 : h - h % 16, 0 : w - w % 16]
ByChelsea commented 2 years ago

Thanks again and have a nice day~