Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/rubenwiersma/deltaconv
15 October 2025, 09:16:06 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • 9e06319
  • /
  • README.md
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:ea455b69bcdf77207b49c3e5d833faa8c9049221
origin badgedirectory badge Iframe embedding
swh:1:dir:9e06319df5b05e757d8b1d7f1c860d00b9df34e7
origin badgerevision badge
swh:1:rev:186fec369fa2ceb4559830bc421282dddb2300a2
origin badgesnapshot badge
swh:1:snp:92e48105d57a81e55969483f9ac8644c4d377030

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 186fec369fa2ceb4559830bc421282dddb2300a2 authored by rubenwiersma on 26 July 2023, 16:31:40 UTC
Update ply_utils.py
Tip revision: 186fec3
README.md
# DeltaConv
[[Paper]](https://rubenwiersma.nl/assets/pdf/DeltaConv.pdf) [[Project page]](https://rubenwiersma.nl/deltaconv) [[Replicability Stamp]](http://www.replicabilitystamp.org#https-github-com-rubenwiersma-deltaconv)

Code for the SIGGRAPH 2022 paper "[DeltaConv: Anisotropic Operators for Geometric Deep Learning on Point Clouds](https://arxiv.org/abs/2111.08799)" by Ruben Wiersma, Ahmad Nasikun, Elmar Eisemann, and Klaus Hildebrandt.

Anisotropic convolution is a central building block of CNNs but challenging to transfer to surfaces. DeltaConv learns combinations and compositions of operators from vector calculus, which are a natural fit for curved surfaces. The result is a simple and robust anisotropic convolution operator for point clouds with state-of-the-art results.

![](img/deltaconv.png)

*Top: unlike images, surfaces have no global coordinate system. Bottom: DeltaConv learns both scalar and vector features using geometric operators.* 

## Contents
- [Installation](#installation)
- [Replicating the experiments](#replicating-the-experiments)
- [FAQ](#faq)
- [Tests](#tests)
- [Visualization](#visualization)
- [Citation](#citations)

## Installation
1. Clone this repository:
```bash
git clone https://github.com/rubenwiersma/deltaconv.git
```

2. Create a conda environment from the `environment.yml`:
```bash
conda env create -n deltaconv -f environment.yml
```

Done!

### Manual installation
If you wish to install DeltaConv in your own environment, proceed as follows.

1. Make sure that you have installed:
    - Numpy - `pip install numpy`
    - [PyTorch](https://pytorch.org/get-started/locally/) - see [instructions](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html)
    - [PyG](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html) - `conda install pyg -c pyg`

2. Install DeltaConv:
```bash
pip install deltaconv
```
### Building DeltaConv for yourself
1. Make sure you clone the repository with submodules:
```bash
git clone --recurse-submodules https://github.com/rubenwiersma/deltaconv.git
```
If you have already cloned the repository without submodules, you can fix it with `git submodule update --init --recursive`.

2. Install from folder:
```bash
cd [root_folder]
pip install ./
```


## Replicating the experiments
See the README.md in `replication_scripts` for instructions on replicating the experiments and using the pre-trained weights (available in `experiments/pretrained_weights`).

In short, you can run bash scripts to replicate our experiments. For example, evaluating pre-trained weights on ShapeNet:
```bash
cd [root_folder]
conda activate deltaconv
bash replication_scripts/pretrained/shapenet.sh
```

You can also directly run the python files in `experiments`:
```bash
python experiments/train_shapenet.py
```
Use the `-h` or `--help` flag to find out which arguments can be passed to the training script:
```bash
python experiments/train_shapenet.py -h
```

You can keep track of the training process with tensorboard:
```bash
tensorboard --logdir=experiments/runs/shapenet_all
```

### Anisotropic Diffusion
The code that was used to generate Figure 2 from the paper and Figure 2 and 3 from the supplement is a notebook in the folder `experiments/anisotropic_diffusion`.

## Data
ModelNet40, ShapeNet, SHREC, and human body shape segmentation automatically download the datasets from a public repository and place them in the correct folder. Note: this can take a while. The data for ScanObjectNN can be downloaded from the ScanObjectNN website: https://hkust-vgd.github.io/scanobjectnn/. Download and extract the files into `experiments/data/ScanObjectNN/raw`. The folder structure in `experiments/data/ScanObjectNN` should look like:
```
ScanObjectNN
└─── raw
     └─── main_split
     |    | train_objectdataset.h5
     |    | test_objectdataset.h5
     |    | ...
     |
     └─── main_split_nobg
          | train_objectdataset.h5
          | test_objectdataset.h5
          | ...
```

## FAQ
**Can I run these scripts with low GPU memory?**
Yes, you can reduce the memory requirements by changing some of the arguments for the train/test scripts. Some suggestions: reduce the batch size (e.g., 8: `--batch_size 8`), reduce the number of points (e.g., 512 points: `--num_points 512`), reduce the number of neighbors per point (e.g., 15 neighbors: `--k 15`). Note that these changes **will** affect the accuracy of the models.

**Can I get the scripts to run faster?**
There are a couple of ways to reduce the time it takes to train a model. Some of these are explained in the answer on memory (e.g., reduce the number of points, reduce the number of neighbors). For ShapeNet, it's also possible to only train/test on a subset of the data. You can adjust this with the `class_choice` argument, e.g. `--class_choice Airplane`.

**How can I run the bash scripts on Windows?**
The bash scripts typically only run one or two commands. You could the commands line by line if you are unable to run .sh scripts in your preferred command-line interace.

**How did you render the figures in the paper?**
The figures in the paper are rendered in Blender, using Animation Nodes to load in the point clouds and features. A detailed explanation can be found in the folder [visualization](https://github.com/rubenwiersma/deltaconv/tree/master/visualization).

## Tests
In the paper, we make statements about a number of properties of DeltaConv that are either a result of prior work or due to the implementation. We created a test suite to ensure that these properties hold for the implementation, along with unit tests for each module. For example:
- Section 3.6, 3.7: Vector MLPs are equivariant to norm-preserving transformations, or coordinate-independent (rotations, reflections)
    - `test/nn/test_mlp.py`
    - `test/nn/test_nonlin.py`
- Section 3.7: DeltaConv is coordinate-independent, a forward pass on a shape with one choice of bases leads to the same output and weight updates when run with different bases
    - `test/nn/test_deltaconv.py`
- Introduction, section 3.2: The operators are robust to noise and outliers.
    - `test/geometry/test_grad_div.py`
- Supplement, section 1: Vectors can be mapped between points with equation (15).
    - `test/geometry/test_grad_div.py`
    
## Visualization
The figures in the paper are rendered in Blender, using Animation Nodes to load in the point clouds and features. A detailed explanation can be found in the folder [visualization](https://github.com/rubenwiersma/deltaconv/tree/master/visualization).

## Citations
Please cite our paper if this code contributes to an academic publication:

```bib
@Article{Wiersma2022DeltaConv,
  author    = {Ruben Wiersma, Ahmad Nasikun, Elmar Eisemann, Klaus Hildebrandt},
  journal   = {Transactions on Graphics},
  title     = {DeltaConv: Anisotropic Operators for Geometric Deep Learning on Point Clouds},
  year      = {2022},
  month     = jul,
  number    = {4},
  volume    = {41},
  doi       = {10.1145/3528223.3530166},
  publisher = {ACM},
}
```

The farthest point sampling code relies on Geometry Central:
```bib
@misc{geometrycentral,
  title = {geometry-central},
  author = {Nicholas Sharp and Keenan Crane and others},
  note = {www.geometry-central.net},
  year = {2019}
}
```

And we make use of PyG (and underlying packages) to load point clouds, compute sparse matrix products, and compute nearest neighbors:
```bib
@inproceedings{Fey/Lenssen/2019,
  title={Fast Graph Representation Learning with {PyTorch Geometric}},
  author={Fey, Matthias and Lenssen, Jan E.},
  booktitle={ICLR Workshop on Representation Learning on Graphs and Manifolds},
  year={2019},
}
```

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API