Compute descriptors for 3D point cloud registration using a multi scale sparse voxel architecture

Overview

MS-SVConv : 3D Point Cloud Registration with Multi-Scale Architecture and Self-supervised Fine-tuning

Compute features for 3D point cloud registration. The article is available on Arxiv. It relies on:

  • A multi scale sparse voxel architecture
  • Self-supervised fine-tuning The combination of both allows better generalization capabilities and transfer across different datasets.

The code is available on the torch-points3d repository. This repository is to show how to launch the code for training and testing.

Demo

If you want to try MS-SVConv without installing anything on your computer, A Google colab notebook is available here (it takes few minutes to install everything). In the colab, we compute features using MS-SVConv and use Ransac (implementation of Open3D) to compute the transformation. You can try on 3DMatch on ETH. With this notebook, you can directly use the pretrained model on your project !

Installation

The code have been tried on an NVDIA RTX 1080 Ti with CUDA version 10.1. The OS was Ubuntu 18.04.

Installation for training and evaluation

This installation step is necessary if you want to train and evaluate MS-SVConv.

first you need, to clone the torch-points3d repository

git clone https://github.com/nicolas-chaulet/torch-points3d.git

Torch-points3d uses poetry to manage the packages. after installing Poetry, run :

poetry install --no-root

Activate the environnement

poetry shell

