MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / pt2np

Method pt2np

ldm/data/util.py:11–13  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

9 self.transform = load_midas_transform(model_type)
10
11 def pt2np(self, x):
12 x = ((x + 1.0) * .5).detach().cpu().numpy()
13 return x
14
15 def np2pt(self, x):
16 x = torch.from_numpy(x) * 2 - 1.

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected