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

你好,这个代码如果想加载S3DIS的数据集,改动大吗 #6

Open
SC-shendazt opened this issue Feb 6, 2023 · 6 comments

Comments

@SC-shendazt
Copy link

你好,这个代码如果想加载S3DIS的数据集,改动大吗

@charlesChen02
Copy link
Owner

如果需要加载一个新的数据集, 你首先需要修改一下预处理函数, 让他能够正常的进行sub sampling以及构建KBTree.

简单的说, 你需要修改一下逻辑使数据集中的point cloud和对应的label执行下面这段

sub_points, sub_labels = DP.grid_sub_sampling(points, labels=labels, grid_size=grid_size)
sub_points, sub_labels = points, labels
search_tree = KDTree(sub_points)
KDTree_save = join(KDTree_path_out, str(scan_id[:-4]) + '.pkl')
np.save(join(pc_path_out, scan_id)[:-4], sub_points)
np.save(join(label_path_out, scan_id)[:-4], sub_labels)

以及后续的存树逻辑

此外你可能需要创建一个新dataset class来满足对于数据集的目录框架的修改.
具体来说, 如果你想要基于现有class进行修改的话, 可以将

def __init__(self, mode, data_list=None, seq_list = ['00', '01', '02', '03', '04', '05', '06', '07', '09', '10'], ignore_labels = None):
self.name = 'SemanticKITTI'
self.dataset_path = 'data/SemanticKitti/sequences_0.06'
self.num_classes = cfg.num_classes
if ignore_labels is None:
self.ignored_labels = np.sort([0])
else:
self.ignored_labels = ignore_labels
self.mode = mode
if data_list is None:
if mode == 'validation':
seq_list = ['08']
self.data_list = DP.get_file_list(self.dataset_path, seq_list)
else:
self.data_list = data_list
self.data_list = sorted(self.data_list)

修改成满足S3DIS路径读取结构

整体来说我觉的改动不是很大, 主要是需要根据不同数据集的不同目录结构进行改动

如果您还有其他问题也欢迎留言

@SC-shendazt
Copy link
Author

非常感谢你细致的解释,我先尝试一下,或许其他朋友也对这个问题感兴趣,毕竟您复现semantickitti指标的效果对于RandlaNet来说还是挺好的

@SC-shendazt
Copy link
Author

你好,我尝试了修改,但是好像报错了,如下图所示,能加个您的QQ或者微信交流一下吗
QQ图片20230208004026

@charlesChen02
Copy link
Owner

好的,可以加我微信charleschen1224

@chenys0425
Copy link

你好,我尝试了修改,但是好像报错了,如下图所示,能加个您的QQ或者微信交流一下吗 QQ图片20230208004026

请问你加载S3DIS的数据集的代码运行成功了吗,可以发给我参考一下吗

@chenys0425
Copy link

好的,可以加我微信charleschen1224

您好,请问您之后有更新加载s3dis数据集的代码吗

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

3 participants