Pre-Training 3D Point Cloud Transformers with Masked Point Modeling

Overview

Point-BERT: Pre-Training 3D Point Cloud Transformers with Masked Point Modeling

Created by Xumin Yu*, Lulu Tang*, Yongming Rao*, Tiejun Huang, Jie Zhou, Jiwen Lu

[arXiv] [Project Page] [Models]

This repository contains PyTorch implementation for Point-BERT:Pre-Training 3D Point Cloud Transformers with Masked Point Modeling.

Point-BERT is a new paradigm for learning Transformers to generalize the concept of BERT onto 3D point cloud. Inspired by BERT, we devise a Masked Point Modeling (MPM) task to pre-train point cloud Transformers. Specifically, we first divide a point cloud into several local patches, and a point cloud Tokenizer is devised via a discrete Variational AutoEncoder (dVAE) to generate discrete point tokens containing meaningful local information. Then, we randomly mask some patches of input point clouds and feed them into the backbone Transformer. The pre-training objective is to recover the original point tokens at the masked locations under the supervision of point tokens obtained by the Tokenizer.

intro

Pretrained Models

model dataset config url
dVAE ShapeNet config Tsinghua Cloud / BaiDuYun(code:26d3)
Point-BERT ShapeNet config Tsinghua Cloud / BaiDuYun(code:jvtg)
model dataset Acc. Acc. (vote) config url
Transformer ModelNet 92.67 93.24 config Tsinghua Cloud / BaiDuYun(code:tqow)
Transformer ModelNet 92.91 93.48 config Tsinghua Cloud / BaiDuYun(code:tcin)
Transformer ModelNet 93.19 93.76 config Tsinghua Cloud / BaiDuYun(code:k343)
Transformer ScanObjectNN 88.12 -- config Tsinghua Cloud / BaiDuYun(code:f0km)
Transformer ScanObjectNN 87.43 -- config Tsinghua Cloud / BaiDuYun(code:k3cb)
Transformer ScanObjectNN 83.07 -- config Tsinghua Cloud / BaiDuYun(code:rxsw)

Usage

Requirements

  • PyTorch >= 1.7.0
  • python >= 3.7
  • CUDA >= 9.0
  • GCC >= 4.9
  • torchvision
  • timm
  • open3d
  • tensorboardX
pip install -r requirements.txt

Building Pytorch Extensions for Chamfer Distance, PointNet++ and kNN

NOTE: PyTorch >= 1.7 and GCC >= 4.9 are required.

# Chamfer Distance
bash install.sh
# PointNet++
pip install "git+git://github.com/erikwijmans/Pointnet2_PyTorch.git#egg=pointnet2_ops&subdirectory=pointnet2_ops_lib"
# GPU kNN
pip install --upgrade https://github.com/unlimblue/KNN_CUDA/releases/download/0.2/KNN_CUDA-0.2-py3-none-any.whl

Dataset

We use ShapeNet for the training of dVAE and the pre-training of Point-BERT models. And finetuning the Point-BERT models on ModelNet, ScanObjectNN, ShapeNetPart

The details of used datasets can be found in DATASET.md.

dVAE

To train a dVAE by yourself, simply run:

bash scripts/train.sh <GPU_IDS>\
    --config cfgs/ShapeNet55_models/dvae.yaml \
    --exp_name <name>

Visualize the reconstruction results of a pre-trained dVAE, run: (default path: ./vis)

bash ./scripts/test.sh <GPU_IDS> \
    --ckpts <path>\
    --config cfgs/ShapeNet55_models/dvae.yaml\
    --exp_name <name>

Point-BERT pre-training

To pre-train the Point-BERT models on ShapeNet, simply run: (complete the ckpt in cfgs/Mixup_models/Point-BERT.yaml first )

bash ./scripts/dist_train_BERT.sh <NUM_GPU> <port>\
    --config cfgs/Mixup_models/Point-BERT.yaml \
    --exp_name pointBERT_pretrain 
    [--val_freq 10]

val_freq controls the frequence to evaluate the Transformer on ModelNet40 with LinearSVM.

Fine-tuning on downstream tasks

We finetune our Point-BERT on 4 downstream tasks: Classfication on ModelNet40, Few-shot learning on ModelNet40, Transfer learning on ScanObjectNN and Part segmentation on ShapeNetPart.

