Git Product home page Git Product logo

anhthuan1999 / pointct Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 1.0 783 KB

PointCT: Point Central Transformer Network for Weakly-supervised Point Cloud Semantic Segmentation (WACV 2024)

Home Page: https://openaccess.thecvf.com/content/WACV2024/html/Tran_PointCT_Point_Central_Transformer_Network_for_Weakly-Supervised_Point_Cloud_Semantic_WACV_2024_paper.html

License: MIT License

Python 82.82% C++ 7.08% Cuda 10.10%
3d 3d-point-clouds attention-mechanism semantic-segmentation weakly-supervised

pointct's Introduction

PointCT: Point Central Transformer Network for Weakly-supervised Point Cloud Semantic Segmentation

Anh-Thuan Tran, Hoanh-Su Le, Suk-Hwan Lee, Ki-Ryong Kwon

This is the official PyTorch implementation of our paper PointCT: Point Central Transformer Network for Weakly-supervised that has been accepted to WACV 2024. [CVF]

Highlight

  1. We propose a novel end-to-end trainable transformer network with central-based attention to overcome sparse annotations in point cloud segmentation.
  2. We introduce position encoding module in point cloud weak supervision, concentrating on different geometric components to extract point representations and improve model spatial reasoning.
  3. Our experimental results on benchmark datasets demonstrate the outstanding performance of PointCT compared to state-of-the-art studies for both indoor and real-world point clouds.

Get Started

Dependencies

  • Ubuntu: 20.04
  • Python: 3.7
  • PyTorch: 1.10.1
  • CUDA: 11.3
  • Hardware: 2 GPUs (NVIDIA RTX 3060) to reproduce PointCT

Environment

  1. Install dependencies
pip install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu113/torch_stable.html

pip install -r requirements.txt
  1. Compile pointops

Make sure you have installed gcc and cuda, and nvcc can work (Note that if you install cuda by conda, it won't provide nvcc and you should install cuda manually.). Then, compile and install pointops as follows.

cd lib/pointops
python3 setup.py install

Datasets Preparation

S3DIS

Please refer to https://github.com/yanx27/Pointnet_Pointnet2_pytorch for S3DIS preprocessing. Then modify the data_root entry in the .yaml configuration file.

ScanNetv2

Please refer to https://github.com/dvlab-research/PointGroup for the ScanNetv2 preprocessing. Then change the data_root entry in the .yaml configuration file accordingly.

STPLS3D

Please refer to https://github.com/meidachen/STPLS3D/tree/main/point-transformer for STPLS3D preprocessing. Then modify the data_root entry in the .yaml configuration file.

Training

For testing, first check the save_path, resume and labeled_point (if applicable) accordingly. Then, run the following command.

[CONFIG] = config/s3dis.yaml, config/scannet.yaml, config/stpls3d.yaml

python3 train.py --config [CONFIG]

Note: It is normal to see the the results on S3DIS fluctuate between -0.5% and +0.5% mIoU maybe because the size of S3DIS is relatively small, while the results on ScanNetv2 and STPLS3D are relatively stable.

Testing

For testing, first change the model_path, save_folder and data_root_val (if applicable) accordingly. Then, run the following command.

For S3DIS, STPLS3D test set and ScannetV2 validation set, we use following command.

[CONFIG] = config/s3dis.yaml, config/scannet.yaml, config/stpls3d.yaml

python3 test.py --config [CONFIG]

For benchmark ScannetV2 test set, we use following command.

python3 test_scannet.py --config config/scannet.yaml

Citation

If you find this project useful, please consider citing:

@inproceedings{tran2024pointct,
  title        = {{PointCT}: Point Central Transformer Network for Weakly-Supervised Point Cloud Semantic Segmentation},
  author       = {Anh{-}Thuan Tran and
                  Hoanh{-}Su Le and
                  Suk{-}Hwan Lee and
                  Ki{-}Ryong Kwon},
  booktitle    = {Proceedings of the {IEEE/CVF} Winter Conference on Applications of Computer Vision},
  pages        = {3556--3565},
  year         = {2024},
}

Acknowledgement

We refer Point Transformer and Stratified Transformer for our codebase.

pointct's People

Contributors

anhthuan1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

whuhxb

pointct's Issues

How to train other datasets,such as Toronto3D or Semantic3D

Thank you very much for your help and reply !🙇‍ I have already run the code. you trained S3DIS 、ScanNet and STPLS3D datasets,but I want to train Toronto3D and Semantic3D,I condsider that I need to write the code for the pre-processing and data entry part.I know some knowlwdge about pytorch Dataloader,but I don't know data preprocessing,Can you give me some suggestion for data preprocessing? Thank you ! you really help me a lot.

Multi-gpus parallel error

I am sorry to bother you again.I met some erros when I run the code on 2 2080ti GPUs.
I tried to set find_unused_parameters=True ,But there will still be problems in the first epoch.
The reason I'm looking up on Google is that some of the parameters are not involved in backpropagation, which doesn't occur when a single gpu is running, but does occur when multiple gpus are parallel.Do you have any good solutions to this?thank you for your reply!

RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by passing the keyword argument `find_unused_parameters=True` to `torch.nn.parallel.DistributedDataParallel`, and by 
making sure all `forward` function outputs participate in calculating loss. 
If you already have done the above, then the distributed data parallel module wasn't able to locate the output tensors in the return value of your module's `forward` function. Please include the loss function and the structure of the return value of `forward` of your module when reporting this issue (e.g. list, dict, iterable).
Parameter indices which did not receive grad for rank 0: 42 43 85 86 131 132 174 175 220 221 263 264 306 307 349 350 392 393 438 439 481 482
 In addition, you can set the environment variable TORCH_DISTRIBUTED_DEBUG to either INFO or DETAIL to print out information about which particular parameters did not receive gradient on this rank as part of this error

The time consumption

Hello, I just ran through this model today, using an rtx 4060ti. The printed results show that it will take 60 days to complete the training. Is this normal? I also have a 4090 graphics card. Can I use it to train the network and complete it in one day?

The result on s3dis_Aera5

thank you for your excellent work! I run PointCT on a single 409GPU,the test result on S3DIS Aera5 as this,my parameter settings are the same as the default parameters in your code, is this result too different and what do you think is causing this? Thank you for your reply!
1710407130462

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.