Jittor implementation of PCT:Point Cloud Transformer

Related tags

Deep Learning PCT
Overview

PCT: Point Cloud Transformer

This is a Jittor implementation of PCT: Point Cloud Transformer.

Paper link: https://arxiv.org/pdf/2012.09688.pdf

Astract

The irregular domain and lack of ordering make it challenging to design deep neural networks for point cloud processing. This paper presents a novel framework named Point Cloud Transformer(PCT) for point cloud learning. PCT is based on Transformer, which achieves huge success in natural language processing and displays great potential in image processing. It is inherently permutation invariant for processing a sequence of points, making it well-suited for point cloud learning. To better capture local context within the point cloud, we enhance input embedding with the support of farthest point sampling and nearest neighbor search. Extensive experiments demonstrate that the PCT achieves the state-of-the-art performance on shape classification, part segmentation and normal estimation tasks

image

Architecture

image

Jittor

Jittor is a high-performance deep learning framework which is easy to learn and use. It provides interfaces like Pytorch.

You can learn how to use Jittor in following links:

Jittor homepage: https://cg.cs.tsinghua.edu.cn/jittor/

Jittor github: https://github.com/Jittor/jittor

If you has any questions about Jittor or PCT, you can ask in Jittor developer QQ Group: 761222083

Other implementation

Version 1 : https://github.com/uyzhang/PCT_Pytorch (Pytorch version with classification acc 93.2% on ModelNet40)
Version 2 : https://github.com/qq456cvb/Point-Transformers (Pytorch version with classification acc 92.6% on ModelNet40)

Description

Now, we only release the core code of our paper. All code and pretrained models will be available soon.

Citation

If it is helpful for your work, please cite this paper:

@misc{guo2020pct,
      title={PCT: Point Cloud Transformer}, 
      author={Meng-Hao Guo and Jun-Xiong Cai and Zheng-Ning Liu and Tai-Jiang Mu and Ralph R. Martin and Shi-Min Hu},
      year={2020},
      eprint={2012.09688},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
Comments
  • Queries about permutation invariance of Transformer

    Queries about permutation invariance of Transformer

    Hi Menghao,

    Thank you for sharing the interesting paper!

    I have some queries about the definition of the permutation invariance. In my opinion, though the self-attention calculates the global contextual information and aggregate the feature via weighted summation, the resulting features are still related to the point order (but the feature of the same point seems to be invariant). And I also observe the implementation of max-pooling strategy, which is proposed in PointNet to guarantee invariance.

    So I wonder how you define the permutation invariance, because it seems the attention itself can hardly gurantee the global invanriance. Thank you very much!

    Rui

    opened by ruili3 5
  • 关于seg文件中似乎没有local feature representation的问题

    关于seg文件中似乎没有local feature representation的问题

    Dear MenghaoGuo,

    感谢你的代码,我在你的文章中的3.4节看到local feature representation,但是似乎这个操作只有cls里面有,seg文件中并没有文章提到的SG layer。 是分割任务中不需要local feature吗,还是global feature就已经能胜任分割任务? 希望您解答我的问题。

    Thanks again!

    opened by 294coder 4
  • How is the Global Feature concatenated with Point Feature in segmentation?

    How is the Global Feature concatenated with Point Feature in segmentation?

    Hi, thanks for your great work! However, I have a problem with the concatenation in segmentation. As shown in Fig. 2, the global feature is obtained by repeating its previous vector. It should be (batch_size, 1024, point_num), point_num may be 1024 in the modelnet. While the point feature should be (batch_sie, 1024, sampled_point_num). For example, the sample_point_num is 256 according to the implementation at https://github.com/Strawberry-Eat-Mango/PCT_Pytorch. So how can these two features be concatenated? Or do we just segment those sampled points?

    opened by YifanDengWHU 3
  • about a real example code

    about a real example code

    Hi, @MenghaoGuo ,

    Thanks for releasing the package. The current package only provides the code for network construction. Could you provide a real example code for point cloud classification or segmentation?

    Thanks~

    opened by amiltonwong 3
  • Use of bias in value layer

    Use of bias in value layer

    Hello,

    very interesting paper, and nice to publish parts of the code along with it!

    A couple of questions:

    • I was wondering why the layer calculating the values self.v_conv has a bias attached to it. Looking at other 'attention' implementations, it seems that those mostly exclude bias from it (as you also do for the keys and queries). Did you see any improvement adding a bias there?
    • Is there any reason for setting the initial weights of the key and query layer equally?
    • In the paper, you mention making use of Farthest Point Sampling (FPS) for the neighbor embedding module, but before you sample you embed the pure 3-dimensional point-coordinates in a high-dimensional space. Do you perform FPS in the full 64-dimensional space, or do you do this in the 3-dimensional one?

    Kind regards, steven

    opened by Stavr0sStuff 3
  • Feature map

    Feature map

    Thank you very much for your work. I would like to ask how to generate the feature map of the point cloud. If it is convenient, can you provide an example? thanks!

    opened by missbook520 3
  • question about the attention map visualization

    question about the attention map visualization

    Hi, @MenghaoGuo,

    For Figure 1 in your paper, which self-attention layer is used to visualize the attention map? From your implementation, there are 4 self-attention layers (SA1, SA2, SA3, SA4) in the model.

    Thanks~

    opened by amiltonwong 2
  • What is cls_label in parseg Network?

    What is cls_label in parseg Network?

    I am trying to run simple optimization using this segmentation netowrk, but I cannot fully understand what cls_label parameter in partseg network.

    Do I have to run classification before conducting segmentation or something like that?

    Thank you.

    opened by EJShim 2
  • question about the normalization on the attention weight

    question about the normalization on the attention weight

    HI, @MenghaoGuo ,

    From the code in cls and partseg, the attention weights are already normalized by self.softmax(). Why did you add an extra line attention / (1e-9 + attention.sum(dim=1, keepdims=True)) for weight normalization ?

    Any particular reason?

    Thanks~

    opened by amiltonwong 1
  • Pre-trained models

    Pre-trained models

    Hi,

    amazing work and great results, thanks for making it available here! I was wondering whether you plan to release the pre-trained models? I work on robotic grasping and it would be interesting to see how your architecture performs for this task compared to other state-of-the-art models.

    opened by vincentmaye 1
  • Question about weight value of key and query in SA Layer

    Question about weight value of key and query in SA Layer

    Hello,

    I really appreciate to your creative work.

    However, I hope to know why did you use same weight value when initialize the q_conv and k_conv kernel?

    As I know, they don't have to be identical.

    Is there any reason?

    Thank you for your work again.

    image

    opened by dogyoonlee 1
  • The question of training

    The question of training

    I'm very sorry to bother you. I trained the PCT in a 2080Ti,but I can‘t obtain the accuracy to 93.2 and the result is greatly waving. I only obtain the accuracy to 92.8. Do you have other particular parameter? Best regard,

    opened by Hello-hubKing 0
  • How do you consider about  Layer normalization and Batch normalization?

    How do you consider about Layer normalization and Batch normalization?

    Hi,

    PCT used the Batch normalization, instead of the Layer normalization, used by original Transformer.

    I wonder how do you consider about Layer normalization and Batch normalization in PCT?

    opened by Alobal 0
  • What is `self.pos_xyz(xyz)`

    What is `self.pos_xyz(xyz)`

    Hello, thanks for your work! I am reading the code but get confused about some details. In the class Point_Transformer_Last, the self.pos_xyz is not defined in the section. What does the operation specifically do and where can I find the definition of it? Appreciate!

    opened by songtianhui 2
  • About SA_Layer

    About SA_Layer

    When the convolution weight of q and k are initialized equal, self.q_conv.conv.weight = self.k_conv.conv.weight will it cause q and k to be always the same when updated?

    opened by Hzj199 2
Owner
MenghaoGuo
First-year Ph.D candidate at G2 group, Tsinghua University.
MenghaoGuo
Point Cloud Denoising input segmentation output raw point-cloud valid/clear fog rain de-noised Abstract Lidar sensors are frequently used in environme

Point Cloud Denoising input segmentation output raw point-cloud valid/clear fog rain de-noised Abstract Lidar sensors are frequently used in environme

null 75 Nov 24, 2022
Implementation of the "Point 4D Transformer Networks for Spatio-Temporal Modeling in Point Cloud Videos" paper.

Point 4D Transformer Networks for Spatio-Temporal Modeling in Point Cloud Videos Introduction Point cloud videos exhibit irregularities and lack of or

Hehe Fan 101 Dec 29, 2022
[ICCV 2021 Oral] SnowflakeNet: Point Cloud Completion by Snowflake Point Deconvolution with Skip-Transformer

This repository contains the source code for the paper SnowflakeNet: Point Cloud Completion by Snowflake Point Deconvolution with Skip-Transformer (ICCV 2021 Oral). The project page is here.

AllenXiang 65 Dec 26, 2022
Implementation of the "PSTNet: Point Spatio-Temporal Convolution on Point Cloud Sequences" paper.

PSTNet: Point Spatio-Temporal Convolution on Point Cloud Sequences Introduction Point cloud sequences are irregular and unordered in the spatial dimen

Hehe Fan 63 Dec 9, 2022
Style-based Point Generator with Adversarial Rendering for Point Cloud Completion (CVPR 2021)

Style-based Point Generator with Adversarial Rendering for Point Cloud Completion (CVPR 2021) An efficient PyTorch library for Point Cloud Completion.

Microsoft 119 Jan 2, 2023
Synthetic LiDAR sequential point cloud dataset with point-wise annotations

SynLiDAR dataset: Learning From Synthetic LiDAR Sequential Point Cloud This is official repository of the SynLiDAR dataset. For technical details, ple

null 78 Dec 27, 2022
GANSketchingJittor - Implementation of Sketch Your Own GAN in Jittor

GANSketching in Jittor Implementation of (Sketch Your Own GAN) in Jittor(计图). Or

Bernard Tan 10 Jul 2, 2022
Jittor 64*64 implementation of StyleGAN

StyleGanJittor (Tsinghua university computer graphics course) Overview Jittor 64

Song Shengyu 3 Jan 20, 2022
JDet is Object Detection Framework based on Jittor.

JDet is Object Detection Framework based on Jittor.

null 135 Dec 14, 2022
Jittor Medical Segmentation Lib -- The assignment of Pattern Recognition course (2021 Spring) in Tsinghua University

THU模式识别2021春 -- Jittor 医学图像分割 模型列表 本仓库收录了课程作业中同学们采用jittor框架实现的如下模型: UNet SegNet DeepLab V2 DANet EANet HarDNet及其改动HarDNet_alter PSPNet OCNet OCRNet DL

null 48 Dec 26, 2022
Jittor is a high-performance deep learning framework based on JIT compiling and meta-operators.

Jittor: a Just-in-time(JIT) deep learning framework Quickstart | Install | Tutorial | Chinese Jittor is a high-performance deep learning framework bas

null 2.7k Jan 3, 2023
GeoTransformer - Geometric Transformer for Fast and Robust Point Cloud Registration

Geometric Transformer for Fast and Robust Point Cloud Registration PyTorch imple

Zheng Qin 220 Jan 5, 2023
Stratified Transformer for 3D Point Cloud Segmentation (CVPR 2022)

Stratified Transformer for 3D Point Cloud Segmentation Xin Lai*, Jianhui Liu*, Li Jiang, Liwei Wang, Hengshuang Zhao, Shu Liu, Xiaojuan Qi, Jiaya Jia

DV Lab 195 Jan 1, 2023
Unofficial implementation of Point-Unet: A Context-Aware Point-Based Neural Network for Volumetric Segmentation

Point-Unet This is an unofficial implementation of the MICCAI 2021 paper Point-Unet: A Context-Aware Point-Based Neural Network for Volumetric Segment

Namt0d 9 Dec 7, 2022
Official implementation of YOGO for Point-Cloud Processing

You Only Group Once: Efficient Point-Cloud Processing with Token Representation and Relation Inference Module By Chenfeng Xu, Bohan Zhai, Bichen Wu, T

Chenfeng Xu 67 Dec 20, 2022
[PyTorch] Official implementation of CVPR2021 paper "PointDSC: Robust Point Cloud Registration using Deep Spatial Consistency". https://arxiv.org/abs/2103.05465

PointDSC repository PyTorch implementation of PointDSC for CVPR'2021 paper "PointDSC: Robust Point Cloud Registration using Deep Spatial Consistency",

null 153 Dec 14, 2022
PyTorch implementation for View-Guided Point Cloud Completion

PyTorch implementation for View-Guided Point Cloud Completion

null 22 Jan 4, 2023
PyTorch implementation of NeurIPS 2021 paper: "CoFiNet: Reliable Coarse-to-fine Correspondences for Robust Point Cloud Registration"

PyTorch implementation of NeurIPS 2021 paper: "CoFiNet: Reliable Coarse-to-fine Correspondences for Robust Point Cloud Registration"

null 76 Jan 3, 2023
Pytorch implementation of Straight Sampling Network For Point Cloud Learning (ICIP2021).

Pytorch code for SS-Net This is a pytorch implementation of Straight Sampling Network For Point Cloud Learning (ICIP2021). Environment Code is tested

Sun Ran 1 May 18, 2022