better regex filtering for smaller memory usage
This commit is contained in:
parent
d291d49a2d
commit
1af300988a
@ -100,7 +100,15 @@ class CustomShapeNet(InMemoryDataset):
|
|||||||
paths.extend(glob.glob(os.path.join(pointcloud.path, f'*.{ext}')))
|
paths.extend(glob.glob(os.path.join(pointcloud.path, f'*.{ext}')))
|
||||||
|
|
||||||
for element in paths:
|
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
|
# Assign training data to the data container
|
||||||
# Following the original logic;
|
# Following the original logic;
|
||||||
# y should be the label;
|
# y should be the label;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user