コード例 #1
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)
コード例 #2
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)
コード例 #3
0
 def __init__(self, num_classes):
     super(PointNet2Multiview2Msg, self).__init__()
     self.enet_fixed, self.enet_trainable, self.enet_classifier = create_enet_for_3d(
         41, './scannetv2_enet.pth', 21)
     self.sa1_geo = PointNetSetAbstractionMsg(1024, [0.05, 0.1], [16, 32],
                                              0,
                                              [[16, 16, 32], [32, 32, 64]])
     self.sa2_geo = PointNetSetAbstractionMsg(
         256, [0.1, 0.2], [16, 32], 96, [[64, 64, 128], [64, 96, 128]])
     self.sa1_feat = PointNetSetAbstractionMsg(1024, [0.05, 0.1], [16, 32],
                                               128,
                                               [[16, 16, 32], [32, 32, 64]])
     self.sa2_feat = PointNetSetAbstractionMsg(
         256, [0.1, 0.2], [16, 32], 96, [[64, 64, 128], [64, 96, 128]])
     self.sa3 = PointNetSetAbstractionMsg(
         64, [0.2, 0.4], [16, 32], 512, [[128, 196, 256], [128, 196, 256]])
     self.sa4 = PointNetSetAbstractionMsg(
         16, [0.4, 0.8], [16, 32], 512, [[256, 256, 512], [256, 384, 512]])
     self.fp4 = PointNetFeaturePropagation(1536, [512, 512])
     self.fp3 = PointNetFeaturePropagation(1024, [512, 512])
     self.fp2 = PointNetFeaturePropagation(608, [256, 256])
     self.fp1 = PointNetFeaturePropagation(256, [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)