MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / __init__

Method __init__

dzoedepth/data/diode.py:83–93  ·  view source on GitHub ↗
(self, data_dir_root)

Source from the content-addressed store, hash-verified

81
82class DIODE(Dataset):
83 def __init__(self, data_dir_root):
84 import glob
85
86 # image paths are of the form <data_dir_root>/scene_#/scan_#/*.png
87 self.image_files = glob.glob(
88 os.path.join(data_dir_root, '*', '*', '*.png'))
89 self.depth_files = [r.replace(".png", "_depth.npy")
90 for r in self.image_files]
91 self.depth_mask_files = [
92 r.replace(".png", "_depth_mask.npy") for r in self.image_files]
93 self.transform = ToTensor()
94
95 def __getitem__(self, idx):
96 image_path = self.image_files[idx]

Callers

nothing calls this directly

Calls 1

ToTensorClass · 0.70

Tested by

no test coverage detected