ModelNet40

To finetune a pre-trained Point-BERT model on ModelNet40, simply run:

# 1024 points
bash ./scripts/train_BERT.sh <GPU_IDS> \
    --config cfgs/ModelNet_models/PointTransformer.yaml\
    --finetune_model\
    --ckpts <path>\
    --exp_name <name>
# 4096 points
bash ./scripts/train_BERT.sh <GPU_IDS>\
    --config cfgs/ModelNet_models/PointTransformer_4096point.yaml\ 
    --finetune_model\ 
    --ckpts <path>\
    --exp_name <name>
# 8192 points
bash ./scripts/train_BERT.sh <GPU_IDS>\
    --config cfgs/ModelNet_models/PointTransformer_8192point.yaml\ 
    --finetune_model\ 
    --ckpts <path>\
    --exp_name <name>

To evaluate a model finetuned on ModelNet40, simply run:

bash ./scripts/test_BERT.sh <GPU_IDS>\
    --config cfgs/ModelNet_models/PointTransformer.yaml \
    --ckpts <path> \
    --exp_name <name>

Few-shot Learning on ModelNet40

We follow the few-shot setting in the previous work.

First, generate your own few-shot learning split or use the same split as us (see DATASET.md).

# generate few-shot learning split
cd datasets/
python generate_few_shot_data.py
# train and evaluate the Point-BERT
bash ./scripts/train_BERT.sh <GPU_IDS> \
    --config cfgs/Fewshot_models/PointTransformer.yaml \
    --finetune_model \
    --ckpts <path> \
    --exp_name <name> \
    --way <int> \
    --shot <int> \
    --fold <int>

ScanObjectNN

To finetune a pre-trained Point-BERT model on ScanObjectNN, simply run:

bash ./scripts/train_BERT.sh <GPU_IDS>  \
    --config cfgs/ScanObjectNN_models/PointTransformer_hardest.yaml \
    --finetune_model \
    --ckpts <path> \
    --exp_name <name>

To evaluate a model on ScanObjectNN, simply run:

bash ./scripts/test_BERT.sh <GPU_IDS>\
    --config cfgs/ScanObjectNN_models/PointTransformer_hardest.yaml \
    --ckpts <path> \
    --exp_name <name>

Part Segmentation

Code coming soon

Visualization

Masked point clouds reconstruction using our Point-BERT model trained on ShapeNet

results

License

MIT License

Citation

If you find our work useful in your research, please consider citing:

