MCPcopy Index your code
hub / github.com/InternRobotics/EmbodiedScan / cat

Method cat

embodiedscan/structures/points/base_points.py:404–423  ·  view source on GitHub ↗

Concatenate a list of Points into a single Points. Args: points_list (Sequence[:obj:`BasePoints`]): List of points. Returns: :obj:`BasePoints`: The concatenated points.

(cls, points_list: Sequence['BasePoints'])

Source from the content-addressed store, hash-verified

402
403 @classmethod
404 def cat(cls, points_list: Sequence['BasePoints']) -> 'BasePoints':
405 """Concatenate a list of Points into a single Points.
406
407 Args:
408 points_list (Sequence[:obj:`BasePoints`]): List of points.
409
410 Returns:
411 :obj:`BasePoints`: The concatenated points.
412 """
413 assert isinstance(points_list, (list, tuple))
414 if len(points_list) == 0:
415 return cls(torch.empty(0))
416 assert all(isinstance(points, cls) for points in points_list)
417
418 # use torch.cat (v.s. layers.cat)
419 # so the returned points never share storage with input
420 cat_points = cls(torch.cat([p.tensor for p in points_list], dim=0),
421 points_dim=points_list[0].points_dim,
422 attribute_dims=points_list[0].attribute_dims)
423 return cat_points
424
425 def numpy(self) -> np.ndarray:
426 """Reload ``numpy`` from self.tensor."""

Callers 15

__init__Method · 0.45
__getitem__Method · 0.45
bbox3d2roiFunction · 0.45
heightMethod · 0.45
colorMethod · 0.45
transformMethod · 0.45
transformMethod · 0.45
convert_to_batchMethod · 0.45
_bbox_pred_to_bboxMethod · 0.45
loss_by_feat_singleMethod · 0.45
ortho_6d_2_MatFunction · 0.45
_forward_singleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected