MCPcopy Create free account
hub / github.com/VCIP-RGBD/DFormer / normalize

Function normalize

utils/transforms.py:195–200  ·  view source on GitHub ↗
(img, mean, std)

Source from the content-addressed store, hash-verified

193
194
195def normalize(img, mean, std):
196 # pytorch pretrained model need the input range: 0-1
197 img = img.astype(np.float64) / 255.0
198 img = img - mean
199 img = img / std
200 return img

Callers 5

__call__Method · 0.90
__call__Method · 0.90
process_imageMethod · 0.90
process_image_rgbXMethod · 0.90
process_imageMethod · 0.90

Calls

no outgoing calls

Tested by 1

process_imageMethod · 0.72