@article{yu2021pointbert,
  title={Point-BERT: Pre-Training 3D Point Cloud Transformers with Masked Point Modeling},
  author={Yu, Xumin and Tang, Lulu and Rao, Yongming and Huang, Tiejun and Zhou, Jie and Lu, Jiwen},
  journal={arXiv preprint},
  year={2021}
}
Comments
  • segmentation fault while evaluating

    segmentation fault while evaluating

    when start to validate for pretraining, segmentation fault occurs:

    ...... 2021-12-27 11:32:16,067 - Point-BERT - INFO - config.model.transformer_config.return_all_tokens : False2021-12-27 11:32:16,067 - Point-BERT - INFO - config.model.dvae_config = edict()2021-12-27 11:32:16,067 - Point-BERT - INFO - config.model.dvae_config.group_size : 322021-12-27 11:32:16,068 - Point-BERT - INFO - config.model.dvae_config.num_group : 64 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.model.dvae_config.encoder_dims : 256 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.model.dvae_config.num_tokens : 8192 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.model.dvae_config.tokens_dims : 256 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.model.dvae_config.decoder_dims : 256 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.model.dvae_config.ckpt : pretrain/dVAE.pth 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.total_bs : 128 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.step_per_update : 1 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.max_epoch : 300 2021-12-27 11:32:16,068 - Point-BERT - INFO - config.consider_metric : CDL1 2021-12-27 11:32:16,068 - Point-BERT - INFO - Distributed training: False 2021-12-27 11:32:16,068 - Point-BERT - INFO - Set random seed to 0, deterministic: False 2021-12-27 11:32:16,073 - ShapeNet-55 - INFO - [DATASET] sample out 1024 points 2021-12-27 11:32:16,074 - ShapeNet-55 - INFO - [DATASET] Open file /mnt/cache/liyanjie/data/pointcloud/ShapeNet55-34/ShapeNet-55/train.txt 2021-12-27 11:32:16,101 - ShapeNet-55 - INFO - [DATASET] Open file /mnt/cache/liyanjie/data/pointcloud/ShapeNet55-34/ShapeNet-55/test.txt 2021-12-27 11:32:16,174 - ShapeNet-55 - INFO - [DATASET] 52470 instances were loaded 2021-12-27 11:32:16,191 - ModelNet - INFO - The size of test data is 2468 2021-12-27 11:32:16,192 - ModelNet - INFO - Load processed data from /mnt/cache/liyanjie/data/pointcloud/ModelNet/modelnet40_normal_resampled/modelnet40_test_8192pts_fps.dat... 2021-12-27 11:32:16,993 - ModelNet - INFO - The size of train data is 9843 2021-12-27 11:32:16,994 - ModelNet - INFO - Load processed data from /mnt/cache/liyanjie/data/pointcloud/ModelNet/modelnet40_normal_resampled/modelnet40_train_8192pts_fps.dat... 2021-12-27 11:32:19,511 - Point_BERT - INFO - [Point_BERT] build dVAE_BERT ... 2021-12-27 11:32:19,511 - Point_BERT - INFO - [Point_BERT] Point_BERT [NOT] calc the loss for all token ... 2021-12-27 11:32:19,511 - dVAE BERT - INFO - [Transformer args] {'mask_ratio': [0.25, 0.45], 'trans_dim': 384, 'depth': 12, 'drop_path_rate': 0.1, 'cls_dim': 512, 'replace_pob': 0.0, 'num_heads' : 6, 'moco_loss': False, 'dvae_loss': True, 'cutmix_loss': True, 'return_all_tokens': False} 2021-12-27 11:32:22,489 - dVAE BERT - INFO - [Encoder] Successful Loading the ckpt for encoder from pretrain/dVAE.pth 2021-12-27 11:32:22,521 - dVAE BERT - INFO - [Transformer args] {'mask_ratio': [0.25, 0.45], 'trans_dim': 384, 'depth': 12, 'drop_path_rate': 0.1, 'cls_dim': 512, 'replace_pob': 0.0, 'num_heads' : 6, 'moco_loss': False, 'dvae_loss': True, 'cutmix_loss': True, 'return_all_tokens': False} 2021-12-27 11:32:23,612 - Point_BERT - INFO - [dVAE] Successful Loading the ckpt for dvae from pretrain/dVAE.pth 2021-12-27 11:32:23,638 - Point_BERT - INFO - [Point_BERT Group] cutmix_BERT divide point cloud into G64 x S32 points ...2021-12-27 11:32:34,314 - Point-BERT - INFO - [RESUME INFO] Loading model weights from ./experiments/Point-BERT/Mixup_models/pointBERT_pretrain/ckpt-last.pth...2021-12-27 11:32:38,565 - Point-BERT - INFO - [RESUME INFO] resume ckpts @ 9 epoch( best_metrics = {'acc': 0.0})2021-12-27 11:32:38,566 - Point-BERT - INFO - Using Data parallel ...2021-12-27 11:32:38,591 - Point-BERT - INFO - [RESUME INFO] Loading optimizer from ./experiments/Point-BERT/Mixup_models/pointBERT_pretrain/ckpt-last.pth...2021-12-27 11:32:39,640 - Point-BERT - INFO - [VALIDATION] Start validating epoch 10 error: Segmentation fault

    Any suggestions would be deeply appreciated~

    opened by leeyegy 10
  • Reproducing results with 1024 points on ModelNet40

    Reproducing results with 1024 points on ModelNet40

    Hi, thank you first for your great work Point-BERT! I am trying to running your code to reproduce the results with 1024 points on ModelNet40 (93.2% acc w/ voting).

    I fine tune Point-BERT on ModelNet40 (initialized the provided weights in your repo pretrained on ShapeNetPart). I am getting 92.26% accuracy with voting. I also evaluate with your model weights on ModelNet40, and can get 93.2% accuracy. Could you please advise if there is anything I did wrong in training (fine-tuning) on ModelNet40? Thank you!

    opened by haotian-liu 8
  • About test acc

    About test acc

    I noticed that you used farthest point sample in the testing phase, while others simply took the first 1024 points, or picked them at random. I tried to train a DGCNN classification model with farthest point sample and achieved 82.6 on the ScanObjectNN(PB T50 RS) test set, which is much higher than 78.1 for random sample. So I would like to know which method I should use to calculate the acc?

    opened by Xxiaoluohao 6
  • Part segmentation details

    Part segmentation details

    Hi,

    Thanks for your great work.

    May I ask when do you plan to release part segmentation codes?

    We are trying to reproduce the part segmentation results and meet some issues due to lack of details in paper and appendix. Regarding segmentation head, could you please provide more details about how the upsampled feature H4^, H8^ with H12 being propagated by 1 MLP and 8 DGCNN blocks?

    Looking forward to your kind reply.

    Best regards, Yatian

    opened by Pang-Yatian 6
  • an issue when install chamfer

    an issue when install chamfer

    /usr/bin/nvcc -I/home/ruizhe/miniconda3/envs/crzz/lib/python3.7/site-packages/torch/include -I/home/ruizhe/miniconda3/envs/crzz/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/ruizhe/miniconda3/envs/crzz/lib/python3.7/site-packages/torch/include/TH -I/home/ruizhe/miniconda3/envs/crzz/lib/python3.7/site-packages/torch/include/THC -I/home/ruizhe/miniconda3/envs/crzz/include/python3.7m -c chamfer.cu -o build/temp.linux-x86_64-3.7/chamfer.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=chamfer -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=sm_86 -std=c++14 nvcc fatal : Unsupported gpu architecture 'compute_86' error: command '/usr/bin/nvcc' failed with exit status 1

    Thanks a lot for your help!

    opened by zjuruizhechen 6
  • how to test the Few-shot classification  and what is the

    how to test the Few-shot classification and what is the "--fold"

    Hi, first of all, thank you for sharing the excellent work.

    1. I would like to ask, how to test few-shot learning? It seems that there are only train and validate codes for few-shot learning?

    2. I want to ask the meaning of the "--fold" parameter

    opened by TangYuan96 4
  • failed to build pointnet2_ops_lib

    failed to build pointnet2_ops_lib

    when run the command to build pointnet2_ops_lib, some errors occur: ......

    1.10.0.git.kitware.jobserver-1 g++ -pthread -shared -B /mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.4/compiler_compat -L/mnt/cache/share/spring/conda_envs/miniconda3/envs/s0.3.4/lib -Wl,-rpath=/mnt/cache/share/spring/conda_env s/miniconda3/envs/s0.3.4/lib -Wl,--no-as-needed -Wl,--sysroot=/ /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/group_points.o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86 _64-3.6/pointnet2_ops/_ext-src/src/bindings.o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/ball_query.o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_op s/_ext-src/src/sampling.o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/interpolate.o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/samp ling_gpu.o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/group_points_gpu.o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/ball_query_gpu .o /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/interpolate_gpu.o -L/mnt/cache/liyanjie/.local/lib/python3.6/site-packages/torch/lib -L/mnt/cache/share/cuda-10.2/lib64 -lc1 0 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.6/pointnet2_ops/_ext.cpython-36m-x86_64-linux-gnu.so g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/group_points.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/bindings.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/ball_query.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/sampling.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/interpolate.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/sampling_gpu.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/group_points_gpu.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/ball_query_gpu.o: No such file or directory g++: error: /tmp/pip-req-build-cn253nrh/build/temp.linux-x86_64-3.6/pointnet2_ops/_ext-src/src/interpolate_gpu.o: No such file or directory

    opened by leeyegy 4
  • Pre-training and Fine-tuning times

    Pre-training and Fine-tuning times

    Hey, Thanks for publishing the code, these are indeed very impressive results! Could you please elaborate on how long it took for the pre-training and fine-tuning and on what type of hardware?

    Thanks!

    opened by eliahuhorwitz 4
  • Questions about Point Patch Mixing

    Questions about Point Patch Mixing

    Dear authors, thank you for the great work! I have some questions about Point Patch Mixing (PPM) introduced in your paper.

    (1) Is PPM implemented with _mixup_pc(self, neighborhood, center, dvae_label) in the code?

    (2) In the specific implementation, is the "virtual sample" in the paper generated by flipping the batch, i.e., i-th sample will be mixed with n-i-th sample, where n is the batch size?

    Thank you!

    opened by haotian-liu 4
  • Could not reproduce results on ModelNet40

    Could not reproduce results on ModelNet40

    Dear author, Thanks for your sharing! I am trying to reproduce the results with the given checkpoint (Tsinghua Cloud). Here are my results:

    |Dataset|Best Acc|Best Acc (vote)| |--|--|--| |ModelNet40 (1k points)| 92.38/92.26 | 92.71/92.66 | |ModelNet40 (4k points)| 92.99 | 93.11 | |ModelNet40 (8k points)| 93.31 | 93.59 |

    For ModelNet40 (1k points), I have run it twice and both the two results are lower than the number you report (Acc=92.67, Vote Acc=93.24). Here are my questions:

    1. I am using PyTorch 1.7 with CUDA 11.0 on a single A100 GPU. For other packages, I follow your instructions and install them accordingly. I could obtain similar or slightly higher performance on ScanObjectNN. Could you successfully reproduce the performance of ModelNet40 (1K) and ModelNet40 (4K)?
    2. I find that, a checkpoint with the best accuracy doesn't mean it has the best vote accuracy. Does these two metrics (Acc & Vote Acc) are selected from different checkpoints?

    Thanks and hoping for your reply!

    opened by charlesCXK 3
  • An error when installing extensions

    An error when installing extensions

    hello, when installing the chamfer_dist, an unexpected error appears. The verions are: pythorch=1.11.0 cuda=10.2 gcc=5.5.0

    /usr/local/cuda/bin/nvcc -I/export2/CX2/anaconda3/envs/cross/lib/python3.7/site-packages/torch/include -I/export2/CX2/anacon
    da3/envs/cross/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/export2/CX2/anaconda3/envs/cross/lib/pyth
    on3.7/site-packages/torch/include/TH -I/export2/CX2/anaconda3/envs/cross/lib/python3.7/site-packages/torch/include/THC -I/us
    r/local/cuda/include -I/export2/CX2/anaconda3/envs/cross/include/python3.7m -c chamfer.cu -o build/temp.linux-x86_64-3.7/cha
    mfer.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPER
    ATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\
    " -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=chamfer -D_GLIBCXX_USE_CXX11_
    ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    /export2/CX2/anaconda3/envs/cross/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h: In
    instantiation of ‘std::shared_ptr<torch::nn::Module> torch::nn::Cloneable<Derived>::clone(const c10::optional<c10::Device>&)
     const [with Derived = torch::nn::CrossMapLRN2dImpl]’:
    /tmp/tmpxft_00009393_00000000-5_chamfer.cudafe1.stub.c:4:27:   required from here
    /export2/CX2/anaconda3/envs/cross/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:57:5
    9: error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::Orde
    redDict<std::basic_string<char>, at::Tensor>&’
    
    opened by cuixing61 3
  • ShapeNet55/34 Dataset

    ShapeNet55/34 Dataset

    The dataset files "ShapeNet55" downloaded by Google Cloud Drive contain only file "shapenet_pc". The dataset does not have "train.txt" and "test.txt" file. Can the author provide two txt files?

    opened by superYuezhang 2
  • Some problem about KNN

    Some problem about KNN

    Hi, when I run the main.py, I have some bugs with KNN. I want to know what's requirements when you run the program. My CUDA is 11, Torch is 1.8.1. Looking forward to your reply.

    opened by louyz1026 2
  • Taking the DGCNN output

    Taking the DGCNN output

    Hello,

    I want to have the output of the DGCNN network? In other words, i want to extract the tokens for every point cloud. how can i do this because i can't spot the implementation of tokenization graph. Please i need this info ASAP.

    Thank you.

    opened by AbdouBou 0
  • Problems related to pretraining Bert

    Problems related to pretraining Bert

    Hi! When I pretrain Bert, I get the following error every time at the validation of the first epoch(as shown in the first picture). I want to train for 3000 epochs, when I set--val_freq 3001, there is no error, but I can't get the Losses for each epoch(as shown in the second picture). Do you have any good suggestions, is this related to memory leaks? thank you for your reply!

    图片1

    175802719-486a924b-ec20-47bb-89c3-535bc129f1cd

    opened by sw778 1
  • pretrain dvae chamfer problem

    pretrain dvae chamfer problem

    Thanks a lot for your help! 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test = edict() 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test.base = edict() 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test.base.NAME : ShapeNet 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test.base.DATA_PATH : data/ShapeNet55-34/ShapeNet-55 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test.base.N_POINTS : 8192 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test.base.PC_PATH : data/ShapeNet55-34/shapenet_pc 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test.others = edict() 2022-06-21 13:48:35,473 - dvae - INFO - config.dataset.test.others.subset : test 2022-06-21 13:48:35,474 - dvae - INFO - config.dataset.test.others.npoints : 1024 2022-06-21 13:48:35,474 - dvae - INFO - config.dataset.test.others.bs : 1 2022-06-21 13:48:35,474 - dvae - INFO - config.model = edict() 2022-06-21 13:48:35,474 - dvae - INFO - config.model.NAME : DiscreteVAE 2022-06-21 13:48:35,474 - dvae - INFO - config.model.group_size : 32 2022-06-21 13:48:35,474 - dvae - INFO - config.model.num_group : 64 2022-06-21 13:48:35,474 - dvae - INFO - config.model.encoder_dims : 256 2022-06-21 13:48:35,474 - dvae - INFO - config.model.num_tokens : 8192 2022-06-21 13:48:35,474 - dvae - INFO - config.model.tokens_dims : 256 2022-06-21 13:48:35,474 - dvae - INFO - config.model.decoder_dims : 256 2022-06-21 13:48:35,474 - dvae - INFO - config.total_bs : 64 2022-06-21 13:48:35,475 - dvae - INFO - config.step_per_update : 1 2022-06-21 13:48:35,475 - dvae - INFO - config.max_epoch : 300 2022-06-21 13:48:35,475 - dvae - INFO - config.consider_metric : CDL1 2022-06-21 13:48:35,475 - dvae - INFO - Distributed training: False 2022-06-21 13:48:35,475 - dvae - INFO - Set random seed to 0, deterministic: False 2022-06-21 13:48:35,476 - ShapeNet-55 - INFO - [DATASET] sample out 1024 points 2022-06-21 13:48:35,476 - ShapeNet-55 - INFO - [DATASET] Open file data/ShapeNet55-34/ShapeNet-55/train.txt 2022-06-21 13:48:35,514 - ShapeNet-55 - INFO - [DATASET] 41952 instances were loaded 2022-06-21 13:48:35,515 - ShapeNet-55 - INFO - [DATASET] sample out 1024 points 2022-06-21 13:48:35,515 - ShapeNet-55 - INFO - [DATASET] Open file data/ShapeNet55-34/ShapeNet-55/test.txt 2022-06-21 13:48:35,522 - ShapeNet-55 - INFO - [DATASET] 10518 instances were loaded 2022-06-21 13:48:38,979 - dvae - INFO - Using Data parallel ... Traceback (most recent call last): File "main.py", line 72, in main() File "main.py", line 68, in main run_net(args, config, train_writer, val_writer) File "/home/ubuntu/E21201078/Point-BERT-master/tools/runner.py", line 132, in run_net loss_1, loss_2 = base_model.module.get_loss(ret, points) File "/home/ubuntu/E21201078/Point-BERT-master/models/dvae.py", line 320, in get_loss loss_recon = self.recon_loss(ret, gt) File "/home/ubuntu/E21201078/Point-BERT-master/models/dvae.py", line 310, in recon_loss loss_coarse_block = self.loss_func_cdl1(coarse, group_gt) File "/home/ubuntu/E21201078/common/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/home/ubuntu/E21201078/Point-BERT-master/extensions/chamfer_dist/init.py", line 79, in forward dist1, dist2 = ChamferFunction.apply(xyz1, xyz2) File "/home/ubuntu/E21201078/Point-BERT-master/extensions/chamfer_dist/init.py", line 16, in forward dist1, dist2, idx1, idx2 = chamfer.forward(xyz1, xyz2) AttributeError: module 'chamfer' has no attribute 'forward' (common) (base) ubuntu@ahu:~/E21201078/Point-BERT-master$

    Thanks a lot for your help!

    opened by zhangdongwei1998 1
Owner
Lulu Tang
Lulu Tang
VIMPAC: Video Pre-Training via Masked Token Prediction and Contrastive Learning

This is a release of our VIMPAC paper to illustrate the implementations. The pretrained checkpoints and scripts will be soon open-sourced in HuggingFace transformers.

Hao Tan 74 Dec 3, 2022
The official code for PRIMER: Pyramid-based Masked Sentence Pre-training for Multi-document Summarization

PRIMER The official code for PRIMER: Pyramid-based Masked Sentence Pre-training for Multi-document Summarization. PRIMER is a pre-trained model for mu

AI2 114 Jan 6, 2023
VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training

Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training [Arxiv] VideoMAE: Masked Autoencoders are Data-Efficient Learne

Multimedia Computing Group, Nanjing University 697 Jan 7, 2023
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
EMNLP 2021 - Frustratingly Simple Pretraining Alternatives to Masked Language Modeling

Frustratingly Simple Pretraining Alternatives to Masked Language Modeling This is the official implementation for "Frustratingly Simple Pretraining Al

Atsuki Yamaguchi 31 Nov 18, 2022
SimMIM: A Simple Framework for Masked Image Modeling

SimMIM By Zhenda Xie*, Zheng Zhang*, Yue Cao*, Yutong Lin, Jianmin Bao, Zhuliang Yao, Qi Dai and Han Hu*. This repo is the official implementation of

