def __init__(self, Infea, mlp, dist, nsample, use_xyz=True, use_feature=True, npoint=280): super(PointNetModule, self).__init__() self.dist = dist self.nsample = nsample self.use_xyz = use_xyz self.npoint = npoint if Infea > 0: use_feature = True else: use_feature = False self.use_feature = use_feature self.query_depth_point = QueryDepthPoint(dist, npoint) if self.use_xyz: self.conv1 = Conv2d(Infea + 3, mlp[0], 1) else: self.conv1 = Conv2d(Infea, mlp[0], 1) self.conv2 = Conv2d(mlp[0], mlp[1], 1) self.conv3 = Conv2d(mlp[1], mlp[2], 1) init_params([self.conv1[0], self.conv2[0], self.conv3[0]], 'kaiming_normal') init_params([self.conv1[1], self.conv2[1], self.conv3[1]], 1)
def __init__(self, Infea, mlp, dist, nsample, use_xyz=True, use_feature=True, use_rgb=True): super(PointNetModule, self).__init__() self.dist = dist self.nsample = nsample self.use_xyz = use_xyz self.use_rgb = use_rgb self.use_feature = use_feature self.query_depth_point = QueryDepthPoint(dist, nsample) self.conv1 = Conv2d(3, mlp[0], 1) self.conv2 = Conv2d(mlp[0], mlp[1], 1) self.conv3 = Conv2d(mlp[1], mlp[2], 1) self.econv1 = Conv2d(3, mlp[0], 1) self.econv2 = Conv2d(mlp[0], mlp[1], 1) self.econv3 = Conv2d(mlp[1], mlp[2], 1) init_params([self.conv1[0], self.conv2[0], self.conv3[0]], 'kaiming_normal') ### init_params([self.conv1[1], self.conv2[1], self.conv3[1]], 1) ###