A C++ port of NVIDIA's MinkowskiEngine on Ubuntu with full CUDA 12.4.0, Torch 2.5.1 support
10K+
CUDA-Accelerated Sparse Tensor Engine for Native C++ with Adaptive Voxelization and Gaussian Support
Minkowski4CPP is a native C++ port and extension of NVIDIA's MinkowskiEngine, designed for high-performance sparse convolutional neural networks operating on 3D and 4D spatial data.
This Docker image provides a fully configured, GPU-accelerated development environment with CUDA, LibTorch, and a precompiled Minkowski4CPP static library.
Unlike the original MinkowskiEngine, Minkowski4CPP eliminates the Python runtime dependency and extends traditional sparse tensor processing with adaptive mixed-resolution voxelization and Gaussian-based spatial representations.
These capabilities enable efficient processing of complex 3D environments, particularly where spatial detail varies significantly across a scene.
Minkowski4CPP is designed for applications including autonomous driving, robotics, 3D scene reconstruction, object detection, spatial AI, and real-time sensor fusion.
Minkowski4CPP provides a native C++ implementation of sparse convolutional neural network operations.
Core capabilities include:
MINK_NO_PYBIND)The engine is designed for integration into native C++ applications without requiring Python-based inference infrastructure.
Traditional sparse voxel engines use a fixed voxel resolution throughout the entire spatial domain. Although sparse tensors avoid storing empty space, occupied regions must still be represented at the selected resolution.
Minkowski4CPP extends this model with adaptive, mixed-resolution voxelization, allowing voxels of different sizes to coexist within a single sparse tensor.
This enables the engine to allocate spatial detail where it is needed while representing less important regions at lower resolution.
Capabilities include:
Memory Efficiency
An included benchmark demonstrates the potential reduction in spatial representation size:
| Representation | Voxel Count |
|---|---|
| Uniform high-resolution grid | ~35,000,000 |
| Adaptive mixed-resolution grid | 41,376 |
| Reduction | ~99.88% |
This represents approximately 846 times fewer voxels for the benchmarked spatial representation.
Actual memory savings and computational performance depend on the scene, refinement strategy, and workload.
Example Applications
In autonomous driving, adaptive voxelization allows a perception system to represent nearby vehicles, pedestrians, and road obstacles at high resolution while retaining lower-resolution representations of distant buildings, terrain, and background geometry.
In robotics, it enables detailed manipulation-region modeling without requiring the entire surrounding environment to use the same voxel density.
Minkowski4CPP extends its sparse spatial processing capabilities with Gaussian-based representations.
Unlike conventional voxel representations, which associate features with discrete spatial cells, Gaussian representations describe spatial information using continuous distributions.
A Gaussian primitive can represent a spatial location, its extent, and its directional uncertainty or shape using a mean vector and covariance matrix.
For a 3D Gaussian:
This provides a flexible foundation for representing geometry, spatial uncertainty, and smoothly distributed features.
Gaussian support is intended to enable:
Why Gaussian Representations Matter
Voxel representations are well suited to sparse convolution and spatial occupancy reasoning, but their discrete structure introduces resolution-dependent approximations.
Gaussian representations provide a complementary way to model continuous spatial information.
Combining the two approaches can support pipelines in which Gaussian primitives describe spatial structure while sparse convolutional networks learn features, classifications, or occupancy estimates.
Potential applications include:
Gaussian representation support does not inherently imply a complete differentiable Gaussian splatting renderer. Rendering, rasterization, and image synthesis require the corresponding pipeline components.
Minkowski4CPP uses CUDA to accelerate computationally intensive sparse tensor operations.
The Docker image includes the required development environment for compiling and linking GPU-accelerated C++ applications.
GPU capabilities include:
The engine is designed to support high-throughput sparse spatial processing without requiring a Python execution layer.
The image contains a preconfigured native C++ development environment.
libminkowski_cpp.aThe static Minkowski4CPP library is already compiled and installed.
Downstream applications can link directly against the installed library without rebuilding the engine.
Minkowski4CPP combines sparse tensor processing, adaptive spatial representations, and GPU acceleration within a native C++ architecture.
Core Sparse Tensor Layer
Adaptive Spatial Layer
Gaussian Representation Layer
Compute Backend
The architecture supports conventional sparse CNN workflows while enabling more advanced spatial representations for research and production applications.
Ensure Docker and NVIDIA Container Toolkit are installed and configured.
Pull the image:
docker pull acaicia/minkowski4cpp
Run an interactive GPU-enabled container:
docker run --gpus all --rm -it \
-v $(pwd):/workspace \
acaicia/minkowski4cpp \
bash
This command:
/workspaceApplications can link directly against the precompiled Minkowski4CPP static library.
cmake_minimum_required(VERSION 3.18)
project(MinkowskiApplication LANGUAGES CXX CUDA)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Torch REQUIRED)
find_package(CUDAToolkit REQUIRED)
find_package(OpenMP)
find_library(MINK_INSTALLED_LIB
NAMES minkowski_cpp
HINTS /usr/local/lib
REQUIRED
)
add_library(minkowski_cpp STATIC IMPORTED)
set_target_properties(minkowski_cpp PROPERTIES
IMPORTED_LOCATION "${MINK_INSTALLED_LIB}"
)
add_executable(your_target main.cpp)
target_link_libraries(your_target PRIVATE
minkowski_cpp
${TORCH_LIBRARIES}
CUDA::cudart
CUDA::cublas
CUDA::cusparse
)
if(OpenMP_CXX_FOUND)
target_link_libraries(your_target PRIVATE
OpenMP::OpenMP_CXX
)
endif()
Additional include directories and dependencies may be required depending on the APIs used by the application.
mkdir -p build
cd build
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/opt/libtorch
ninja
The application links against the installed Minkowski4CPP library and its required CUDA and LibTorch dependencies.
Minkowski4CPP can serve as a sparse spatial processing backend for perception systems that combine camera, LiDAR, and other sensor inputs.
Adaptive voxelization enables detailed modeling of nearby objects while reducing the representation cost of distant or less important regions.
Gaussian representations provide an additional mechanism for modeling continuous geometry and spatial uncertainty.
The combination of sparse voxel operations and Gaussian representations supports research into hybrid 3D reconstruction pipelines.
Potential workflows include converting multi-view observations into spatial representations, extracting sparse features, and learning geometric or semantic properties using sparse CNNs.
Sparse convolutional networks can learn features from voxelized 3D objects without performing dense convolution over empty regions.
Adaptive resolution provides an additional mechanism for concentrating model capacity on geometrically complex regions.
Minkowski4CPP can be used as a computational foundation for models that reason about 3D occupancy, object geometry, spatial relationships, and temporal changes.
Its support for 4D sparse data also makes it suitable for spatiotemporal neural network architectures.
GitHub Repository
https://github.com/QuiteLiterallyConnor/Minkowski4CPP
Docker Hub
https://hub.docker.com/r/acaicia/minkowski4cpp
The source repository provides the engine implementation, build configuration, and examples.
The Docker image provides a preconfigured GPU development environment for applications built on Minkowski4CPP.
Minkowski4CPP is based on NVIDIA's MinkowskiEngine. If you use the Minkowski convolutional neural network architecture in your research, please cite the original work:
4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural Networks, CVPR 2019.
@inproceedings{choy20194d,
title={4D Spatio-Temporal ConvNets:
Minkowski Convolutional Neural Networks},
author={Choy, Christopher and
Gwak, JunYoung and
Savarese, Silvio},
booktitle={Proceedings of the IEEE
Conference on Computer Vision
and Pattern Recognition},
pages={3075--3084},
year={2019}
}
Minkowski4CPP brings native C++ sparse convolution, adaptive mixed-resolution voxelization, and Gaussian spatial representations together in a CUDA-accelerated engine designed for advanced 3D and 4D machine learning workloads.
Content type
Image
Digest
sha256:a4bf4c4e9…
Size
7 GB
Last updated
12 days ago
docker pull acaicia/minkowski4cpp