Labels can now be placed along next to the points within the datasetfile
This commit is contained in:
@ -111,7 +111,7 @@ class CustomShapeNet(InMemoryDataset):
|
||||
|
||||
for element in paths:
|
||||
# This was build to filter all variations that aregreater then 25
|
||||
pattern = re.compile('^((6[0-1]|[1-5][0-9])_\w+?\d+?|pc|\d+?_pc)\.(xyz|dat)$')
|
||||
pattern = re.compile('^((6[0-1]|[1-5][0-9])_\w+?\d+?|\d+?_pc)\.(xyz|dat)$')
|
||||
if pattern.match(os.path.split(element)[-1]):
|
||||
continue
|
||||
else:
|
||||
@ -134,8 +134,11 @@ class CustomShapeNet(InMemoryDataset):
|
||||
points = points[:, :-1]
|
||||
else:
|
||||
# Get the y - Label
|
||||
y_raw = next(i for i, v in enumerate(self.categories.keys()) if v.lower() in element.lower())
|
||||
y_all = ([y_raw] if self.mode != 'predict' else [-1]) * points.shape[0]
|
||||
if self.mode != 'predict':
|
||||
y_raw = next(i for i, v in enumerate(self.categories.keys()) if v.lower() in element.lower())
|
||||
y_all = [y_raw] * points.shape[0]
|
||||
else:
|
||||
y_all = [-1] * points.shape[0]
|
||||
|
||||
y = torch.as_tensor(y_all, dtype=torch.int)
|
||||
if self.collate_per_element:
|
||||
|
Reference in New Issue
Block a user