Microsoft 181 Dec 10, 2021
Code and pre-trained models for MultiMAE: Multi-modal Multi-task Masked Autoencoders

MultiMAE: Multi-modal Multi-task Masked Autoencoders Roman Bachmann*, David Mizrahi*, Andrei Atanov, Amir Zamir Website | arXiv | BibTeX Official PyTo

Visual Intelligence & Learning Lab, Swiss Federal Institute of Technology (EPFL) 385 Jan 6, 2023
SeMask: Semantically Masked Transformers for Semantic Segmentation.

SeMask: Semantically Masked Transformers Jitesh Jain, Anukriti Singh, Nikita Orlov, Zilong Huang, Jiachen Li, Steven Walton, Humphrey Shi This repo co

Picsart AI Research (PAIR) 186 Dec 30, 2022
[ICCV 2021 Oral] PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers

PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers Created by Xumin Yu*, Yongming Rao*, Ziyi Wang, Zuyan Liu, Jiwen Lu, Jie Zhou

Xumin Yu 317 Dec 26, 2022
REGTR: End-to-end Point Cloud Correspondences with Transformers

REGTR: End-to-end Point Cloud Correspondences with Transformers This repository contains the source code for REGTR. REGTR utilizes multiple transforme

Zi Jian Yew 108 Dec 17, 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
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
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
[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
[CVPR2021 Oral] UP-DETR: Unsupervised Pre-training for Object Detection with Transformers

UP-DETR: Unsupervised Pre-training for Object Detection with Transformers This is the official PyTorch implementation and models for UP-DETR paper: @a

dddzg 430 Dec 23, 2022
MPRNet-Cloud-removal: Progressive cloud removal

MPRNet-Cloud-removal Progressive cloud removal Requirements 1.Pytorch >= 1.0 2.Python 3 3.NVIDIA GPU + CUDA 9.0 4.Tensorboard Installation 1.Clone the

Semi 95 Dec 18, 2022
MADE (Masked Autoencoder Density Estimation) implementation in PyTorch

pytorch-made This code is an implementation of "Masked AutoEncoder for Density Estimation" by Germain et al., 2015. The core idea is that you can turn

Andrej 498 Dec 30, 2022
Unofficial PyTorch implementation of Masked Autoencoders Are Scalable Vision Learners

Unofficial PyTorch implementation of Masked Autoencoders Are Scalable Vision Learners This repository is built upon BEiT, thanks very much! Now, we on

Zhiliang Peng 2.3k Jan 4, 2023
PyTorch implementation of Masked Autoencoders Are Scalable Vision Learners for self-supervised ViT.

MAE for Self-supervised ViT Introduction This is an unofficial PyTorch implementation of Masked Autoencoders Are Scalable Vision Learners for self-sup

null 36 Oct 30, 2022