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

Stanford data preprocessing #48

Open
minkyujeon opened this issue Mar 5, 2021 · 3 comments
Open

Stanford data preprocessing #48

minkyujeon opened this issue Mar 5, 2021 · 3 comments

Comments

@minkyujeon
Copy link

minkyujeon commented Mar 5, 2021

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
)
image

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
image

Please let me know if I have some mistakes. Thank you.

@bachtx12
Copy link

bachtx12 commented May 1, 2021

I also had the same problem. Please let me know if you solved this problem. Thank you.

@minkyujeon
Copy link
Author

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)

@GoodJuicee
Copy link

`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 ?

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