def __init__(self, num_classes): super(get_model, self).__init__() self.sa1 = PointNetSetAbstraction(1024, 0.1, 32, 9 + 3, [32, 32, 64], False) self.sa2 = PointNetSetAbstraction(256, 0.2, 32, 64 + 3, [64, 64, 128], False) self.sa3 = PointNetSetAbstraction(64, 0.4, 32, 128 + 3, [128, 128, 256], False) self.sa4 = PointNetSetAbstraction(16, 0.8, 32, 256 + 3, [256, 256, 512], False) self.fp4 = PointNetFeaturePropagation(768, [256, 256]) self.fp3 = PointNetFeaturePropagation(384, [256, 256]) self.fp2 = PointNetFeaturePropagation(320, [256, 128]) self.fp1 = PointNetFeaturePropagation(128, [128, 128, 128]) self.conv1 = nn.Conv1d(128, 128, 1) self.bn1 = nn.BatchNorm1d(128) self.drop1 = nn.Dropout(0.5) self.conv2 = nn.Conv1d(128, num_classes, 1)
def __init__(self, num_classes, normal_channel=False): super(get_model, self).__init__() if normal_channel: additional_channel = 3 else: additional_channel = 0 self.normal_channel = normal_channel self.sa1 = PointNetSetAbstractionMsg( 512, [0.1, 0.2, 0.4], [32, 64, 128], 3 + additional_channel, [[32, 32, 64], [64, 64, 128], [64, 96, 128]]) self.sa2 = PointNetSetAbstractionMsg( 128, [0.4, 0.8], [64, 128], 128 + 128 + 64, [[128, 128, 256], [128, 196, 256]]) self.sa3 = PointNetSetAbstraction(npoint=None, radius=None, nsample=None, in_channel=512 + 3, mlp=[256, 512, 1024], group_all=True) self.fp3 = PointNetFeaturePropagation(in_channel=1536, mlp=[256, 256]) self.fp2 = PointNetFeaturePropagation(in_channel=576, mlp=[256, 128]) self.fp1 = PointNetFeaturePropagation(in_channel=150 + additional_channel, mlp=[128, 128]) self.conv1 = nn.Conv1d(128, 128, 1) self.bn1 = nn.BatchNorm1d(128) self.drop1 = nn.Dropout(0.5) self.conv2 = nn.Conv1d(128, num_classes, 1)
def __init__(self, num_classes, normal_channel=False): super(get_model, self).__init__() if normal_channel: additional_channel = 3 else: additional_channel = 0 self.normal_channel = normal_channel self.sa1 = PointNetSetAbstraction(npoint=512, radius=0.2, nsample=32, in_channel=6+additional_channel, mlp=[64, 64, 128], group_all=False) self.sa2 = PointNetSetAbstraction(npoint=128, radius=0.4, nsample=64, in_channel=128 + 3, mlp=[128, 128, 256], group_all=False) self.sa3 = PointNetSetAbstraction(npoint=None, radius=None, nsample=None, in_channel=256 + 3, mlp=[256, 512, 1024], group_all=True) self.fp3 = PointNetFeaturePropagation(in_channel=1280, mlp=[256, 256]) self.fp2 = PointNetFeaturePropagation(in_channel=384, mlp=[256, 128]) self.fp1 = PointNetFeaturePropagation(in_channel=128+16+6+additional_channel, mlp=[128, 128, 128]) self.conv1 = nn.Conv1d(128, 128, 1) self.bn1 = nn.BatchNorm1d(128) self.drop1 = nn.Dropout(0.5) self.conv2 = nn.Conv1d(128, num_classes, 1)
def __init__(self): super(pointnet2_backbone, self).__init__() #self.sa1 = PointNetSetAbstractionMsg(1024, [0.05, 0.1], [16, 32], 9, [[16, 16, 32], [32, 32, 64]]) self.sa1 = PointNetSetAbstractionMsg(1024, [0.05, 0.1], [16, 32], 0, [[16, 16, 32], [32, 32, 64]]) self.sa2 = PointNetSetAbstractionMsg(256, [0.1, 0.2], [16, 32], 32+64, [[64, 64, 128], [64, 96, 128]]) self.sa3 = PointNetSetAbstractionMsg(64, [0.2, 0.4], [16, 32], 128+128, [[128, 196, 256], [128, 196, 256]]) #self.sa4 = PointNetSetAbstractionMsg(16, [0.4, 0.8], [16, 32], 256+256, [[256, 256, 512], [256, 384, 512]]) self.sa4 = PointNetSetAbstraction(None, None, None, 256+256+3, [256, 512, 512], True) self.fp4 = PointNetFeaturePropagation(512+512, [256, 256]) self.fp3 = PointNetFeaturePropagation(128+128+256, [256, 256]) self.fp2 = PointNetFeaturePropagation(32+64+256, [256, 128]) self.fp1 = PointNetFeaturePropagation(128, [128, 128, 128]) '''