Stanford data preprocessing
minkyujeon opened this issue · 3 comments
Hello, I highly appreciate you for sharing the code.
It seems that in SpatioTemporalSegmentation/lib/datasets/preprocessing/stanford.py, the below code returns an error.
inds, collabels = ME.utils.sparse_quantize(
coords,
feats,
labels,
return_index=True,
ignore_label=255,
quantization_size=0.01 # 1cm
)
My MinkowskiEngine version is 0.5.0 so I changed the code like this :
coords, feats, collabels = ME.utils.sparse_quantize(
coords,
feats,
labels,
return_index=False,
ignore_label=255,
quantization_size=0.01 # 1cm
)
pointcloud = np.concatenate((coords, feats, collabels), axis=1)
It works well in preprocessing, but when I run the " ./scripts/train_stanford.sh" , it also returns errors like this
Please let me know if I have some mistakes. Thank you.
I also had the same problem. Please let me know if you solved this problem. Thank you.
I solved this problem.
Please try to this code
coords = np.concatenate(coords, 0)
feats = np.concatenate(feats, 0)
labels = np.concatenate(labels, 0)
coords2, feats2, labels2, labels2_2 = ME.utils.sparse_quantize(
coords,
feats,
labels,
return_index=True,
ignore_label=255,
quantization_size=0.01
)
pointcloud = np.concatenate((coords[labels2_2], feats[labels2_2], labels[labels2_2]), axis=1)
`I solved this problem.
Please try to this code
coords = np.concatenate(coords, 0)
feats = np.concatenate(feats, 0)
labels = np.concatenate(labels, 0)
coords2, feats2, labels2, labels2_2 = ME.utils.sparse_quantize(
coords,
feats,
labels,
return_index=True,
ignore_label=255,
quantization_size=0.01
)
pointcloud = np.concatenate((coords[labels2_2], feats[labels2_2], labels[labels2_2]), axis=1)`
the codes was which version ?