MCPcopy Create free account
hub / github.com/baegwangbin/surface_normal_uncertainty / unnormalize

Function unnormalize

utils/utils.py:113–119  ·  view source on GitHub ↗
(img_in)

Source from the content-addressed store, hash-verified

111# unnormalize image
112__imagenet_stats = {'mean': [0.485, 0.456, 0.406], 'std': [0.229, 0.224, 0.225]}
113def unnormalize(img_in):
114 img_out = np.zeros(img_in.shape)
115 for ich in range(3):
116 img_out[:, :, ich] = img_in[:, :, ich] * __imagenet_stats['std'][ich]
117 img_out[:, :, ich] += __imagenet_stats['mean'][ich]
118 img_out = (img_out * 255).astype(np.uint8)
119 return img_out
120
121
122# kappa to exp error (only applicable to AngMF distribution)

Callers 1

visualizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected