Pointcept / PointTransformerV2

[NeurIPS'22] An official PyTorch implementation of PTv2.
356 stars 25 forks source link

About the data augmentation on S3DIS #21

Closed linhaojia13 closed 1 year ago

linhaojia13 commented 1 year ago

Hi, @Gofinge. As shown in semseg-ptv2m2-0-base.py, it seems that you have conducted many ablation experiments about choice data augmentation. The RandomColorDrop is not in your final choices, which is different with the previous work KPConv. Have you tried using this technique ?

        transform=[
            dict(type="CenterShift", apply_z=True),
            # dict(type="RandomDropout", dropout_ratio=0.2, dropout_application_ratio=0.2),
            # dict(type="RandomRotateTargetAngle", angle=(1/2, 1, 3/2), center=[0, 0, 0], axis='z', p=0.75),
            # dict(type="RandomRotate", angle=[-1, 1], axis='z', center=[0, 0, 0], p=0.5),
            # dict(type="RandomRotate", angle=[-1 / 64, 1 / 64], axis='x', p=0.5),
            # dict(type="RandomRotate", angle=[-1 / 64, 1 / 64], axis='y', p=0.5),
            dict(type="RandomScale", scale=[0.9, 1.1]),
            # dict(type="RandomShift", shift=[0.2, 0.2, 0.2]),
            dict(type="RandomFlip", p=0.5),
            dict(type="RandomJitter", sigma=0.005, clip=0.02),
            # dict(type="ElasticDistortion", distortion_params=[[0.2, 0.4], [0.8, 1.6]]),
            dict(type="ChromaticAutoContrast", p=0.2, blend_factor=None),
            dict(type="ChromaticTranslation", p=0.95, ratio=0.05),
            dict(type="ChromaticJitter", p=0.95, std=0.05),
            # dict(type="HueSaturationTranslation", hue_max=0.2, saturation_max=0.2),
            # dict(type="RandomColorDrop", p=0.2, color_augment=0.0),
            dict(type="Voxelize", voxel_size=0.04, hash_type='fnv', mode='train',
                 keys=("coord", "color", "label"), return_discrete_coord=True),
            dict(type="SphereCrop", point_max=100000, mode='random'),
            dict(type="CenterShift", apply_z=False),
            dict(type="NormalizeColor"),
            # dict(type="ShufflePoint"),
            dict(type="ToTensor"),
            dict(type="Collect", keys=("coord", "discrete_coord", "label"), feat_keys=["coord", "color"])
        ]
Gofinge commented 1 year ago

Hi, actually, I did not carefully tune the parameter for S3DIS. I did not adopt it, maybe since there was no significant difference. I keep these commented augmentations for easier parameter tuning. (uncomment for enable)

linhaojia13 commented 1 year ago

Thank you for your reply!