VoxelCNN<T>
Models & Types · AiDotNet.NeuralNetworks
Represents a Voxel-based 3D Convolutional Neural Network for processing volumetric data.
Inheritance: NeuralNetworkBase<T> → DeclaredModelLayoutBase<T> → VolumetricModelLayoutBase<T> → VoxelCNN<T>
For Beginners
Think of a VoxelCNN as a 3D version of a regular image classifier. Instead of looking at a 2D image, it examines a 3D grid of “blocks” (voxels) to understand 3D shapes. This is like how Minecraft represents the world - each block is either filled or empty, and the pattern of blocks creates recognizable objects.
Applications include:
- Recognizing 3D objects from point cloud scans
- Detecting tumors in 3D medical scans
- Understanding room layouts from depth sensors
How It Works
A Voxel CNN processes 3D volumetric data using 3D convolutions. This is useful for:
- 3D shape recognition from voxelized point clouds (e.g., ModelNet40)
- Medical image analysis (CT, MRI scans)
- Spatial occupancy prediction
Example
var architecture = new NeuralNetworkArchitecture<float>(inputFeatures: 8, outputSize: 4);
var voxels = Tensor<float>.CreateRandom(new[] { 1, 1, 32, 32, 32 });
var trainX = Tensor<float>.CreateRandom(4, 8);
var trainY = Tensor<float>.CreateRandom(4, 2);
var result = new AiModelBuilder<float, Tensor<float>, Tensor<float>>()
.ConfigureModel(new VoxelCNN<float>(architecture))
.Build(trainX, trainY);
var output = result.Predict(voxels);
Constructors
| Constructor | Summary |
|---|---|
VoxelCNN() |
Initializes a new instance of the VoxelCNN class. |
VoxelCNN(NeuralNetworkArchitecture<T> architecture, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction, VoxelCNNOptions options) |
Initializes the model from an already-resolved options instance. |
Properties
| Property | Summary |
|---|---|
int BaseFilters { get; set; } |
Gets the base number of filters in the first convolutional layer. |
int NumConvBlocks { get; set; } |
Gets the number of convolutional blocks in the network. |
int VoxelResolution { get; set; } |
Gets the voxel grid resolution used by this network. |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
Gets metadata about this model for serialization and inspection. |
Tensor<T> Forward(Tensor<T> input) |
Performs a forward pass through the network. |
Tensor<T> ForwardForTraining(Tensor<T> input) |
Tape-recorded forward pass. |