def __init__(self, num_class, num_heading_bin, num_size_cluster, mean_size_arr, input_feature_dim=0, num_proposal=128, vote_factor=1, sampling='vote_fps', scale=1): super().__init__() self.num_class = num_class self.num_heading_bin = num_heading_bin self.num_size_cluster = num_size_cluster self.mean_size_arr = mean_size_arr assert(mean_size_arr.shape[0] == self.num_size_cluster) self.input_feature_dim = input_feature_dim self.num_proposal = num_proposal self.vote_factor = vote_factor self.sampling=sampling # Backbone point feature learning self.backbone_net = Pointnet2Backbone(input_feature_dim=self.input_feature_dim, SCALE=scale) # Hough voting if scale <= 2: self.vgen = VotingModule(self.vote_factor, 512) else: self.vgen = VotingModule(self.vote_factor, 256*scale) # Vote aggregation and detection if scale <= 2: self.pnet = ProposalModule(num_class, num_heading_bin, num_size_cluster, mean_size_arr, num_proposal, sampling, seed_feat_dim=512) else: self.pnet = ProposalModule(num_class, num_heading_bin, num_size_cluster, mean_size_arr, num_proposal, sampling, seed_feat_dim=256*scale)
def __init__(self, num_class, num_heading_bin, num_size_cluster, mean_size_arr, input_feature_dim=0, num_proposal=128, vote_factor=1, sampling='vote_fps'): super().__init__() self.num_class = num_class self.num_heading_bin = num_heading_bin self.num_size_cluster = num_size_cluster self.mean_size_arr = mean_size_arr assert (mean_size_arr.shape[0] == self.num_size_cluster) self.input_feature_dim = input_feature_dim self.num_proposal = num_proposal self.vote_factor = vote_factor self.sampling = sampling # Backbone point feature learning self.backbone_net = Pointnet2Backbone( input_feature_dim=self.input_feature_dim) # Box proposal, aggregation and detection self.pnet = ProposalModule(num_class, num_heading_bin, num_size_cluster, mean_size_arr, num_proposal, sampling)
def __init__(self, num_class, input_feature_dim=0, num_proposal=128, vote_factor=1, sampling='vote_fps'): super().__init__() self.num_class = num_class self.input_feature_dim = input_feature_dim self.num_proposal = num_proposal self.vote_factor = vote_factor self.sampling = sampling self.backbone_net = Pointnet2Backbone( input_feature_dim=self.input_feature_dim) self.vgen = VotingModule(self.vote_factor, 256) self.pnet = ProposalModule(num_class, num_proposal, sampling)
def __init__(self, num_class, num_heading_bin, num_size_cluster, mean_size_arr, input_feature_dim=0, num_proposal=128, vote_factor=1, sampling='vote_fps', backbone='pointnet2'): super().__init__() self.num_class = num_class self.num_heading_bin = num_heading_bin self.num_size_cluster = num_size_cluster self.mean_size_arr = mean_size_arr assert (mean_size_arr.shape[0] == self.num_size_cluster) self.input_feature_dim = input_feature_dim self.num_proposal = num_proposal self.vote_factor = vote_factor self.sampling = sampling self.backbone = backbone # Backbone point feature learning if backbone == 'pointnet2': self.backbone_net = Pointnet2Backbone( input_feature_dim=self.input_feature_dim) else: self.backbone_net = SparseConvBackbone( input_feature_dim=self.input_feature_dim + 3, output_feature_dim=256, num_seed=1024) # from pdb import set_trace; set_trace() # Hough voting self.vgen = VotingModule(self.vote_factor, 256) # Vote aggregation and detection self.pnet = ProposalModule(num_class, num_heading_bin, num_size_cluster, mean_size_arr, num_proposal, sampling)
def __init__(self, num_class, num_angle_bin, num_viewpoint, input_feature_dim=0, num_proposal=128, vote_factor=10, sampling='vote_fps'): super().__init__() self.num_class = num_class self.num_angle_bin = num_angle_bin self.num_viewpoint = num_viewpoint self.input_feature_dim = input_feature_dim self.num_proposal = num_proposal self.vote_factor = vote_factor self.sampling=sampling # Backbone point feature learning self.backbone_net = Pointnet2Backbone(input_feature_dim=self.input_feature_dim) # Hough voting self.vgen = VotingModule(self.vote_factor, 256) # Vote aggregation and detection self.pnet = ProposalModule(num_class, num_angle_bin, num_viewpoint, num_proposal, sampling)
def __init__(self, num_class, num_heading_bin, num_size_cluster, mean_size_arr, input_feature_dim=0, num_proposal=128, vote_factor=1, sampling='vote_fps', max_imvote_per_pixel=3, image_feature_dim=18, image_hidden_dim=256): super().__init__() self.num_class = num_class self.num_heading_bin = num_heading_bin self.num_size_cluster = num_size_cluster self.mean_size_arr = mean_size_arr assert (mean_size_arr.shape[0] == self.num_size_cluster) self.input_feature_dim = input_feature_dim self.num_proposal = num_proposal self.vote_factor = vote_factor self.sampling = sampling self.max_imvote_per_pixel = max_imvote_per_pixel self.image_feature_dim = image_feature_dim # Backbone point feature learning self.backbone_net = Pointnet2Backbone( input_feature_dim=self.input_feature_dim) # Image feature extractor self.image_feature_extractor = ImageFeatureModule( max_imvote_per_pixel=self.max_imvote_per_pixel) # MLP on image features before fusing with point features self.image_mlp = ImageMLPModule(image_feature_dim, image_hidden_dim=image_hidden_dim) # Hough voting modules self.img_only_vgen = VotingModule(self.vote_factor, image_hidden_dim) self.pc_only_vgen = VotingModule(self.vote_factor, 256) self.pc_img_vgen = VotingModule(self.vote_factor, image_hidden_dim + 256) # Vote aggregation and detection self.img_only_pnet = ProposalModule(num_class, num_heading_bin, num_size_cluster, mean_size_arr, num_proposal, sampling, seed_feat_dim=image_hidden_dim, key_prefix='img_only_') self.pc_only_pnet = ProposalModule(num_class, num_heading_bin, num_size_cluster, mean_size_arr, num_proposal, sampling, seed_feat_dim=256, key_prefix='pc_only_') self.pc_img_pnet = ProposalModule(num_class, num_heading_bin, num_size_cluster, mean_size_arr, num_proposal, sampling, seed_feat_dim=image_hidden_dim + 256, key_prefix='pc_img_')