MCPcopy Create free account
hub / github.com/ImprintLab/Medical-SAM2 / norm_ip

Function norm_ip

func_2d/utils.py:114–116  ·  view source on GitHub ↗
(img, low, high)

Source from the content-addressed store, hash-verified

112 "value_range has to be a tuple (min, max) if specified. min and max are numbers"
113
114 def norm_ip(img, low, high):
115 img.clamp(min=low, max=high)
116 img.sub_(low).div_(max(high - low, 1e-5))
117
118 def norm_range(t, value_range):
119 if value_range is not None:

Callers 1

norm_rangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected