Julie-tang00 / Point-BERT

[CVPR 2022] Pre-Training 3D Point Cloud Transformers with Masked Point Modeling
MIT License
542 stars 65 forks source link

Chamfer distance question #66

Open tomas-aftalion opened 1 year ago

tomas-aftalion commented 1 year ago

Hi, had a question regarding Chamfer distance. What are the benefits of using the compiled cuda extension vs writing a simple pytorch version of it? Is there something fundamental that simply can't be implemented in pytorch?

auniquesun commented 1 year ago

@tomas-aftalion In fact, pytorch3d has implemented chamfer distance. I think the author just borrow the code from other sources, which are implemented with cuda. I think there is no big difference.

My goal is to re-implement this repo with pure python an pytorch, without introducing c/c++ extensions. The extenstions seems not concise and are easy to produce problems when compiling.

Stay tuned!

yuxumin commented 1 year ago

Hey, thanks a lot, guys! We implemented it in CUDA for convenience, which we directly borrowed from another repository. The CUDA-based chamfer has been widely used in some 3D task repositories, which allows for faster calculation speed.

Implementing it in pure PyTorch should save a lot of time on compiling. I really appreciate your attention and effort in this matter. Please feel free to let me know if you have any further questions or need any assistance.