Skip to main content

O-CNN

Documentation

Documentation Status Downloads Downloads PyPI

This repository contains the pure PyTorch-based implementation of O-CNN. The code is compatible with Pytorch>=1.6.0, while Pytorch>=2.8.0 is required for Triton-based convolutions. The original implementation of O-CNN is based on C++ and CUDA and can be found here, which has received stars - O-CNN and forks - O-CNN.

O-CNN is an octree-based 3D convolutional neural network framework for 3D data. O-CNN constrains the CNN storage and computation into non-empty sparse voxels for efficiency and uses the octree data structure to organize and index these sparse voxels. Currently, this type of 3D convolution is known as Sparse Convolution in the research community.

The concept of Sparse Convolution in O-CNN is the same with SparseConvNet, MinkowskiNet, and SpConv. The key difference is that our O-CNN uses octrees to index the sparse voxels, while these works use Hash Tables. However, I believe that octrees may be the right choice for Sparse Convolution. With octrees, I can implement the Sparse Convolution with pure PyTorch. More importantly, with octrees, I can also build efficient transformers for 3D data -- OctFormer, which is extremely hard with Hash Tables.

Our O-CNN is published in SIGGRAPH 2017, SparseConvNet is published in CVPR 2018, and MinkowskiNet is published in CVPR 2019. Actually, our O-CNN was submitted to SIGGRAPH in the end of 2016 and was officially accepted in March, 2017. We just did not post our paper on Arxiv during the review process of SIGGRAPH. Therefore, the idea of constraining CNN computation into sparse non-emtpry voxels, i.e. Sparse Convolution, is first proposed by our O-CNN.

This library supports point cloud processing from the ground up. The library provides essential components for converting raw point clouds into octrees to perform convolution operations. Of course, it also supports other 3D data formats, such as meshes and volumetric grids, which can be converted into octrees to leverage the library's capabilities.

Updates

  • 2026.08.05: Release v2.3.3, this release mainly adds specialized octree convolutions, flexible start_depth construction, a ShapeNet normal-estimation workflow.
  • 2026.05.07: Release v2.3.2, this release focuses on stability, performance, and usability improvements.
  • 2026.02.08: Release v2.3.1, improving the interfaces of octree convolutions and simplifying the triton kernels.
  • 2026.02.02: Release v2.3.0, incorporating Triton to accelerate octree-based sparse convolution, resulting in a performance boost of up to 2.5 times faster than the latest spconv!
  • 2025.12.18: Release v2.2.8, improving neighbor search efficiency.

Key Benefits

  • Simplicity. The ocnn-pytorch is based on pure PyTorch, it is portable and can be installed with a simple command: pip install ocnn. Other sparse convolution frameworks heavily rely on C++ and CUDA, and it is complicated to configure the compiling environment.

  • Efficiency. The ocnn-pytorch is very efficient compared with other sparse convolution frameworks. It is even 2.5 times faster than the latest spconv implementation! Check the benchmark code and results for details. ✨

Citation

@article {Wang-2017-ocnn,
  title    = {{O-CNN}: Octree-based Convolutional Neural Networksfor {3D} Shape Analysis},
  author   = {Wang, Peng-Shuai and Liu, Yang and Guo, Yu-Xiao and Sun, Chun-Yu and Tong, Xin},
  journal  = {ACM Transactions on Graphics (SIGGRAPH)},
  volume   = {36},
  number   = {4},
  year     = {2017},
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocnn-2.3.3.tar.gz (53.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocnn-2.3.3-py3-none-any.whl (77.3 kB view details)

Uploaded Python 3

File details

Details for the file ocnn-2.3.3.tar.gz.

File metadata

  • Download URL: ocnn-2.3.3.tar.gz
  • Upload date:
  • Size: 53.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for ocnn-2.3.3.tar.gz
Algorithm Hash digest
SHA256 0d704bc23723e0150f01746fd355bd7beb42b2ad0d060e017e17295994f173f8
MD5 1896867ba2d7b6a4e4522c347aeb0689
BLAKE2b-256 5214f7e97fcdc800d33d4d58ae168c422ac83b4cafbc1145edf10d5d56304ebc

See more details on using hashes here.

File details

Details for the file ocnn-2.3.3-py3-none-any.whl.

File metadata

  • Download URL: ocnn-2.3.3-py3-none-any.whl
  • Upload date:
  • Size: 77.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for ocnn-2.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a27ecc7972186ccfeab1f76e400c57972726f3d3082b7043bd9068090e45629
MD5 e4d7a3d7a172c3420975eb3f76a36393
BLAKE2b-256 218601c8063d2a3aee05aa09da1a0fc4f4aba0fcbbc310a40eba39d7dc6e0e45

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.3.3 This release

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.8

2 files

2.2.7

2 files

2.2.6

2 files

2.2.5

2 files

2.2.4

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.9

2 files

2.1.8

2 files

2.1.7

2 files

2.1.6

2 files

2.1.5

2 files

2.1.4

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page