If you want to train MS-SVConv on 3DMatch, you will need pycuda (It's optional for testing).

pip install pycuda

You will also need to install Minkowski Engine and torchsparse Finally, you will need TEASER++ for testing.

If you have problems with installation (espaecially with pytorch_geometric), please visit the Troubleshooting section of torch-points3d page.

Training

registration

If you want to train MS-SVConv with 3 heads starting at the scale 2cm, run this command:

poetry run python train.py task=registration model_type=ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head dataset=fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True training.epochs=200 eval_frequency=10

automatically, the code will call the right yaml file in conf/data/registration for the dataset and conf/model/registration for the model. If you just want to train MS-SVConv with 1 head, run this command

poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_1head data=registration/fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True epochs=200 eval_frequency=10

You can modify some hyperparameters directly on the command line. For example, if you want to change the learning rate of 1e-2, you can run:

poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_1head data=registration/fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True epochs=200 eval_frequency=10 optim.base_lr=1e-2

To resume training:

poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True epochs=200 eval_frequency=10 checkpoint_dir=/path/of/directory/containing/pretrained/model

WARNING : On 3DMatch, you will need a lot of disk space because the code will download the RGBD image on 3DMatch and build the fragments from scratch. Also the code takes time (few hours).

For 3DMatch, it was supervised training because the pose is necessary. But we can also fine-tune in a self-supervised fashion (without needing the pose).

To train on Modelnet run this command:

poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/modelnet_sparse_ss training=sparse_fragment_reg tracker_options.make_submission=True epochs=200 eval_frequency=10

To fine-tune on ETH run this command (First, download the pretrained model from 3DMatch here):

poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B4cm_X2_3head data=registration/eth_base training=sparse_fragment_reg_finetune tracker_options.make_submission=True epochs=200 eval_frequency=10 models.path_pretrained=/path/to/your/pretrained/model.pt

To fine-tune on TUM, run this command:

poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B4cm_X2_3head data=registration/testtum_ss training=sparse_fragment_reg_finetune tracker_options.make_submission=True epochs=200 eval_frequency=10 models.path_pretrained=/path/to/your/pretrained/model.pt

For all these command, it will save in outputs directory log of the training, it will save a .pt file which is the weights of

semantic segmentation

You can also train MS-SVConv on scannet for semantic segmentation. To do this simply run:

poetry run python train.py task=segmentation models=segmentation/ms_svconv_base model_name=MS_SVCONV_B4cm_X2_3head lr_scheduler.params.gamma=0.9922 data=segmentation/scannet-sparse training=minkowski_scannet tracker_options.make_submission=False tracker_options.full_res=False data.process_workers=1 wandb.log=True eval_frequency=10 batch_size=4

And you can easily transfer from registration to segmantation, with this command:

poetry run python train.py task=segmentation models=segmentation/ms_svconv_base model_name=MS_SVCONV_B4cm_X2_3head lr_scheduler.params.gamma=0.9922 data=segmentation/scannet-sparse training=minkowski_scannet tracker_options.make_submission=False tracker_options.full_res=False data.process_workers=1 wandb.log=True eval_frequency=10 batch_size=4 models.path_pretrained=/path/to/your/pretrained/model.pt

Evaluation

If you want to evaluate the models on 3DMatch, download the model here and run:

poetry run python scripts/test_registration_scripts/evaluate.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/fragment3dmatch training=sparse_fragment_reg cuda=True data.sym=True checkpoint_dir=/directory/of/the/models/

on ETH (model here),

poetry run python scripts/test_registration_scripts/evaluate.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B4cm_X2_3head data=registration/eth_base training=sparse_fragment_reg cuda=True data.sym=True checkpoint_dir=/directory/of/the/models/

on TUM (model here),

poetry run python scripts/test_registration_scripts/evaluate.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/testtum_ss training=sparse_fragment_reg cuda=True data.sym=True checkpoint_dir=/directory/of/the/models/

You can also visualize matches, you can run:

python scripts/test_registration_scripts/see_matches.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B4cm_X2_3head data=registration/eth_base training=sparse_fragment_reg cuda=True data.sym=True checkpoint_dir=/directory/of/the/models/ data.first_subsampling=0.04 +ind=548 +t=22

You should obtain this image

Model Zoo

You can find all the pretrained model (More will be added in the future)

citation

If you like our work, please cite it :

@inproceedings{horache2021mssvconv,
      title={3D Point Cloud Registration with Multi-Scale Architecture and Self-supervised Fine-tuning},
      author={Sofiane Horache and Jean-Emmanuel Deschaud and François Goulette},
      year={2021},
      journal={arXiv preprint arXiv:2103.14533}
}

And if you use ETH, 3DMatch, TUM or ModelNet as dataset, please cite the respective authors.

TODO

  • Add other pretrained models on the model zoo
  • Add others datasets such as KITTI Dataset
Comments
  • A question about the testing result.

    A question about the testing result.

    Hi, first of all, thank you for your help many times before. I don't mean to be rude, but I tested your published model 'MS_SVCONV_B2cm_X2_3head.pt 'at different sample points (5000, 2500, 1000, 500, 250) and I could only get between 92-96% of data (95.3%, 95.1%, 94.7%, 94.4%, 92.1%), not as good performance as in your paper. My test setup is based on what you posted. Is there something wrong with my Settings? I tested SpinNet, FCGF and other models, and the results were close to the paper. I don't think it's the environment.

    opened by QWTforGithub 11
  • Can you give the data from 0.00-0.20 results?

    Can you give the data from 0.00-0.20 results?

    Hi,I would like to make some experimental comparisons according to your work. Could you give me the Feat Macthing Ratio from 0.00 to 0.20? The results I run by myself may not meet the requirements of the results you run, so I hope you can give me, thank you.

    Looking forward your reply.

    opened by QWTforGithub 6
  • Error running notebook demo

    Error running notebook demo

    Hi, an error happed when running the Google colab notebook:

    INFO - 2021-06-13 07:40:21,390 - model_checkpoint - Loading checkpoint from models/MS_SVCONV_2cm_X2_3head_3dm.pt invalid syntax (, line 1)

    ConfigAttributeError Traceback (most recent call last) in () 19 } 20 ---> 21 model = PretainedRegistry.from_file(pcd_model[choice_model], mock_property={}) 22 23 data_s = pcd_DAchoice_model

    10 frames /usr/local/lib/python3.7/dist-packages/torch_points3d/applications/pretrained_api.py in from_file(path, weight_name, mock_property) 166 dataset = instantiate_dataset(checkpoint.data_config) 167 --> 168 model: BaseModel = checkpoint.create_model(dataset, weight_name=weight_name) 169 BaseDataset.set_transform(model, checkpoint.data_config) 170 return model

    /usr/local/lib/python3.7/dist-packages/torch_points3d/metrics/model_checkpoint.py in create_model(self, dataset, weight_name) 183 if not self.is_empty: 184 run_config = copy.deepcopy(self._checkpoint.run_config) --> 185 model = instantiate_model(OmegaConf.create(run_config), dataset) 186 if hasattr(self._checkpoint, "model_props"): 187 for k, v in self._checkpoint.model_props.items():

    /usr/local/lib/python3.7/dist-packages/torch_points3d/models/model_factory.py in instantiate_model(config, dataset) 42 % (model_module, class_name) 43 ) ---> 44 model = model_cls(model_config, "dummy", dataset, modellib) 45 return model

    /usr/local/lib/python3.7/dist-packages/torch_points3d/models/registration/ms_svconv3d.py in init(self, option, model_type, dataset, modules) 192 option_unet.backbone, 193 input_nc=option_unet.input_nc, --> 194 pointnet_nn=option_unet.pointnet_nn, 195 post_mlp_nn=option_unet.post_mlp_nn, 196 pre_mlp_nn=option_unet.pre_mlp_nn,

    /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in getattr(self, key) 352 except ConfigKeyError as e: 353 self._format_and_raise( --> 354 key=key, value=None, cause=e, type_override=ConfigAttributeError 355 ) 356 except Exception as e:

    /usr/local/lib/python3.7/dist-packages/omegaconf/base.py in _format_and_raise(self, key, value, cause, type_override) 194 msg=str(cause), 195 cause=cause, --> 196 type_override=type_override, 197 ) 198 assert False

    /usr/local/lib/python3.7/dist-packages/omegaconf/_utils.py in format_and_raise(node, key, value, msg, cause, type_override) 819 ex.ref_type_str = ref_type_str 820 --> 821 _raise(ex, cause) 822 823

    /usr/local/lib/python3.7/dist-packages/omegaconf/_utils.py in _raise(ex, cause) 717 else: 718 ex.cause = None --> 719 raise ex.with_traceback(sys.exc_info()[2]) # set end OC_CAUSE=1 for full backtrace 720 721

    /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in getattr(self, key) 349 350 try: --> 351 return self._get_impl(key=key, default_value=DEFAULT_MARKER) 352 except ConfigKeyError as e: 353 self._format_and_raise(

    /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in _get_impl(self, key, default_value) 436 def _get_impl(self, key: DictKeyType, default_value: Any) -> Any: 437 try: --> 438 node = self._get_node(key=key, throw_on_missing_key=True) 439 except (ConfigAttributeError, ConfigKeyError): 440 if default_value is not DEFAULT_MARKER:

    /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in _get_node(self, key, validate_access, throw_on_missing_value, throw_on_missing_key) 468 if value is None: 469 if throw_on_missing_key: --> 470 raise ConfigKeyError(f"Missing key {key}") 471 elif throw_on_missing_value and value._is_missing(): 472 raise MissingMandatoryValue("Missing mandatory value")

    ConfigAttributeError: Missing key pointnet_nn full_key: models.MS_SVCONV_B2cm_X2_3head.option_unet.pointnet_nn object_type=dict

    opened by wingvortex 5
  • AttributeError: 'Data' object has no attribute 'origin_id'

    AttributeError: 'Data' object has no attribute 'origin_id'

    Hello, when running

    poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True training.epochs=200 eval_frequency=10
    

    I encountered the following error after 10 epochs of training:

    Traceback (most recent call last):
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/train.py", line 14, in main
        trainer.train()
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/trainer.py", line 148, in train
        self._test_epoch(epoch, "val")
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/trainer.py", line 238, in _test_epoch
        if not self._dataset.has_labels(stage_name) and not self.tracker_options.get("make_submission", False): # No label, no submission -> do nothing
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/base_dataset.py", line 391, in has_labels
        sample = dataset[0]
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/base3dmatch.py", line 305, in __getitem__
        data = self.get(idx)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/general3dmatch.py", line 289, in get
        return self.get_fragment(idx)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/base_siamese_dataset.py", line 158, in get_fragment
        pair = tracked_matches(data_source, data_target, new_pair)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/utils.py", line 308, in tracked_matches
        mask_s = np.isin(pair_np[:, 0], data_s.origin_id.numpy())
    AttributeError: 'Data' object has no attribute 'origin_id'
    
    Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
    wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.
    wandb:                                                                                
    wandb: 
    wandb: Run history:
    wandb:      epoch ▁▂▃▃▄▅▆▆▇█
    wandb: train_loss █▄▂▁▂▂▃▂▃▂
    wandb: 
    wandb: Run summary:
    wandb:      epoch 10
    wandb: train_loss 1.08478
    wandb: 
    wandb: Synced 3dmatch: https://wandb.ai/ramdrop/registration/runs/3rbevo3m
    wandb: Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 3 other file(s)
    wandb: Find logs at: ./outputs/2022-04-27/21-52-40/wandb/run-20220427_215241-3rbevo3m/logs
    

    My system configuration:

    • System: Ubuntu 18.04
    • PyTorch 1.9.0 + CUDA 11.1, A100
    (torch-points3d-s_H0q_C5-py3.9) (base) torch-points3d$ pip list
    Package                           Version
    --------------------------------- ------------
    absl-py                           1.0.0
    addict                            2.4.0
    aiohttp                           3.7.4.post0
    alabaster                         0.7.12
    antlr4-python3-runtime            4.8
    anyio                             3.5.0
    appdirs                           1.4.4
    argon2-cffi                       21.1.0
    async-timeout                     3.0.1
    attrs                             21.2.0
    autobahn                          21.3.1
    Automat                           20.2.0
    Babel                             2.9.1
    backcall                          0.2.0
    backports.entry-points-selectable 1.1.0
    beautifulsoup4                    4.11.1
    bleach                            4.1.0
    cachetools                        4.2.2
    certifi                           2021.5.30
    cffi                              1.14.6
    chardet                           4.0.0
    charset-normalizer                2.0.6
    click                             8.1.2
    constantly                        15.1.0
    cryptography                      3.4.8
    cycler                            0.10.0
    debugpy                           1.4.3
    decorator                         5.1.0
    defusedxml                        0.7.1
    deprecation                       2.1.0
    distlib                           0.3.3
    docker-pycreds                    0.4.0
    docutils                          0.17.1
    entrypoints                       0.3
    fastjsonschema                    2.15.3
    filelock                          3.1.0
    gdown                             4.4.0
    gitdb                             4.0.7
    GitPython                         3.1.27
    google-auth                       1.35.0
    google-auth-oauthlib              0.4.6
    googledrivedownloader             0.4
    graphql-core                      1.1
    grpcio                            1.44.0
    h5py                              3.6.0
    hydra-core                        1.0.5
    hyperlink                         21.0.0
    idna                              3.2
    imageio                           2.18.0
    imagesize                         1.2.0
    importlib-metadata                4.11.3
    incremental                       21.3.0
    install                           1.3.5
    ipykernel                         6.4.1
    ipython                           7.28.0
    ipython-genutils                  0.2.0
    ipywidgets                        7.7.0
    isodate                           0.6.0
    jedi                              0.18.0
    Jinja2                            3.1.1
    joblib                            1.0.1
    json5                             0.9.6
    jsonpatch                         1.32
    jsonpointer                       2.1
    jsonschema                        4.4.0
    jupyter-client                    7.0.3
    jupyter-core                      4.8.1
    jupyter-packaging                 0.12.0
    jupyter-server                    1.16.0
    jupyterlab                        3.3.4
    jupyterlab-pygments               0.1.2
    jupyterlab-server                 2.13.0
    jupyterlab-widgets                1.0.2
    kiwisolver                        1.3.2
    laspy                             2.1.2
    lazy-object-proxy                 1.6.0
    llvmlite                          0.38.0
    Mako                              1.2.0
    Markdown                          3.3.6
    MarkupSafe                        2.0.1
    matplotlib                        3.4.3
    matplotlib-inline                 0.1.3
    MinkowskiEngine                   0.5.4
    mistune                           0.8.4
    multidict                         5.1.0
    nbclassic                         0.3.7
    nbclient                          0.5.4
    nbconvert                         6.5.0
    nbformat                          5.3.0
    nest-asyncio                      1.5.1
    networkx                          2.6.3
    ninja                             1.10.2.3
    notebook                          6.4.4
    notebook-shim                     0.1.0
    numba                             0.55.1
    numpy                             1.19.5
    oauthlib                          3.1.1
    omegaconf                         2.0.6
    open3d                            0.15.2
    packaging                         21.0
    pandas                            1.4.2
    pandocfilters                     1.5.0
    param                             1.11.1
    parso                             0.8.2
    pathtools                         0.1.2
    pexpect                           4.8.0
    pickleshare                       0.7.5
    Pillow                            8.3.2
    pip                               22.0.4
    platformdirs                      2.4.0
    plyfile                           0.7.4
    prometheus-client                 0.11.0
    promise                           2.3
    prompt-toolkit                    3.0.20
    protobuf                          3.20.1
    psutil                            5.9.0
    ptyprocess                        0.7.0
    pyasn1                            0.4.8
    pyasn1-modules                    0.2.8
    pycparser                         2.20
    pycuda                            2020.1
    Pygments                          2.10.0
    pyparsing                         2.4.7
    pyquaternion                      0.9.9
    pyrsistent                        0.18.0
    PySocks                           1.7.1
    python-dateutil                   2.8.2
    python-louvain                    0.16
    pytools                           2022.1.4
    pytorch-metric-learning           1.3.0
    pytz                              2021.1
    pyvista                           0.34.1
    PyWavelets                        1.3.0
    PyYAML                            5.4.1
    pyzmq                             22.3.0
    rdflib                            6.1.1
    requests                          2.26.0
    requests-oauthlib                 1.3.0
    rsa                               4.7.2
    scikit-image                      0.19.2
    scikit-learn                      1.0
    scipy                             1.6.1
    scooby                            0.5.12
    Send2Trash                        1.8.0
    sentry-sdk                        1.5.10
    setproctitle                      1.2.3
    setuptools                        62.1.0
    shortuuid                         1.0.8
    six                               1.16.0
    smmap                             4.0.0
    sniffio                           1.2.0
    snowballstemmer                   2.1.0
    soupsieve                         2.3.2.post1
    sphinxcontrib-applehelp           1.0.2
    sphinxcontrib-devhelp             1.0.2
    sphinxcontrib-htmlhelp            2.0.0
    sphinxcontrib-jsmath              1.0.1
    sphinxcontrib-qthelp              1.0.3
    sphinxcontrib-serializinghtml     1.1.5
    tensorboard                       2.8.0
    tensorboard-data-server           0.6.1
    tensorboard-plugin-wit            1.8.1
    terminado                         0.12.1
    testpath                          0.5.0
    threadpoolctl                     2.2.0
    tifffile                          2022.4.22
    tinycss2                          1.1.1
    tomlkit                           0.10.2
    torch                             1.9.0+cu111
    torch-cluster                     1.6.0
    torch-geometric                   1.7.2
    torch-points-kernels              0.7.0
    torch-scatter                     2.0.9
    torch-sparse                      0.6.12
    torch-spline-conv                 1.2.1
    torchaudio                        0.9.0
    torchfile                         0.1.0
    torchnet                          0.0.4
    torchsparse                       1.4.0
    torchvision                       0.10.0+cu111
    tornado                           6.1
    tqdm                              4.64.0
    traitlets                         5.1.0
    Twisted                           21.7.0
    txaio                             21.2.1
    typing-extensions                 3.10.0.2
    urllib3                           1.26.7
    visdom                            0.1.8.9
    vtk                               9.1.0
    wandb                             0.12.15
    wcwidth                           0.2.5
    webencodings                      0.5.1
    websocket-client                  1.2.1
    Werkzeug                          2.1.1
    wheel                             0.37.1
    widgetsnbextension                3.6.0
    wrapt                             1.12.1
    wslink                            1.0.7
    yacs                              0.1.8
    yapf                              0.32.0
    yarl                              1.6.3
    zipp                              3.8.0
    zope.interface                    5.4.0
    

    Do you have any idea how to solve it?

    opened by ramdrop 4
  • A question about MS-SVconv code.

    A question about MS-SVconv code.

    Thank you very much for releasing the code on torch - points3D. Now I want to further work on your work, I hope to have clean code on MS-SVconv, can you publish it? It is very troublesome to modify the part of MS-SVconv directly in torch-points3D.

    Looking forward to your reply.

    opened by QWTforGithub 4
  • CUDA out of memory

    CUDA out of memory

    Hi humanpose1

    I have tested your code and its worked perfectly. but I had a bug CUDA out of memory when testing a file about 900 MB.

    I also tried to reduce with

    import torch import gc for obj in gc.get_objects(): try: if torch.is_tensor(obj) or (hasattr(obj, 'data') and torch.is_tensor(obj.data)): print(type(obj), obj.size()) except: pass

    but still not working. Could you give me some idea about this problem? Thank you so much.


    RuntimeError Traceback (most recent call last)

    in 3 # Compute the matches 4 with torch.no_grad(): ----> 5 model.set_input(data_s, "cuda") 6 feat_s = model.forward() 7 model.set_input(data_t, "cuda")

    ~/.local/lib/python3.8/site-packages/torch_points3d/models/registration/ms_svconv3d.py in set_input(self, data, device) 104 def set_input(self, data, device): 105 self.input, self.input_target = data.to_data() --> 106 self.input = self.input.to(device) 107 if getattr(data, "pos_target", None) is not None: 108 self.input_target = self.input_target.to(device)

    ~/.local/lib/python3.8/site-packages/torch_geometric/data/data.py in to(self, device, *keys, **kwargs) 338 If :obj:*keys is not given, the conversion is applied to all present 339 attributes.""" --> 340 return self.apply(lambda x: x.to(device, **kwargs), *keys) 341 342 def cpu(self, *keys):

    ~/.local/lib/python3.8/site-packages/torch_geometric/data/data.py in apply(self, func, *keys) 324 """ 325 for key, item in self(*keys): --> 326 self[key] = self.apply(item, func) 327 return self 328

    ~/.local/lib/python3.8/site-packages/torch_geometric/data/data.py in apply(self, item, func) 303 def apply(self, item, func): 304 if torch.is_tensor(item): --> 305 return func(item) 306 elif isinstance(item, SparseTensor): 307 # Not all apply methods are supported for SparseTensor, e.g.,

    ~/.local/lib/python3.8/site-packages/torch_geometric/data/data.py in (x) 338 If :obj:*keys is not given, the conversion is applied to all present 339 attributes.""" --> 340 return self.apply(lambda x: x.to(device, **kwargs), *keys) 341 342 def cpu(self, *keys):

    RuntimeError: CUDA out of memory. Tried to allocate 14.00 MiB (GPU 0; 1.95 GiB total capacity; 332.44 MiB already allocated; 11.81 MiB free; 350.00 MiB reserved in total by PyTorch)

    opened by trinhnhut-gif 4
  • A bug with torch

    A bug with torch

    Hi guys, I have a bug when running your code. when I run in Registration part. I have a problem below. I also try with my machine but also have same problem. I hope you can give me some suggestion. Thank you so much


    OSError Traceback (most recent call last)

    in () 6 import requests 7 import torch ----> 8 from torch_points3d.applications.pretrained_api import PretainedRegistry 9 from torch_points3d.core.data_transform import GridSampling3D, AddFeatByKey, AddOnes, Random3AxisRotation 10 from torch_points3d.datasets.registration.pair import Pair

    8 frames

    /usr/local/lib/python3.7/dist-packages/torch_points3d/applications/pretrained_api.py in () 5 6 # Import building function for model and dataset ----> 7 from torch_points3d.datasets.dataset_factory import instantiate_dataset 8 from torch_points3d.models.model_factory import instantiate_model 9

    /usr/local/lib/python3.7/dist-packages/torch_points3d/datasets/dataset_factory.py in () 4 import logging 5 ----> 6 from torch_points3d.datasets.base_dataset import BaseDataset 7 8 log = logging.getLogger(name)

    /usr/local/lib/python3.7/dist-packages/torch_points3d/datasets/base_dataset.py in () 6 import numpy as np 7 import torch ----> 8 import torch_geometric 9 from torch_geometric.transforms import Compose, FixedPoints 10 import copy

    /usr/local/lib/python3.7/dist-packages/torch_geometric/init.py in () 3 4 from .debug import is_debug_enabled, debug, set_debug ----> 5 import torch_geometric.data 6 import torch_geometric.transforms 7 import torch_geometric.utils

    /usr/local/lib/python3.7/dist-packages/torch_geometric/data/init.py in () ----> 1 from .data import Data 2 from .temporal import TemporalData 3 from .batch import Batch 4 from .dataset import Dataset 5 from .in_memory_dataset import InMemoryDataset

    /usr/local/lib/python3.7/dist-packages/torch_geometric/data/data.py in () 6 import torch 7 import torch_geometric ----> 8 from torch_sparse import coalesce, SparseTensor 9 from torch_geometric.utils import (contains_isolated_nodes, 10 contains_self_loops, is_undirected)

    /usr/local/lib/python3.7/dist-packages/torch_sparse/init.py in () 13 ]: 14 torch.ops.load_library(importlib.machinery.PathFinder().find_spec( ---> 15 f'{library}_{suffix}', [osp.dirname(file)]).origin) 16 17 if torch.cuda.is_available(): # pragma: no cover

    /usr/local/lib/python3.7/dist-packages/torch/_ops.py in load_library(self, path) 102 # static (global) initialization code in order to register custom 103 # operators with the JIT. --> 104 ctypes.CDLL(path) 105 self.loaded_libraries.add(path) 106

    /usr/lib/python3.7/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error) 362 363 if handle is None: --> 364 self._handle = _dlopen(self._name, mode) 365 else: 366 self._handle = handle

    OSError: /usr/local/lib/python3.7/dist-packages/torch_sparse/_convert_cuda.so: undefined symbol: _ZNK2at6Tensor6deviceEv

    opened by akira2025 3
  • Error when using other 3D data

    Error when using other 3D data

    hi humanpose1 Thank you a lot for your update. It's running with your data but when I try to run with my 3D point loud data and use your model :MS_SVCONV_2cm_X2_3head_3dm.pt I have some problems like that:

    INFO - 2021-06-15 11:01:11,212 - model_checkpoint - Loading checkpoint from models/MS_SVCONV_2cm_X2_3head_3dm.pt INFO - 2021-06-15 11:01:11,566 - modelfactory - The config will be used to build the model INFO - 2021-06-15 11:01:11,750 - model_checkpoint - Available weights : ['latest', 'loss', 'hit_ratio', 'feat_match_ratio', 'trans_error', 'rot_error', 'rre', 'rte', 'sr_err'] INFO - 2021-06-15 11:01:11,751 - model_checkpoint - Model loaded from MS_SVCONV_2cm_X2_3head_3dm.pt:latest

    invalid syntax (, line 1) [Open3D WARNING] Read PCD failed: unable to open file: Dt/4sm.pcd0;m


    RuntimeError Traceback (most recent call last)

    in () 21 model = PretainedRegistry.from_file(pcd_model[choice_model], mock_property={}) 22 ---> 23 data_s = pcd_DAchoice_model 24 data_t = pcd_DAchoice_model 25

    3 frames

    /usr/local/lib/python3.7/dist-packages/torch_geometric/transforms/compose.py in call(self, data) 12 def call(self, data): 13 for t in self.transforms: ---> 14 data = t(data) 15 return data 16

    /usr/local/lib/python3.7/dist-packages/torch_points3d/core/data_transform/grid_transform.py in call(self, data) 133 data = [self._process(d) for d in data] 134 else: --> 135 data = self._process(data) 136 return data 137

    /usr/local/lib/python3.7/dist-packages/torch_points3d/core/data_transform/grid_transform.py in _process(self, data) 119 cluster = grid_cluster(coords, torch.tensor([1, 1, 1])) 120 else: --> 121 cluster = voxel_grid(coords, data.batch, 1) 122 cluster, unique_pos_indices = consecutive_cluster(cluster) 123

    /usr/local/lib/python3.7/dist-packages/torch_geometric/nn/pool/voxel_grid.py in voxel_grid(pos, batch, size, start, end) 53 end = torch.tensor(end, dtype=pos.dtype, device=pos.device) 54 ---> 55 return grid_cluster(pos, size, start, end)

    RuntimeError: The following operation failed in the TorchScript interpreter. Traceback of TorchScript (most recent call last): File "/usr/local/lib/python3.7/dist-packages/torch_cluster/grid.py", line 32, in grid_cluster cluster = grid_cluster(pos, size) """ return torch.ops.torch_cluster.grid(pos, size, start, end) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE RuntimeError: cannot reshape tensor of 0 elements into shape [0, -1] because the unspecified dimension size -1 can be any value and is ambiguous.

    Could you have some suggests ? Thank you so much

    opened by trinhnhut-gif 3
  • models appears more than once in the final defaults list

    models appears more than once in the final defaults list

    • System: Ubuntu 18.04
    • PyTorch 1.9.0 + CUDA 11.1, A100
    • Hydra 1.1

    Thanks for open sourcing your wonderful work. But I was trying to run the command

    poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True training.epochs=200 eval_frequency=10
    

    and got the output

    (torch-points3d-s_H0q_C5-py3.9) (points) torch-points3d$ poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True training.epochs=200 eval_frequency=10
    /LOCAL2/ramdrop/apps/poetry/cache/virtualenvs/torch-points3d-s_H0q_C5-py3.9/lib/python3.9/site-packages/MinkowskiEngine/__init__.py:36: UserWarning: The environment variable `OMP_NUM_THREADS` not set. MinkowskiEngine will automatically set `OMP_NUM_THREADS=16`. If you want to set `OMP_NUM_THREADS` manually, please export it on the command line before running a python script. e.g. `export OMP_NUM_THREADS=12; python your_program.py`. It is recommended to set it below 24.
      warnings.warn(
    Laspy not available for visualization.
    /LOCAL2/ramdrop/apps/poetry/cache/virtualenvs/torch-points3d-s_H0q_C5-py3.9/lib/python3.9/site-packages/hydra/_internal/defaults_list.py:251: UserWarning: In 'config': Defaults list is missing `_self_`. See https://hydra.cc/docs/upgrades/1.0_to_1.1/default_composition_order for more information
      warnings.warn(msg, UserWarning)
    /LOCAL2/ramdrop/apps/poetry/cache/virtualenvs/torch-points3d-s_H0q_C5-py3.9/lib/python3.9/site-packages/hydra/core/default_element.py:122: UserWarning: In 'lr_scheduler/exponential': Usage of deprecated keyword in package header '# @package _group_'.
    See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/changes_to_package_header for more information
      deprecation_warning(
    /LOCAL2/ramdrop/apps/poetry/cache/virtualenvs/torch-points3d-s_H0q_C5-py3.9/lib/python3.9/site-packages/hydra/core/default_element.py:122: UserWarning: In 'visualization/default': Usage of deprecated keyword in package header '# @package _group_'.
    See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/changes_to_package_header for more information
      deprecation_warning(
    models appears more than once in the final defaults list
    
    Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
    

    Do you have any ideas on how to resolve it?

    opened by ramdrop 2
  • A question about

    A question about "No module named 'torchsparse'"

    Thank you for your warm reply. Now, I'd like to make some experimental comparisons with your method. When I run evalution.py, "No module named 'torchsparse'" appears :

    /home/ls/anaconda3/envs/qwt_py38/bin/python /home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/evaluate.py /home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/MinkowskiEngine-0.5.4-py3.6-linux-x86_64.egg/MinkowskiEngine/init.py:42: UserWarning: The environment variable OMP_NUM_THREADS not set. MinkowskiEngine will automatically set OMP_NUM_THREADS=16. If you want to set OMP_NUM_THREADS manually, please export it on the command line before running a python script. e.g. export OMP_NUM_THREADS=12; python your_program.py. It is recommended to set it below 24. "It is recommended to set it below 24.", /home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/core/utils.py:207: UserWarning: Using config_path to specify the config name is deprecated, specify the config name via config_name See https://hydra.cc/docs/next/upgrades/0.11_to_1.0/config_path_changes warnings.warn(category=UserWarning, message=msg) [2021-10-26 20:56:47,643][main][INFO] - DEVICE : cuda [2021-10-26 20:56:47,644][torch_points3d.metrics.model_checkpoint][INFO] - Loading checkpoint from /home/qwt/code/torch_points3d_master_evaluation/outputs/MS_SVCONV_B2cm_X2_3head.pt [2021-10-26 20:56:48,227][torch_points3d.datasets.registration.basetest][WARNING] - already downloaded test Processing... Done! invalid syntax (, line 1) [2021-10-26 20:56:49,356][torch_points3d.modules.SparseConv3d.nn][ERROR] - Could not import torchsparse backend for sparse convolutions Traceback (most recent call last): File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/modules/SparseConv3d/nn/init.py", line 46, in set_backend modules = importlib.import_module("." + _backend, name) # noqa: F841 File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/modules/SparseConv3d/nn/torchsparse.py", line 5, in import torchsparse as TS ModuleNotFoundError: No module named 'torchsparse' Traceback (most recent call last): File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/_internal/utils.py", line 198, in run_and_report return func() File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/_internal/utils.py", line 350, in overrides=args.overrides, File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/_internal/hydra.py", line 112, in run configure_logging=with_log_configuration, File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/core/utils.py", line 127, in run_job ret.return_value = task_function(task_cfg) File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/evaluate.py", line 231, in main model = checkpoint.create_model(dataset, weight_name=cfg.training.weight_name) File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/metrics/model_checkpoint.py", line 174, in create_model model = instantiate_model(OmegaConf.create(run_config), dataset) File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/models/model_factory.py", line 48, in instantiate_model model = model_cls(model_config, "dummy", dataset, modellib) File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/models/registration/ms_svconv3d.py", line 200, in init backend=option.backend, File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/models/registration/ms_svconv3d.py", line 34, in init self.unet = SparseConv3d(architecture="unet", input_nc=input_nc, config=backbone, backend=backend) File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/applications/sparseconv3d.py", line 62, in SparseConv3d sp3d.nn.set_backend(backend) File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/../../torch_points3d/modules/SparseConv3d/nn/init.py", line 52, in set_backend exec("globals()['%s'] = modules.%s" % (val, val)) File "", line 1, in NameError: name 'modules' is not defined

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/qwt/code/torch_points3d_master_evaluation/scripts/test_registration_scripts/evaluate.py", line 269, in main() File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/main.py", line 37, in decorated_main strict=strict, File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/_internal/utils.py", line 347, in _run_hydra lambda: hydra.run( File "/home/ls/anaconda3/envs/qwt_py38/lib/python3.6/site-packages/hydra/_internal/utils.py", line 237, in run_and_report assert mdl is not None AssertionError Process finished with exit code 1

    Can you give me same advice?

    opened by QWTforGithub 2
  • torchsparse error during running colab.

    torchsparse error during running colab.

    image

    INFO - 2021-08-17 04:07:39,444 - model_checkpoint - Loading checkpoint from models/MS_SVCONV_2cm_X2_3head_3dm.pt INFO - 2021-08-17 04:07:39,799 - modelfactory - The config will be used to build the model invalid syntax (, line 1)

    TypeError Traceback (most recent call last) in () 19 } 20 ---> 21 model = PretainedRegistry.from_file(pcd_model[choice_model], mock_property={}) 22 23 data_s = pcd_DAchoice_model

    13 frames /usr/local/lib/python3.7/dist-packages/torch_points3d/modules/SparseConv3d/nn/torchsparse.py in init(self, in_channels, out_channels, kernel_size, stride, dilation, bias, transpose) 37 dilation=dilation, 38 bias=bias, ---> 39 transposed=True, 40 ) 41

    TypeError: init() got an unexpected keyword argument 'transposed'

    opened by chenerg 2
  • Training on 3DMatch dataset is not working

    Training on 3DMatch dataset is not working

    My system configuration:

    • System: Ubuntu 18.04
    • PyTorch 1.9.0 + CUDA 11.1, A100
    (torch-points3d-s_H0q_C5-py3.9) (base) torch-points3d$ pip list
    Package                           Version
    --------------------------------- ------------
    absl-py                           1.0.0
    addict                            2.4.0
    aiohttp                           3.7.4.post0
    alabaster                         0.7.12
    antlr4-python3-runtime            4.8
    anyio                             3.5.0
    appdirs                           1.4.4
    argon2-cffi                       21.1.0
    async-timeout                     3.0.1
    attrs                             21.2.0
    autobahn                          21.3.1
    Automat                           20.2.0
    Babel                             2.9.1
    backcall                          0.2.0
    backports.entry-points-selectable 1.1.0
    beautifulsoup4                    4.11.1
    bleach                            4.1.0
    cachetools                        4.2.2
    certifi                           2021.5.30
    cffi                              1.14.6
    chardet                           4.0.0
    charset-normalizer                2.0.6
    click                             8.1.2
    constantly                        15.1.0
    cryptography                      3.4.8
    cycler                            0.10.0
    debugpy                           1.4.3
    decorator                         5.1.0
    defusedxml                        0.7.1
    deprecation                       2.1.0
    distlib                           0.3.3
    docker-pycreds                    0.4.0
    docutils                          0.17.1
    entrypoints                       0.3
    fastjsonschema                    2.15.3
    filelock                          3.1.0
    gdown                             4.4.0
    gitdb                             4.0.7
    GitPython                         3.1.27
    google-auth                       1.35.0
    google-auth-oauthlib              0.4.6
    googledrivedownloader             0.4
    graphql-core                      1.1
    grpcio                            1.44.0
    h5py                              3.6.0
    hydra-core                        1.0.5
    hyperlink                         21.0.0
    idna                              3.2
    imageio                           2.18.0
    imagesize                         1.2.0
    importlib-metadata                4.11.3
    incremental                       21.3.0
    install                           1.3.5
    ipykernel                         6.4.1
    ipython                           7.28.0
    ipython-genutils                  0.2.0
    ipywidgets                        7.7.0
    isodate                           0.6.0
    jedi                              0.18.0
    Jinja2                            3.1.1
    joblib                            1.0.1
    json5                             0.9.6
    jsonpatch                         1.32
    jsonpointer                       2.1
    jsonschema                        4.4.0
    jupyter-client                    7.0.3
    jupyter-core                      4.8.1
    jupyter-packaging                 0.12.0
    jupyter-server                    1.16.0
    jupyterlab                        3.3.4
    jupyterlab-pygments               0.1.2
    jupyterlab-server                 2.13.0
    jupyterlab-widgets                1.0.2
    kiwisolver                        1.3.2
    laspy                             2.1.2
    lazy-object-proxy                 1.6.0
    llvmlite                          0.38.0
    Mako                              1.2.0
    Markdown                          3.3.6
    MarkupSafe                        2.0.1
    matplotlib                        3.4.3
    matplotlib-inline                 0.1.3
    MinkowskiEngine                   0.5.4
    mistune                           0.8.4
    multidict                         5.1.0
    nbclassic                         0.3.7
    nbclient                          0.5.4
    nbconvert                         6.5.0
    nbformat                          5.3.0
    nest-asyncio                      1.5.1
    networkx                          2.6.3
    ninja                             1.10.2.3
    notebook                          6.4.4
    notebook-shim                     0.1.0
    numba                             0.55.1
    numpy                             1.19.5
    oauthlib                          3.1.1
    omegaconf                         2.0.6
    open3d                            0.15.2
    packaging                         21.0
    pandas                            1.4.2
    pandocfilters                     1.5.0
    param                             1.11.1
    parso                             0.8.2
    pathtools                         0.1.2
    pexpect                           4.8.0
    pickleshare                       0.7.5
    Pillow                            8.3.2
    pip                               22.0.4
    platformdirs                      2.4.0
    plyfile                           0.7.4
    prometheus-client                 0.11.0
    promise                           2.3
    prompt-toolkit                    3.0.20
    protobuf                          3.20.1
    psutil                            5.9.0
    ptyprocess                        0.7.0
    pyasn1                            0.4.8
    pyasn1-modules                    0.2.8
    pycparser                         2.20
    pycuda                            2020.1
    Pygments                          2.10.0
    pyparsing                         2.4.7
    pyquaternion                      0.9.9
    pyrsistent                        0.18.0
    PySocks                           1.7.1
    python-dateutil                   2.8.2
    python-louvain                    0.16
    pytools                           2022.1.4
    pytorch-metric-learning           1.3.0
    pytz                              2021.1
    pyvista                           0.34.1
    PyWavelets                        1.3.0
    PyYAML                            5.4.1
    pyzmq                             22.3.0
    rdflib                            6.1.1
    requests                          2.26.0
    requests-oauthlib                 1.3.0
    rsa                               4.7.2
    scikit-image                      0.19.2
    scikit-learn                      1.0
    scipy                             1.6.1
    scooby                            0.5.12
    Send2Trash                        1.8.0
    sentry-sdk                        1.5.10
    setproctitle                      1.2.3
    setuptools                        62.1.0
    shortuuid                         1.0.8
    six                               1.16.0
    smmap                             4.0.0
    sniffio                           1.2.0
    snowballstemmer                   2.1.0
    soupsieve                         2.3.2.post1
    sphinxcontrib-applehelp           1.0.2
    sphinxcontrib-devhelp             1.0.2
    sphinxcontrib-htmlhelp            2.0.0
    sphinxcontrib-jsmath              1.0.1
    sphinxcontrib-qthelp              1.0.3
    sphinxcontrib-serializinghtml     1.1.5
    tensorboard                       2.8.0
    tensorboard-data-server           0.6.1
    tensorboard-plugin-wit            1.8.1
    terminado                         0.12.1
    testpath                          0.5.0
    threadpoolctl                     2.2.0
    tifffile                          2022.4.22
    tinycss2                          1.1.1
    tomlkit                           0.10.2
    torch                             1.9.0+cu111
    torch-cluster                     1.6.0
    torch-geometric                   1.7.2
    torch-points-kernels              0.7.0
    torch-scatter                     2.0.9
    torch-sparse                      0.6.12
    torch-spline-conv                 1.2.1
    torchaudio                        0.9.0
    torchfile                         0.1.0
    torchnet                          0.0.4
    torchsparse                       1.4.0
    torchvision                       0.10.0+cu111
    tornado                           6.1
    tqdm                              4.64.0
    traitlets                         5.1.0
    Twisted                           21.7.0
    txaio                             21.2.1
    typing-extensions                 3.10.0.2
    urllib3                           1.26.7
    visdom                            0.1.8.9
    vtk                               9.1.0
    wandb                             0.12.15
    wcwidth                           0.2.5
    webencodings                      0.5.1
    websocket-client                  1.2.1
    Werkzeug                          2.1.1
    wheel                             0.37.1
    widgetsnbextension                3.6.0
    wrapt                             1.12.1
    wslink                            1.0.7
    yacs                              0.1.8
    yapf                              0.32.0
    yarl                              1.6.3
    zipp                              3.8.0
    zope.interface                    5.4.0
    

    I launched a training by running command:

    poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/fragment3dmatch_sparse training=sparse_fragment_reg tracker_options.make_submission=True training.epochs=200 eval_frequency=10
    

    during training, I found the feat_match_ratio on val and test set remains zero even after ~50 epochs, see the following records for more details: https://wandb.ai/ramdrop/registration/reports/-humanpose1-MS-SVConv---VmlldzoxOTE5Mjg1?accessToken=a1b84890nit3x8cacs2aja05u9zglukq9hb616ym39jbav31ekztml4qihed1t19

    opened by ramdrop 5
  • pycuda._driver.MemoryError: cuMemAlloc failed: out of memory

    pycuda._driver.MemoryError: cuMemAlloc failed: out of memory

    • System: Ubuntu 18.04
    • PyTorch 1.9.0 + CUDA 11.1, A100 with 40GB memory.
    • Hydra 1.0.5

    Hello, I run the command and got the output as follows:

    command:

    poetry run python train.py task=registration models=registration/ms_svconv_base model_name=MS_SVCONV_B2cm_X2_3head data=registration/fragment3dmatch training=sparse_fragment_reg tracker_options.make_submission=True training.epochs=200 eval_frequency=10
    

    output:

    Error executing job with overrides: ['task=registration', 'models=registration/ms_svconv_base', 'model_
    name=MS_SVCONV_B2cm_X2_3head', 'data=registration/fragment3dmatch_sparse', 'training=sparse_fragment_re
    g', 'tracker_options.make_submission=True', 'training.epochs=200', 'eval_frequency=10']
    Traceback (most recent call last):
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/train.py", line 13, in main
        trainer = Trainer(cfg)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/trainer.py", line 49, i
    n __init__
        self._initialize_trainer()
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/trainer.py", line 96, i
    n _initialize_trainer
        self._dataset: BaseDataset = instantiate_dataset(self._cfg.data)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/dataset_factor
    y.py", line 46, in instantiate_dataset
        dataset = dataset_cls(dataset_config)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/g
    eneral3dmatch.py", line 355, in __init__
        self.train_dataset = Fragment3DMatch(
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/general3dmatch.py", line 260, in __init__
        Base3DMatch.__init__(
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/base3dmatch.py", line 122, in __init__
        super(Base3DMatch, self).__init__(root,
      File "/LOCAL2/ramdrop/apps/poetry/cache/virtualenvs/torch-points3d-s_H0q_C5-py3.9/lib/python3.9/site-packages/torch_geometric/data/dataset.py", line 87, in __init__
        self._process()
      File "/LOCAL2/ramdrop/apps/poetry/cache/virtualenvs/torch-points3d-s_H0q_C5-py3.9/lib/python3.9/site-packages/torch_geometric/data/dataset.py", line 170, in _process
        self.process()
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/general3dmatch.py", line 300, in process
        super().process()
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/base3dmatch.py", line 329, in process
        self._create_fragment(self.mode)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/base3dmatch.py", line 202, in _create_fragment
        rgbd2fragment_fine(list_path_frames,
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/utils.py", line 271, in rgbd2fragment_fine
        tsdf_vol = fusion.TSDFVolume(vol_bnds, voxel_size=voxel_size)
      File "/LOCAL2/ramdrop/github/point_registration/torch-points3d/torch_points3d/datasets/registration/fusion.py", line 61, in __init__
        self._weight_vol_gpu = cuda.mem_alloc(self._weight_vol_cpu.nbytes)
    pycuda._driver.MemoryError: cuMemAlloc failed: out of memory
    
    Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
    

    I checked the GPU allocated memory recorded by wandb (I tried two different versions of pycuda and both cases resulted in the same error shown above): gpu

    Is it normal that the GPU allocated memory keeps increasing during the data preprocessing? I thought A100 with 40GB memory is sufficient for this job. If it isn't, do you know the minimum memory requirement for preprocessing 3DMatch dataset?

    opened by ramdrop 3
  • Error when running the demo jupyter

    Error when running the demo jupyter

    when loading the model from file: model = PretainedRegistry.from_file(pcd_model[choice_model], mock_property={})

    results in the following:


    AttributeError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_27968\3205507908.py in ----> 1 model = PretainedRegistry.from_file(pcd_model[choice_model])

    ~\Anaconda3\envs\torch3d\lib\site-packages\torch_points3d\applications\pretrained_api.py in from_file(path, weight_name, mock_property) 157 path_dir, name, weight_name if weight_name is not None else "latest", resume=False, 158 ) --> 159 dataset = checkpoint.data_config 160 161 if mock_property is not None:

    ~\Anaconda3\envs\torch3d\lib\site-packages\torch_points3d\metrics\model_checkpoint.py in data_config(self) 204 @property 205 def data_config(self): --> 206 return self._checkpoint.run_config.data 207 208 @property

    AttributeError: 'dict' object has no attribute 'data'

    opened by raespanha 2
  • How good is it's performance on Kitti dataset?

    How good is it's performance on Kitti dataset?

    Impressive performance on 3dMatch and others! Thank you for your works. I have been working on lidar distancing so I am trying to imply this method and test it on Kitti, but little success due to all kind of issues. As it is mentioned in the to-do list, I was wondering how does that task go? Is it possible for people to have a performance index on Kitti as the other dataset?

    opened by wpprpoew 1
Owner
null
Code for "PV-RAFT: Point-Voxel Correlation Fields for Scene Flow Estimation of Point Clouds", CVPR 2021

PV-RAFT This repository contains the PyTorch implementation for paper "PV-RAFT: Point-Voxel Correlation Fields for Scene Flow Estimation of Point Clou

Yi Wei 43 Dec 5, 2022
Code for the CVPR2021 paper "Patch-NetVLAD: Multi-Scale Fusion of Locally-Global Descriptors for Place Recognition"

Patch-NetVLAD: Multi-Scale Fusion of Locally-Global Descriptors for Place Recognition This repository contains code for the CVPR2021 paper "Patch-NetV

QVPR 368 Jan 6, 2023
Registration Loss Learning for Deep Probabilistic Point Set Registration

RLLReg This repository contains a Pytorch implementation of the point set registration method RLLReg. Details about the method can be found in the 3DV

Felix Järemo Lawin 35 Nov 2, 2022
MVP Benchmark for Multi-View Partial Point Cloud Completion and Registration

MVP Benchmark: Multi-View Partial Point Clouds for Completion and Registration [NEWS] 2021-07-12 [NEW ?? ] The submission on Codalab starts! 2021-07-1

PL 93 Dec 21, 2022
Fast algorithms to compute an approximation of the minimal volume oriented bounding box of a point cloud in 3D.

ApproxMVBB Status Build UnitTests Homepage Fast algorithms to compute an approximation of the minimal volume oriented bounding box of a point cloud in

Gabriel Nützi 390 Dec 31, 2022
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
[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
Point Cloud Registration using Representative Overlapping Points.

Point Cloud Registration using Representative Overlapping Points (ROPNet) Abstract 3D point cloud registration is a fundamental task in robotics and c

ZhuLifa 36 Dec 16, 2022
Cascading Feature Extraction for Fast Point Cloud Registration (BMVC 2021)

Cascading Feature Extraction for Fast Point Cloud Registration This repository contains the source code for the paper [Arxive link comming soon]. Meth

null 7 May 26, 2022
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
Point Cloud Registration Network

PCRNet: Point Cloud Registration Network using PointNet Encoding Source Code Author: Vinit Sarode and Xueqian Li Paper | Website | Video | Pytorch Imp

ViNiT SaRoDe 59 Nov 19, 2022
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
Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR 2022)

Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR2022)[paper] Authors: Chenhang He, Ruihuang Li, Shuai Li, L

Billy HE 141 Dec 30, 2022
A simple algorithm for extracting tree height in sparse scene from point cloud data.

TREE HEIGHT EXTRACTION IN SPARSE SCENES BASED ON UAV REMOTE SENSING This is the offical python implementation of the paper "Tree Height Extraction in

null 6 Oct 28, 2022
A multi-scale unsupervised learning for deformable image registration

A multi-scale unsupervised learning for deformable image registration Shuwei Shao, Zhongcai Pei, Weihai Chen, Wentao Zhu, Xingming Wu and Baochang Zha

ShuweiShao 2 Apr 13, 2022
Rendering Point Clouds with Compute Shaders

Compute Shader Based Point Cloud Rendering This repository contains the source code to our techreport: Rendering Point Clouds with Compute Shaders and

Markus Schütz 460 Jan 5, 2023
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
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