mirror of
https://github.com/botastic/SoftGroup.git
synced 2025-10-16 11:45:42 +00:00
reverse xyz_middle and aug prob
This commit is contained in:
parent
d8665970f9
commit
4dcb1c5eb3
@ -85,7 +85,7 @@ class CustomDataset(Dataset):
|
|||||||
pt_offset_label = pt_mean - xyz
|
pt_offset_label = pt_mean - xyz
|
||||||
return instance_num, instance_pointnum, instance_cls, pt_offset_label
|
return instance_num, instance_pointnum, instance_cls, pt_offset_label
|
||||||
|
|
||||||
def dataAugment(self, xyz, jitter=False, flip=False, rot=False, prob=0.9):
|
def dataAugment(self, xyz, jitter=False, flip=False, rot=False, prob=1.0):
|
||||||
m = np.eye(3)
|
m = np.eye(3)
|
||||||
if jitter and np.random.rand() < prob:
|
if jitter and np.random.rand() < prob:
|
||||||
m += np.random.randn(3, 3) * 0.1
|
m += np.random.randn(3, 3) * 0.1
|
||||||
@ -128,14 +128,14 @@ class CustomDataset(Dataset):
|
|||||||
j += 1
|
j += 1
|
||||||
return instance_label
|
return instance_label
|
||||||
|
|
||||||
def transform_train(self, xyz, rgb, semantic_label, instance_label, aug_prob=0.9):
|
def transform_train(self, xyz, rgb, semantic_label, instance_label, aug_prob=1.0):
|
||||||
xyz_middle = self.dataAugment(xyz, True, True, True, aug_prob)
|
xyz_middle = self.dataAugment(xyz, True, True, True, aug_prob)
|
||||||
xyz = xyz_middle * self.voxel_cfg.scale
|
xyz = xyz_middle * self.voxel_cfg.scale
|
||||||
if np.random.rand() < aug_prob:
|
if np.random.rand() < aug_prob:
|
||||||
xyz = self.elastic(xyz, 6 * self.voxel_cfg.scale // 50, 40 * self.voxel_cfg.scale / 50)
|
xyz = self.elastic(xyz, 6 * self.voxel_cfg.scale // 50, 40 * self.voxel_cfg.scale / 50)
|
||||||
xyz = self.elastic(xyz, 20 * self.voxel_cfg.scale // 50,
|
xyz = self.elastic(xyz, 20 * self.voxel_cfg.scale // 50,
|
||||||
160 * self.voxel_cfg.scale / 50)
|
160 * self.voxel_cfg.scale / 50)
|
||||||
xyz_middle = xyz / self.voxel_cfg.scale
|
# xyz_middle = xyz / self.voxel_cfg.scale
|
||||||
xyz = xyz - xyz.min(0)
|
xyz = xyz - xyz.min(0)
|
||||||
max_tries = 5
|
max_tries = 5
|
||||||
while (max_tries > 0):
|
while (max_tries > 0):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user