Exemplo n.º 1
0
 def __init__(self):
     super(PointNet2ClsSsg, self).__init__()
     self.sa1 = PointNetSetAbstraction(npoint=512,
                                       radius=0.2,
                                       nsample=32,
                                       in_channel=3,
                                       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.fc1 = nn.Linear(1024, 512)
     self.bn1 = nn.BatchNorm1d(512)
     self.drop1 = nn.Dropout(0.4)
     self.fc2 = nn.Linear(512, 256)
     self.bn2 = nn.BatchNorm1d(256)
     self.drop2 = nn.Dropout(0.4)
     self.fc3 = nn.Linear(256, 40)
Exemplo n.º 2
0
 def __init__(self, num_classes):
     super(PointNet2PartSeg, self).__init__()
     self.sa1 = PointNetSetAbstraction(npoint=512,
                                       radius=0.2,
                                       nsample=64,
                                       in_channel=3,
                                       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,
                                           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, self).__init__()
     self.sa1 = PointNetSetAbstraction(4096, 1.0, 32, 2 + 3, [32, 32, 64], False)
     self.sa2 = PointNetSetAbstraction(1024, 2.0, 32, 64 + 3, [64, 64, 128], False)
     self.sa3 = PointNetSetAbstraction(256, 4.0, 32, 128 + 3, [128, 128, 256], False)
     self.sa4 = PointNetSetAbstraction(64, 8.0, 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])
    def __init__(self ):
        super(PointNetRefinePoint, self).__init__()
        self.sa1 = PointNetSetAbstraction(1024, 0.1, 64, 6 + 6, [64, 64], [4, 4] )
        self.sa2 = PointNetSetAbstraction(256, 0.2, 32, 64 + 6, [128, 128], [8, 8] )
        self.sa3 = PointNetSetAbstraction(64, 0.4, 32,  128 + 6, [256, 256], [16, 16] )
        self.sa4 = PointNetSetAbstraction(16, 0.8, 32, 256 + 6, [512, 512], [32, 32] )

        self.fp4 = PointNetFeaturePropagation(777, [512, 256], [32, 16] )
        self.fp3 = PointNetFeaturePropagation(393, [256, 128], [16, 8] )
        self.fp2 = PointNetFeaturePropagation(201, [128, 64], [8, 4] )
        self.fp1 = PointNetFeaturePropagation(79, [64], [4] )
        self.conv = nn.Conv1d(in_channels=64, out_channels=6, kernel_size=1 )
Exemplo n.º 5
0
 def __init__(self, num_classes):
     super(PointNet2SemSeg, self).__init__()
     self.sa1 = PointNetSetAbstraction(1024, 0.1, 32, 6 + 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)
Exemplo n.º 6
0
 def __init__(self, num_classes):
     super(PointNet2SemSeg, self).__init__()
     # npoint, radius, nsample, in_channel, mlp, group_all
     self.sa1 = PointNetSetAbstraction(1024, 0.1, 32, 6 + 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)  # in_channels, out_channels, kernel_size
     self.bn1 = nn.BatchNorm1d(128)
     self.drop1 = nn.Dropout(0.5)
     self.conv2 = nn.Conv1d(128, num_classes, 1)
Exemplo n.º 7
0
 def __init__(self, num_classes):
     super(PointNet2Multiview, self).__init__()
     self.enet_fixed, self.enet_trainable, self.enet_classifier = create_enet_for_3d(
         41, './scannetv2_enet.pth', 21)
     self.sa1 = PointNetSetAbstraction(1024, 0.1, 32, 128 + 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, 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)
Exemplo n.º 8
0
 def __init__(self, num_classes):
     super(PointNet2PartSeg_msg_one_hot, self).__init__()
     self.sa1 = PointNetSetAbstractionMsg(512, [0.1, 0.2, 0.4], [32, 64, 128], 0+3, [[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, 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)
Exemplo n.º 9
0
 def __init__(self):
     super(PointNet2ClsMsg, self).__init__()
     self.sa1 = PointNetSetAbstractionMsg(512, [0.1, 0.2, 0.4], [16, 32, 128], 0,
                                          [[32, 32, 64], [64, 64, 128], [64, 96, 128]])
     self.sa2 = PointNetSetAbstractionMsg(128, [0.2, 0.4, 0.8], [32, 64, 128], 320,
                                          [[64, 64, 128], [128, 128, 256], [128, 128, 256]])
     self.sa3 = PointNetSetAbstraction(None, None, None, 640 + 3, [256, 512, 1024], True)
     self.fc1 = nn.Linear(1024, 512)
     self.bn1 = nn.BatchNorm1d(512)
     self.drop1 = nn.Dropout(0.4)
     self.fc2 = nn.Linear(512, 256)
     self.bn2 = nn.BatchNorm1d(256)
     self.drop2 = nn.Dropout(0.4)
     self.fc3 = nn.Linear(256, 40)
 def __init__(self):
     super(RPN, self).__init__()
     self.pointnet2 = PointNet2()
     self.conv1 = nn.Conv1d(128, 128, 1)
     self.bn1 = nn.BatchNorm1d(128)
     self.conv2 = nn.Conv1d(128, 2, 1)        
     
     self.conv3 = nn.Conv1d(128, 128, 1)
     self.bn3 = nn.BatchNorm1d(128)
     self.conv4 = nn.Conv1d(128, 3+128, 1)
     
     self.vote_aggregation = PointNetSetAbstraction(128, 4.0, 32, 128+3, [128,128,128],False)
     self.conv5 = nn.Conv1d(128,128,1)
     self.bn5 = nn.BatchNorm1d(128)
     #self.conv6 = nn.Conv1d(128,128,1)
     #self.bn6 = nn.BatchNorm1d(128)
     self.conv_class = nn.Conv1d(128, 11, 1)
     self.conv_bsphere = nn.Conv1d(128, 4, 1)
     self.conv_whl = nn.Conv1d(128,3,1)
     self.conv_yaw = nn.Conv1d(128,1,1)
     self.conv_velocity = nn.Conv1d(128,2,1)