MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __call__

Method __call__

detrsmpl/data/datasets/pipelines/formatting.py:54–60  ·  view source on GitHub ↗
(self, results)

Source from the content-addressed store, hash-verified

52 self.keys = keys
53
54 def __call__(self, results):
55 for key in self.keys:
56 img = results[key]
57 if len(img.shape) < 3:
58 img = np.expand_dims(img, -1)
59 results[key] = to_tensor(img.transpose(2, 0, 1))
60 return results
61
62 def __repr__(self):
63 return self.__class__.__name__ + f'(keys={self.keys})'

Callers

nothing calls this directly

Calls 1

to_tensorFunction · 0.70

Tested by

no test coverage detected