(CVPR 2022 Oral) Official implementation for "Surface Representation for Point Clouds"

Overview

RepSurf - Surface Representation for Point Clouds
[CVPR 2022 Oral]

By Haoxi Ran* , Jun Liu, Chengjie Wang ( * : corresponding contact)

PWC PWC PWC PWC PWC PWC

The pytorch official implementation of "Surface Representation for Point Clouds". The repos of RepSurf on other tasks are coming:

arXiv | PDF

Other Tasks:

3D Segmentation (ongoing): RepSurf for Segmentation

Preparation

Environment

We tested under the environment:

  • python 3.7
  • pytorch 1.6.0
  • cuda 10.1
  • gcc 7.2.0
  • h5py

For anaconda user, initialize the environment by:

sh init.sh

Or you can manually install the above packages and compile the cuda-based point operators by:

cd modules/pointops
python3 setup.py install

Classification

ScanObjectNN

  • Performance:
Model Accuracy #Params Augment Code Log Checkpoint
MVTN 82.8 4.24M None link N/A link
PointMLP 85.7 12.6M Scale, Shift link link link
PointNet++ SSG 77.9 1.475M Rotate, Jitter link N/A N/A
Umbrella RepSurf (PointNet++ SSG) 84.87 1.483M None link google drive google drive (6MB)
Umbrella RepSurf (PointNet++ SSG, 2x) 86.05 6.806M None link google drive google drive (27MB)

  • To download dataset:
wget http://download.cs.stanford.edu/orion/scanobjectnn/h5_files.zip
unzip h5_files.zip
ln -s [PATH]/h5_files data/ScanObjectNN

Note: We conduct all experiments on the hardest variant of ScanObjectNN (PB_T50_RS).

  • To train Umbrella RepSurf on ScanObjectNN:
sh scripts/repsurf/scanobjectnn/repsurf_ssg_umb.sh
  • To train Umbrella RepSurf (2x setting) on ScanObjectNN:
sh scripts/repsurf/scanobjectnn/repsurf_ssg_umb_2x.sh

Visualization

We provide several visualization results in the folder ./visualization for a closer look at the construction of RepSurf.

TODO

  • Classification on ModelNet40
  • Segmentation on S3DIS / ScanNet

Acknowledgment

We use part of the library pointops from PointWeb.

License

RepSurf is under the Apache-2.0 license. Please contact the primary author Haoxi Ran ([email protected]) for commercial use.

