MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / __call__

Method __call__

datasets/transform_utils.py:109–122  ·  view source on GitHub ↗
(self, sample)

Source from the content-addressed store, hash-verified

107 return (new_width, new_height)
108
109 def __call__(self, sample):
110 width, height = self.get_size(sample["image"].shape[1], sample["image"].shape[0])
111
112 # resize sample
113 sample["image"] = cv2.resize(sample["image"], (width, height), interpolation=self.__image_interpolation_method)
114
115 if self.__resize_target:
116 if "depth" in sample:
117 sample["depth"] = cv2.resize(sample["depth"], (width, height), interpolation=cv2.INTER_NEAREST)
118
119 if "mask" in sample:
120 sample["mask"] = cv2.resize(sample["mask"].astype(np.float32), (width, height), interpolation=cv2.INTER_NEAREST)
121
122 return sample
123
124
125class NormalizeImage(object):

Callers

nothing calls this directly

Calls 1

get_sizeMethod · 0.95

Tested by

no test coverage detected