Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What the difference between the parameter 'split' in the function of 'get_featrue'? #14

Open
limaodaxia opened this issue Mar 4, 2024 · 0 comments

Comments

@limaodaxia
Copy link

def get_feature(self, points_all, points_idx, data_id, split='test'):
    
    total_feature = None
    total_rgb_feature_indices = []
    
    for patch in range(len(points_all)):
        points = points_all[patch].reshape(-1, self.POINT_NUM, 3)
        indices = points_idx[patch].reshape(self.POINT_NUM)

        # compute the correspoding location of rgb features
        rgb_f_indices = get_relative_rgb_f_indices(indices, self.image_size, 28)
        # extract sdf features
        feature = self.sdf_model.get_feature(points.to(self.device))
        
        if patch == 0:
            total_feature = feature
        else:
            total_feature = torch.cat((total_feature, feature), 0)
            
        if split == 'test':
            total_rgb_feature_indices.append(rgb_f_indices)
        elif split == 'train':
            total_rgb_feature_indices.append(data_id * 784 + rgb_f_indices)
        else:
            return KeyError
        
    return total_feature, total_rgb_feature_indices

What the difference between the parameter 'split' in the function of 'get_featrue'?
Why in the split of 'train' the total_rgb_feature_indices is added data_id * 784 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant