MegaDepth icon indicating copy to clipboard operation
MegaDepth copied to clipboard

About the training code from the project page

Open Huang-Jin opened this issue 5 years ago • 4 comments

Thanks for your excellent work. Recently, I'm working with your training codes from the project page. I downloaded the total MegaDepth dataset and create the training and validation list. Now when I run the training code to read data, I found that the h5 file didn't contain the correct data.

From your training codes (image_folder.py), the hd5 file should contain keys like '/targets/gt_depth', '/targets/mask' and '/targets/sky_map'. However, I only find the key 'depth'. Is there anything I did wrong? Hope for your reply! The related codes are pasted below,

# read targets
    hdf5_file_read = h5py.File(targets_path, 'r')
    gt = hdf5_file_read.get('/targets/gt_depth')
    gt = np.transpose(gt, (1, 0))

    mask = hdf5_file_read.get('/targets/mask')
    mask = np.array(mask)
    mask = np.transpose(mask, (1, 0))

    sky_map = hdf5_file_read.get('/targets/sky_map')
    sky_map = np.array(sky_map)
    sky_map = np.transpose(sky_map, (1, 0))

    if prob > 0.5 and is_fliped:
        gt = np.fliplr(gt)
        mask = np.fliplr(mask)
        sky_map = np.fliplr(sky_map)

    color_rgb = np.ascontiguousarray(color_rgb)
    gt = np.ascontiguousarray(gt)
    mask = np.ascontiguousarray(mask)
    sky_map = np.ascontiguousarray(sky_map)

    hdf5_file_read.close()

Huang-Jin avatar Apr 01 '19 08:04 Huang-Jin

The only key I found in the h5 file. image

Huang-Jin avatar Apr 01 '19 08:04 Huang-Jin

@Huang-Jin .. are you able to train MegaDepth with the data (missing) from the homepage?

szahid86 avatar Jul 16 '19 07:07 szahid86

No, It is still unsolved.

Huang-Jin avatar Jul 16 '19 07:07 Huang-Jin

@Huang-Jin have you get the answer?

ansj11 avatar Dec 14 '19 06:12 ansj11