def __init__(self, num_classes, input_channels=3): super().__init__() self.SA_modules = nn.ModuleList() self.SA_modules.append( PointnetSAModule( npoint=512, radius=0.2, nsample=64, mlp=[input_channels, 64, 64, 128] ) ) self.SA_modules.append( PointnetSAModule( npoint=128, radius=0.4, nsample=64, mlp=[128, 128, 128, 256] ) ) self.SA_modules.append(PointnetSAModule(mlp=[256, 256, 512, 1024])) self.FC_layer = nn.Sequential( pt_utils.FC(1024, 512, bn=True), nn.Dropout(p=0.5), pt_utils.FC(512, 256, bn=True), nn.Dropout(p=0.5), pt_utils.FC(256, num_classes, activation=None) )
def __init__(self, num_classes, input_channels=0, use_xyz=True): super().__init__() self.xyz = None self.SA_modules = nn.ModuleList() self.SA_modules.append( RSCNNSAModuleMSG( npoint=512, radii=[0.23], nsamples=[48], mlps=[[input_channels, 128]], first_layer=True, use_xyz=use_xyz, )) self.SA_modules.append( RSCNNSAModuleMSG( npoint=128, radii=[0.32], nsamples=[64], mlps=[[128, 512]], use_xyz=False, last_layer=True, )) self.SA_modules.append( # global pooling RSCNNSAModule(nsample=128, mlp=[512, 1024], use_xyz=False)) self.FC_layer = nn.Sequential( pt_utils.FC(1024, 512, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(512, 256, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(256, num_classes, activation=None))
def __init__(self, num_classes, input_channels=3): super().__init__() self.SA_modules = nn.ModuleList() self.SA_modules.append( PointnetSAModuleMSG(npoint=512, radii=[0.1, 0.2, 0.4], nsamples=[32, 64, 128], mlps=[[input_channels, 64], [input_channels, 128], [input_channels, 128]])) input_channels = 64 + 128 + 128 self.SA_modules.append( PointnetSAModuleMSG(npoint=128, radii=[0.2, 0.4, 0.8], nsamples=[16, 32, 64], mlps=[[input_channels, 128], [input_channels, 256], [input_channels, 256]])) self.SA_modules.append( PointnetSAModule(mlp=[128 + 256 + 256, 256, 512, 1024])) self.FC_layer = nn.Sequential( pt_utils.FC(1024, 512, bn=True), nn.Dropout(p=0.5), pt_utils.FC(512, 256, bn=True), nn.Dropout(p=0.5), pt_utils.FC(256, num_classes, activation=None))
def __init__(self, num_classes): super().__init__() self.SA_modules = nn.ModuleList() self.SA_modules.append( PointnetSAModuleMSG( npoint=512, radii=[0.2], nsamples=[32], mlps=[[6, 64, 64, 128]], use_xyz=True, first_layer=True, )) self.SA_modules.append( PointnetSAModuleMSG(npoint=128, radii=[0.4], nsamples=[64], mlps=[[128 + 9, 128, 128, 256]], use_xyz=False, last_layer=True)) self.SA_modules.append( # global pooling PointnetSAModule(nsample=128, mlp=[256, 256, 512, 1024], use_xyz=False)) self.FC_layer = nn.Sequential( pt_utils.FC(1024, 512, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(512, 256, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(256, num_classes, activation=None))
def __init__(self, num_classes, input_channels=0, relation_prior=1, use_xyz=True): super().__init__() self.SA_modules = nn.ModuleList() self.SA_modules.append( PointnetSAModuleMSG(npoint=512, e1s=[0.25], e2s=[0.15], e3s=[0.15], nsamples=[48], mlps=[[input_channels, 128]], first_layer=True, use_xyz=use_xyz, relation_prior=relation_prior)) self.SA_modules.append( PointnetSAModuleMSG(npoint=128, e1s=[0.50], e2s=[0.30], e3s=[0.30], nsamples=[64], mlps=[[128, 512]], use_xyz=use_xyz, relation_prior=relation_prior)) self.SA_modules.append( # global convolutional pooling PointnetSAModule(nsample=128, mlp=[512, 1024], use_xyz=use_xyz)) self.FC_layer = nn.Sequential( pt_utils.FC(1024, 512, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(512, 256, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(256, num_classes, activation=None))
def __init__(self, num_classes, input_channels=0, use_xyz=True): super().__init__() self.SA_modules = nn.ModuleList() # stage 1 begin self.SA_modules.append( PointnetSAModuleMSG( npoint=512, radii=[0.25], nsamples=[64], mlps=[[input_channels, 96]], use_xyz=use_xyz, pool=True ) ) # stage 1 end # stage 2 begin input_channels = 96 self.SA_modules.append( PointnetSAModuleMSG( npoint=128, radii=[0.32], nsamples=[64], mlps=[[input_channels, 93]], use_xyz=use_xyz, pool=True ) ) input_channels = 93 self.SA_modules.append( PointnetSAModuleMSG( npoint=128, radii=[0.39], nsamples=[16], mlps=[[input_channels, 96]], group_number=2, use_xyz=use_xyz, after_pool=True ) ) input_channels = 117 self.SA_modules.append( PointnetSAModuleMSG( npoint=128, radii=[0.39], nsamples=[16], mlps=[[input_channels, 96]], group_number=2, use_xyz=use_xyz ) ) input_channels = 141 self.SA_modules.append( PointnetSAModuleMSG( npoint=128, radii=[0.39], nsamples=[16], mlps=[[input_channels, 96]], group_number=2, use_xyz=use_xyz, before_pool=True ) ) # stage 2 end # global pooling input_channels = 165 self.SA_modules.append( PointnetSAModule( mlp=[input_channels, 512], use_xyz=use_xyz ) ) self.FC_layer = nn.Sequential( pt_utils.FC(512, 512, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(512, 256, activation=nn.ReLU(inplace=True), bn=True), nn.Dropout(p=0.5), pt_utils.FC(256, num_classes, activation=None) )