MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / segm_transform

Method segm_transform

dataset.py:60–63  ·  view source on GitHub ↗
(self, segm)

Source from the content-addressed store, hash-verified

58 return img
59
60 def segm_transform(self, segm):
61 # to tensor, -1 to 149
62 segm = torch.from_numpy(np.array(segm)).long() - 1
63 return segm
64
65 # Round x to the nearest multiple of p and x' >= x
66 def round2nearest_multiple(self, x, p):

Callers 2

__getitem__Method · 0.80
__getitem__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected