MCPcopy Create free account
hub / github.com/AgentMaker/PaddleQuickInference / normPRED

Function normPRED

examples/U2Net/PortraitGeneration/processor.py:7–13  ·  view source on GitHub ↗
(d)

Source from the content-addressed store, hash-verified

5__all__ = ['preprocess', 'postprocess']
6
7def normPRED(d):
8 ma = np.max(d)
9 mi = np.min(d)
10
11 dn = (d-mi)/(ma-mi)
12
13 return dn
14
15
16def preprocess(img_path):

Callers 1

postprocessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected