MCPcopy
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / NormalizeImage

Class NormalizeImage

dmidas/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 4

load_modelFunction · 0.90
load_modelsMethod · 0.90
estimatedepthanythingFunction · 0.90
estimatemidasBoostFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected