Hi everybody I train pointnet network in this matlab example: https://de.mathworks.com/help/vision/ug/point-cloud-classification-using-pointnet-deep-learning.html But I can't use this network in my work.I need a series network or DAG network to be used in "DeepLearning HDL ToolBox Support Package For Xilinx FPGA And SoC Device".Or a version of PointNet open with "DeepNetworksDesigner".Note: Only PointNet is required, it is not possible to use PointNetPlusPlus.
Kshitij Singh answered .
2025-11-20
To use the PointNet network in a format that can be utilized in the "DeepLearning HDL Toolbox" or "Deep Network Designer" in MATLAB, you need to work with the underlying layers of PointNet. Unfortunately, the PointNet model provided in the MATLAB documentation is typically defined as a Layered Network, not directly as a SeriesNetwork or DAGNetwork.
Here’s a step-by-step guide on how to convert the PointNet model into a SeriesNetwork or DAGNetwork that can be used in tools like DeepNetworkDesigner or DeepLearning HDL Toolbox.
First, if you have already trained the PointNet model, you can load it using:
pointNetModel = load('pointnet_model.mat'); % Load trained model
net = pointNetModel.net; % Extract the model
If you don’t have a pretrained model, you can train PointNet for classification or segmentation using the instructions from the PointNet for classification example.
MATLAB supports the use of SeriesNetwork and DAGNetwork for deployment and compatibility with tools like DeepLearning HDL Toolbox and Deep Network Designer. To convert the PointNet model, you need to manually create a SeriesNetwork or DAGNetwork using the layers that define PointNet’s architecture.
A SeriesNetwork is a simpler type of network where each layer is connected sequentially (i.e., from one layer to the next without branching). You can convert your network layers into this format using:
layers = [
% Input Layer (Example: Point Cloud Input Layer)
imageInputLayer([num_points, 3, 1], 'Name', 'input', 'Normalization', 'none')
% Transform layers (PointNet typically has transformations, i.e., T-Net)
% Example: Fully Connected layers for transformations
fullyConnectedLayer(64, 'Name', 'fc1')
batchNormalizationLayer('Name', 'bn1')
reluLayer('Name', 'relu1')
% Further layers such as MLP (Multi-Layer Perceptron)
fullyConnectedLayer(128, 'Name', 'fc2')
batchNormalizationLayer('Name', 'bn2')
reluLayer('Name', 'relu2')
% Output Layer (Classifications or Segmentation outputs)
fullyConnectedLayer(num_classes, 'Name', 'fc_out')
softmaxLayer('Name', 'softmax')
classificationLayer('Name', 'classoutput')
];
% Create SeriesNetwork from the layers
pointNetSeriesNet = assembleNetwork(layers);
A DAGNetwork allows for more complex architectures, such as models with skip connections. For PointNet, you might need to incorporate branches or skips between layers (e.g., skip connections for multi-scale features in segmentation tasks).
layers = [
% Input Layer
imageInputLayer([num_points, 3, 1], 'Name', 'input', 'Normalization', 'none')
% Transformations and shared multi-layer perceptron
fullyConnectedLayer(64, 'Name', 'fc1')
batchNormalizationLayer('Name', 'bn1')
reluLayer('Name', 'relu1')
% Skip connections or multiple branches if needed
fullyConnectedLayer(128, 'Name', 'fc2')
batchNormalizationLayer('Name', 'bn2')
reluLayer('Name', 'relu2')
% Output Layer
fullyConnectedLayer(num_classes, 'Name', 'fc_out')
softmaxLayer('Name', 'softmax')
classificationLayer('Name', 'classoutput')
];
% Create DAGNetwork from the layers
pointNetDAGNet = DAGNetwork(layers);
Once you have the network in the SeriesNetwork or DAGNetwork format, you can export it for use in the DeepLearning HDL Toolbox or Xilinx FPGA and SoC Device using the following:
% For SeriesNetwork exportToHDL(pointNetSeriesNet, 'NetworkName', 'pointNetHDLModel'); % Or for DAGNetwork exportToHDL(pointNetDAGNet, 'NetworkName', 'pointNetHDLModel');
Once the model is converted, you can open it in Deep Network Designer:
% Open Deep Network Designer to inspect/edit the model deepNetworkDesigner(pointNetSeriesNet);
This should help you visualize the network structure and make any further modifications needed.
To summarize:
By following these steps, you will be able to use the original PointNet model for FPGA deployment and other tools, making it compatible with Xilinx FPGA or SoC devices.