Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
195
def
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_image
Method · 0.90
process_image_rgbX
Method · 0.90
process_image
Method · 0.90
Calls
no outgoing calls
Tested by
1
process_image
Method · 0.72