(pc)
| 7 | warnings.filterwarnings('ignore') |
| 8 | |
| 9 | def pc_normalize(pc): |
| 10 | centroid = np.mean(pc, axis=0) |
| 11 | pc = pc - centroid |
| 12 | m = np.max(np.sqrt(np.sum(pc ** 2, axis=1))) |
| 13 | pc = pc / m |
| 14 | return pc |
| 15 | |
| 16 | class PartNormalDataset(Dataset): |
| 17 | def __init__(self,root = './data/shapenetcore_partanno_segmentation_benchmark_v0_normal', npoints=2500, split='train', class_choice=None, normal_channel=False): |