MCPcopy Create free account
hub / github.com/csuhan/OneLLM / pc_norm

Function pc_norm

data/data_utils.py:52–63  ·  view source on GitHub ↗

pc: NxC, return NxC

(pc)

Source from the content-addressed store, hash-verified

50
51
52def pc_norm(pc):
53 """ pc: NxC, return NxC """
54 xyz = pc[:, :3]
55 other_feature = pc[:, 3:]
56
57 centroid = torch.mean(xyz, dim=0)
58 xyz = xyz - centroid
59 m = torch.max(torch.sqrt(torch.sum(xyz ** 2, dim=1)))
60 xyz = xyz / m
61
62 pc = torch.cat((xyz, other_feature), dim=1)
63 return pc
64
65
66def make_audio_features(wav_name, mel_bins=128, target_length=1024, aug=False):

Callers 2

__getitem__Method · 0.90
load_pointMethod · 0.85

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected