MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / NormalizeImage

Class NormalizeImage

ldm/modules/midas/midas/transforms.py:197–208  ·  view source on GitHub ↗

Normlize image by given mean and std.

Source from the content-addressed store, hash-verified

195
196
197class NormalizeImage(object):
198 """Normlize image by given mean and std.
199 """
200
201 def __init__(self, mean, std):
202 self.__mean = mean
203 self.__std = std
204
205 def __call__(self, sample):
206 sample["image"] = (sample["image"] - self.__mean) / self.__std
207
208 return sample
209
210
211class PrepareForNet(object):

Callers 2

load_midas_transformFunction · 0.90
load_modelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected