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

Method __init__

dzoedepth/data/ddad.py:83–90  ·  view source on GitHub ↗
(self, data_dir_root, resize_shape)

Source from the content-addressed store, hash-verified

81
82class DDAD(Dataset):
83 def __init__(self, data_dir_root, resize_shape):
84 import glob
85
86 # image paths are of the form <data_dir_root>/{outleft, depthmap}/*.png
87 self.image_files = glob.glob(os.path.join(data_dir_root, '*.png'))
88 self.depth_files = [r.replace("_rgb.png", "_depth.npy")
89 for r in self.image_files]
90 self.transform = ToTensor(resize_shape)
91
92 def __getitem__(self, idx):
93

Callers

nothing calls this directly

Calls 1

ToTensorClass · 0.70

Tested by

no test coverage detected