Comments
  • What does 'offset' mean in segmentation?How to get it?

    What does 'offset' mean in segmentation?How to get it?

    What is the meaning of the variable offset [line306] in the segmentation model? And if I only have data in the form of [B, 3, N] can I even get the offset variable? Also, if I can't get the offset easily, how can I extract the point cloud features in the data of [B, 3, N]?

    Really appreciate it if you can reply!

    opened by JiachengDeng 6
  • can you add 6-fold train and test code?

    can you add 6-fold train and test code?

    Hello,I tried to reproduce the experimental results in your paper,My results are similar to those in your paper in Area5, but I want to try the experimental results in 6-fold. if you can provide the code,I would be grateful! thx

    opened by mmiku1 5
  • How to train and evaluate the model on multiple GPUs?

    How to train and evaluate the model on multiple GPUs?

    hello, I try to train the model on two gpus, but an error occurred. The error occurred when load the S3DIS dataset. The error shows that "ValueError: batch_size should be a positive integer value, but got batch_size=0", how can I solve this problem? Thanks for your help.

    opened by zheng0819 4
  • Where can I find

    Where can I find "lib/pointops"?

    When I want to configure the environment, I find I can't find the folder ‘lib/pointops’, where can I download the relevant file and configure it? ☆⌒(*^-゜)v THX!!

    opened by JiachengDeng 3
  • few question: how do i train this code 6-fold on s3dis dataset.

    few question: how do i train this code 6-fold on s3dis dataset.

    sorry, I just saw the s3dis area-5 result. how can i train this code for S3DIS 6-fold?

    Another question: I see this code to feed too much point clouds into the network. If the input point cloud data will be reduced, speeding up training. Will this cause a drop in accuracy?

    opened by ybc-ybc 2
  • [Seg. Pointops Compile] name

    [Seg. Pointops Compile] name "pointops_cuda" conflicts with Cls. Pointops

    Dear authors, Thank you so much for your awesome work.

    When I follow your source code to compile Pointops in Classification and then compile the other Pointops in Segmentation, the Pointops imported will come from Cls.'s.

    This problem was found by

    File './RepSurf/segmentation/modules/pointops/functions/pointops.py', line 126, in forward
        pointops_cuda.knnquery_cuda(m, nsample, xyz, new_xyz, offset, new_offset, idx, dist2)
    TypeError: knnquery_cuda(): incompatible function arguments. The following argument types are supported:
        1. (arg0: int, arg1: int, arg2: int, arg3: int, arg4: at::Tensor, arg5: at::Tensor, arg6: at::Tensor, arg7: at::Tensor) -> None
    

    Since knnquery_cuda() in Seg.'s Pointops support (arg0: int, arg1: int, arg2: at::Tensor, arg3: at::Tensor, arg4: at::Tensor, arg5: at::Tensor, arg6: at::Tensor, arg7: at::Tensor).

    Then I found setup( name='pointops', ext_modules=[ CUDAExtension('pointops_cuda', in Cls's Pointops and setup( name='pointops_cuda', ext_modules=[ CUDAExtension('pointops_cuda', in Seg's Pointops. They have different python site-packages names but the same CUDAExtension name. This may cause upon problems during import pointops_cuda.

    Because I am not familiar with C++, would you help me solve this problem? (The solution for now on is to delete the other site-packages while using one)

    Thanks again for your great work.

    opened by Margaretya 2
  • wonder the explaination of loss function in classification task

    wonder the explaination of loss function in classification task

    Thanks for your excellent works !

    I had a bit of a problem when reproducing the project. Could you explain the loss function (SmoothClsLoss) used in classification task? I didn't find an introduction to it in the paper.

    opened by hyxxx-alt 1
  • Thanks to the author for the excellent work, but I wonder why group_centriod = torch.zeros_like (sorted_group_xyz), why is the value of group_centriod all 0?

    Thanks to the author for the excellent work, but I wonder why group_centriod = torch.zeros_like (sorted_group_xyz), why is the value of group_centriod all 0?

    https://github.com/hancyran/RepSurf/blob/ef873f8f36aa224e4b08edaab21330a828dac8f9/modules/repsurface_utils.py#L129

    Thanks to the author for the excellent work, but I wonder why group_centriod = torch.zeros_like (sorted_group_xyz), why is the value of group_centriod all 0?

    opened by dengyingxu 1
  • Backbone for segmentation

    Backbone for segmentation

    Hi, thank you for your great work. I have read your paper and I am curious about the backbone of the segmentation task. Do you use the same Decoder of PointNet++ or have any modifications on it?

    opened by tranganhthuan 1
  • Problem of the precalculated class weight

    Problem of the precalculated class weight

    Dear author, I'm trying to use my own dataset now. When I used the precalculated class weight of S3DIS, the results of training are normal, but the results of testing are very abnormal.The mIOU is only 6%. So what are the precalculated class weight and how to calculate that?

    Could you help me? Thank you very much.

    def get_class_weights(dataset_name):
        # pre-calculate the class weight
        if dataset_name == 'S3DIS_A1':
            num_per_class = [0.27362621, 0.3134626, 0.18798782, 1.38965602, 1.44210271, 0.86639497, 1.07227331,
                             1., 1.05912352, 1.92726327, 0.52329938, 2.04783419, 0.5104427]
        elif dataset_name == 'S3DIS_A2':
            num_per_class = [0.29036634, 0.34709631, 0.19514767, 1.20129272, 1.39663689, 0.87889087, 1.11586938,
                             1., 1.54599972, 1.87057415, 0.56458097, 1.87316536, 0.51576885]
        elif dataset_name == 'S3DIS_A3':
            num_per_class = [0.27578885, 0.32039725, 0.19055443, 1.14914046, 1.46885687, 0.85450877, 1.05414776,
                             1., 1.09680025, 2.09280004, 0.59355243, 1.95746691, 0.50429199]
        elif dataset_name == 'S3DIS_A4':
            num_per_class = [0.27667177, 0.32612854, 0.19886974, 1.18282174, 1.52145143, 0.8793782, 1.14202999,
                             1., 1.0857859, 1.89738584, 0.5964717, 1.95820557, 0.52113351]
        elif dataset_name == 'S3DIS_A5':
            num_per_class = [0.28459923, 0.32990557, 0.1999722, 1.20798185, 1.33784535, 1., 0.93323316, 1.0753585,
                             1.00199521, 1.53657772, 0.7987055, 1.82384844, 0.48565471]
        elif dataset_name == 'S3DIS_A6':
            num_per_class = [0.29442441, 0.37941846, 0.21360804, 0.9812721, 1.40968965, 0.88577139, 1.,
                             1.09387107, 1.53238009, 1.61365643, 1.15693894, 1.57821041, 0.47342451]
        elif dataset_name == 'ScanNet_train':
            num_per_class = [0.32051547, 0.1980627, 0.2621471, 0.74563083, 0.52141879, 0.65918949, 0.73560561, 1.03624985,
                             1.00063147, 0.90604468, 0.43435155, 3.91494446, 1.94558718, 1., 0.54871637, 2.13587716,
                             1.13931665, 2.06423695, 5.59103054, 1.08557339, 1.35027497]
        elif dataset_name == 'ScanNet_trainval':
            num_per_class = [0.32051547, 0.1980627, 0.2621471, 0.74563083, 0.52141879, 0.65918949, 0.73560561, 1.03624985,
                             1.00063147, 0.90604468, 0.43435155, 3.91494446, 1.94558718, 1., 0.54871637, 2.13587716,
                             1.13931665, 2.06423695, 5.59103054, 1.08557339, 1.35027497]
        else:
            raise Exception('No Prepared Class Weights of Dataset')
        return torch.FloatTensor(num_per_class)
    
    opened by ProgramWho 0
  • problem of multiprocessing

    problem of multiprocessing

    thx for your great work! when I run the code of scripts/s3dis/train_repsurf_umb.sh,

    The program stops running suddenly these are message:

    [2022-11-18 14:58:19,302 INFO train.py line 326 16493] Epoch: [1/100][250/765] Batch 0.760 (1.679) Remain 35:34:19 Loss 0.9464 Accuracy 74.02 [2022-11-18 15:05:20,747 INFO train.py line 326 16493] Epoch: [1/100][500/765] Batch 0.590 (1.683) Remain 35:31:19 Loss 0.6425 Accuracy 81.22 [2022-11-18 15:11:53,662 INFO train.py line 326 16493] Epoch: [1/100][750/765] Batch 0.483 (1.646) Remain 34:37:36 Loss 0.4475 Accuracy 82.48 [2022-11-18 15:12:03,557 INFO train.py line 345 16493] Train result at epoch [1/100]: mIoU / mAcc / OA 51.48 / 71.95 / 75.43 [2022-11-18 15:19:06,043 INFO train.py line 326 16493] Epoch: [2/100][250/765] Batch 0.869 (1.690) Remain 35:26:02 Loss 0.4624 Accuracy 85.42 [2022-11-18 15:25:38,102 INFO train.py line 326 16493] Epoch: [2/100][500/765] Batch 0.814 (1.629) Remain 34:02:41 Loss 0.4129 Accuracy 83.37 [2022-11-18 15:32:28,147 INFO train.py line 326 16493] Epoch: [2/100][750/765] Batch 0.511 (1.633) Remain 34:00:33 Loss 0.2694 Accuracy 88.11 [2022-11-18 15:32:36,285 INFO train.py line 345 16493] Train result at epoch [2/100]: mIoU / mAcc / OA 69.06 / 87.74 / 85.77 [2022-11-18 15:39:29,681 INFO train.py line 326 16493] Epoch: [3/100][250/765] Batch 1.076 (1.654) Remain 34:19:14 Loss 0.2946 Accuracy 87.22 [2022-11-18 15:46:07,134 INFO train.py line 326 16493] Epoch: [3/100][500/765] Batch 0.494 (1.622) Remain 33:32:46 Loss 0.1570 Accuracy 93.33 [2022-11-18 15:52:44,975 INFO train.py line 326 16493] Epoch: [3/100][750/765] Batch 0.558 (1.612) Remain 33:13:30 Loss 0.2258 Accuracy 90.11 [2022-11-18 15:53:01,495 INFO train.py line 345 16493] Train result at epoch [3/100]: mIoU / mAcc / OA 76.53 / 91.84 / 89.52 [2022-11-18 16:00:07,540 INFO train.py line 326 16493] Epoch: [4/100][250/765] Batch 0.739 (1.704) Remain 35:00:31 Loss 0.1830 Accuracy 92.54 [2022-11-18 16:06:41,970 INFO train.py line 326 16493] Epoch: [4/100][500/765] Batch 0.582 (1.641) Remain 33:35:45 Loss 0.2703 Accuracy 90.42 [2022-11-18 16:13:25,494 INFO train.py line 326 16493] Epoch: [4/100][750/765] Batch 0.394 (1.632) Remain 33:17:57 Loss 0.1216 Accuracy 94.29 [2022-11-18 16:13:33,778 INFO train.py line 345 16493] Train result at epoch [4/100]: mIoU / mAcc / OA 82.32 / 94.37 / 92.11 [2022-11-18 16:20:25,855 INFO train.py line 326 16493] Epoch: [5/100][250/765] Batch 0.859 (1.648) Remain 33:30:38 Loss 0.2021 Accuracy 92.22 Traceback (most recent call last): File "tool/train.py", line 494, in <module> mp.spawn(main_worker, nprocs=args.ngpus_per_node, args=(args.ngpus_per_node, args)) File "/home/user1/miniconda3/envs/repsurf-seg/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 230, in spawn return start_processes(fn, args, nprocs, join, daemon, start_method='spawn') File "/home/user1/miniconda3/envs/repsurf-seg/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 188, in start_processes while not context.join(): File "/home/user1/miniconda3/envs/repsurf-seg/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 136, in join signal_name=name torch.multiprocessing.spawn.ProcessExitedException: process 1 terminated with signal SIGKILL

    could you help me? thank U very much

    opened by Liuyunming1999 2
  • The problem about centroid in Umbrella

    The problem about centroid in Umbrella

    Dear author

    Why get the centroids by concatenating edges with edges.roll(-1, 2) ? # Algorithm 2 Pytorch-Style Pseudocode of Umbrella RepSurf pairs = concat([edges, edges.roll(-1, 2)], dim=-2) # [B,N,K,2,3] centroids = mean(pairs, dim=3) # [B,N,K,3]

    Why not get centroids by mean(edges, dim-2) directly? # edges: [B, N, K, 3]

    I'm confused.

    opened by Wen-ZhiCheng 0
  • IoU for each category in 6-fold cross validation of S3DIS

    IoU for each category in 6-fold cross validation of S3DIS

    Hi @hancyran,

    Thanks for open-sourcing your excellent work!

    I notice that you reported the results of mIoU, mAcc, OA of 6-fold S3DIS in table 2, could you please share with me the iou on each category, e.g., ceiling, floor, ...? just like what you did on table 6-9 in the supplementary material.

    Much appreciate it!

    opened by haibo-qiu 0
  • When I just use UmbrellaSurfaceConstructor in front of other networks, the training of the whole network becomes very slow

    When I just use UmbrellaSurfaceConstructor in front of other networks, the training of the whole network becomes very slow

    When I just use UmbrellaSurfaceConstructor in front of other networks, the training of the whole network becomes very slow, especially the loss stage, do you know the reason? The data size is the same as Repsurf, but the speed is much slower. Remove UmbrellaSurfaceConstructor, the speed will recover quickly.

    opened by ybc-ybc 1
  • Unable to reproduce the results on ModelNet40

    Unable to reproduce the results on ModelNet40

    Hello,

    I'm trying to reproduce the reported results on ModelNet40. I have written a data loader for ModelNet40 and I'm training it with all the implementation details in the paper (Appendix G). The maximum accuracy I'm getting is 92.8 which is way less than the reported numbers.

    Can you upload the code for ModelNet40?

    opened by khoshsirat-udel 10
Owner
Haoxi Ran
Haoxi Ran
Official code for the CVPR 2022 (oral) paper "Extracting Triangular 3D Models, Materials, and Lighting From Images".

nvdiffrec Joint optimization of topology, materials and lighting from multi-view image observations as described in the paper Extracting Triangular 3D

NVIDIA Research Projects 1.4k Jan 1, 2023
[CVPR 2022] CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation

CoTTA Code for our CVPR 2022 paper Continual Test-Time Domain Adaptation Prerequisite Please create and activate the following conda envrionment. To r

Qin Wang 87 Jan 8, 2023
[CVPR 2022 Oral] Rethinking Minimal Sufficient Representation in Contrastive Learning

Rethinking Minimal Sufficient Representation in Contrastive Learning PyTorch implementation of Rethinking Minimal Sufficient Representation in Contras

null 36 Nov 23, 2022
(CVPR 2022 - oral) Multi-View Depth Estimation by Fusing Single-View Depth Probability with Multi-View Geometry

Multi-View Depth Estimation by Fusing Single-View Depth Probability with Multi-View Geometry Official implementation of the paper Multi-View Depth Est

Bae, Gwangbin 138 Dec 28, 2022
[CVPR 2022 Oral] TubeDETR: Spatio-Temporal Video Grounding with Transformers

TubeDETR: Spatio-Temporal Video Grounding with Transformers Website • STVG Demo • Paper This repository provides the code for our paper. This includes

Antoine Yang 108 Dec 27, 2022
[CVPR 2022 Oral] Crafting Better Contrastive Views for Siamese Representation Learning

Crafting Better Contrastive Views for Siamese Representation Learning (CVPR 2022 Oral) 2022-03-29: The paper was selected as a CVPR 2022 Oral paper! 2

null 249 Dec 28, 2022
Code for "Neural 3D Scene Reconstruction with the Manhattan-world Assumption" CVPR 2022 Oral

News 05/10/2022 To make the comparison on ScanNet easier, we provide all quantitative and qualitative results of baselines here, including COLMAP, COL

ZJU3DV 365 Dec 30, 2022
[CVPR 2022 Oral] EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Estimation

EPro-PnP EPro-PnP: Generalized End-to-End Probabilistic Perspective-n-Points for Monocular Object Pose Estimation In CVPR 2022 (Oral). [paper] Hanshen

 同济大学智能汽车研究所综合感知研究组 ( Comprehensive Perception Research Group under Institute of Intelligent Vehicles, School of Automotive Studies, Tongji University) 842 Jan 4, 2023
The Pytorch code of "Joint Distribution Matters: Deep Brownian Distance Covariance for Few-Shot Classification", CVPR 2022 (Oral).

DeepBDC for few-shot learning        Introduction In this repo, we provide the implementation of the following paper: "Joint Distribution Matters: Dee

FeiLong 116 Dec 19, 2022
[CVPR 2022 Oral] Versatile Multi-Modal Pre-Training for Human-Centric Perception

Versatile Multi-Modal Pre-Training for Human-Centric Perception Fangzhou Hong1  Liang Pan1  Zhongang Cai1,2,3  Ziwei Liu1* 1S-Lab, Nanyang Technologic

Fangzhou Hong 96 Jan 3, 2023
Scribble-Supervised LiDAR Semantic Segmentation, CVPR 2022 (ORAL)

Scribble-Supervised LiDAR Semantic Segmentation Dataset and code release for the paper Scribble-Supervised LiDAR Semantic Segmentation, CVPR 2022 (ORA

null 102 Dec 25, 2022
Not All Points Are Equal: Learning Highly Efficient Point-based Detectors for 3D LiDAR Point Clouds (CVPR 2022, Oral)

Not All Points Are Equal: Learning Highly Efficient Point-based Detectors for 3D LiDAR Point Clouds (CVPR 2022, Oral) This is the official implementat

Yifan Zhang 259 Dec 25, 2022
[CVPR 2022] PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision (Oral)

PoseTriplet: Co-evolving 3D Human Pose Estimation, Imitation, and Hallucination under Self-supervision Kehong Gong*, Bingbing Li*, Jianfeng Zhang*, Ta

null 256 Dec 28, 2022
[CVPR 2022 Oral] MixFormer: End-to-End Tracking with Iterative Mixed Attention

MixFormer The official implementation of the CVPR 2022 paper MixFormer: End-to-End Tracking with Iterative Mixed Attention [Models and Raw results] (G

Multimedia Computing Group, Nanjing University 235 Jan 3, 2023
Temporally Efficient Vision Transformer for Video Instance Segmentation, CVPR 2022, Oral

Temporally Efficient Vision Transformer for Video Instance Segmentation Temporally Efficient Vision Transformer for Video Instance Segmentation (CVPR

Hust Visual Learning Team 203 Dec 31, 2022
Focal Sparse Convolutional Networks for 3D Object Detection (CVPR 2022, Oral)

Focal Sparse Convolutional Networks for 3D Object Detection (CVPR 2022, Oral) This is the official implementation of Focals Conv (CVPR 2022), a new sp

DV Lab 280 Jan 7, 2023
Official pytorch implementation of paper "Inception Convolution with Efficient Dilation Search" (CVPR 2021 Oral).

IC-Conv This repository is an official implementation of the paper Inception Convolution with Efficient Dilation Search. Getting Started Download Imag

Jie Liu 111 Dec 31, 2022
Official PyTorch implementation of RobustNet (CVPR 2021 Oral)

RobustNet (CVPR 2021 Oral): Official Project Webpage Codes and pretrained models will be released soon. This repository provides the official PyTorch

Sungha Choi 173 Dec 21, 2022
Official PyTorch Implementation of Convolutional Hough Matching Networks, CVPR 2021 (oral)

Convolutional Hough Matching Networks This is the implementation of the paper "Convolutional Hough Matching Network" by J. Min and M. Cho. Implemented

Juhong Min 70 Nov 22, 2022