MCPcopy Index your code
hub / github.com/apple/ml-pointersect / cat

Method cat

pointersect/inference/structures.py:2213–2226  ·  view source on GitHub ↗
(rgbd_images: T.List['RGBDImage'], dim: int)

Source from the content-addressed store, hash-verified

2211
2212 @staticmethod
2213 def cat(rgbd_images: T.List['RGBDImage'], dim: int) -> 'RGBDImage':
2214 out = dict()
2215 for name in ['rgb', 'depth', 'normal_w', 'hit_map', 'feature']:
2216 arr = [getattr(r, name, None) for r in rgbd_images]
2217 if None in arr:
2218 out[name] = None
2219 else:
2220 out[name] = torch.cat(arr, dim=dim)
2221
2222 # concat camera
2223 cameras = [getattr(r, 'camera', None) for r in rgbd_images]
2224 assert None not in cameras
2225 out['camera'] = Camera.cat(cameras, dim=1)
2226 return RGBDImage(**out)
2227
2228 def get_pcd(
2229 self,

Callers

nothing calls this directly

Calls 2

RGBDImageClass · 0.85
catMethod · 0.45

Tested by

no test coverage detected