diff --git a/dataset/shapenet.py b/dataset/shapenet.py index fbf0ed2..be243e0 100644 --- a/dataset/shapenet.py +++ b/dataset/shapenet.py @@ -100,7 +100,15 @@ class CustomShapeNet(InMemoryDataset): paths.extend(glob.glob(os.path.join(pointcloud.path, f'*.{ext}'))) for element in paths: - if all([x not in os.path.split(element)[-1] for x in ['pc.dat', 'pc.xyz']]): + # This was build to filter all variations that aregreater then 25 + pattern = re.compile('^((2[5-9]|[3-5][0-9])_\w+?\d+?|pc|\d+?_pc)\.(xyz|dat)$') + if pattern.match(os.path.split(element)[-1]): + continue + else: + # The following two lines were intendations + # check if it is "just" a pc.dat or pc.xyz + # if all([x not in os.path.split(element)[-1] for x in ['pc.dat', 'pc.xyz']]): + # Assign training data to the data container # Following the original logic; # y should be the label;