src.model.deeplearn.arch.point_net
Classes
|
- class src.model.deeplearn.arch.point_net.PointNet(**kwargs)
- Author:
Alberto M. Esmoris Pena
The PointNet architecture.
See https://arxiv.org/abs/1612.00593 and https://keras.io/examples/vision/pointnet_segmentation/#pointnet-model
- __init__(**kwargs)
See
architecture.Architecture.__init__().
- build_input()
Build the input layer of the neural network. By default, only the 3D coordinates are considered as input, i.e., input dimensionality is three.
See
architecture.Architecture.build_input().- Returns:
Built layer.
- Return type:
tf.Tensor
- static build_point_net_input(pnet)
Build the hidden layers of the PointNet neural network.
- Parameters:
x (
tf.Tensoror list) – The input layer for the first hidden layer. Alternatively, it can be a list with many input layers.- Returns:
The last hidden layer. Alternatively, it can be a list with many hidden layers.
- Return type:
tf.Tensoror list
Build the PointNet block of the architecture on the given input.
- Parameters:
x (
tf.Tensor) – The input for the PointNet block/architecture.pretransf_feats (list) – The specification of the filters and the name for each feature extraction layer before the transformation block in the middle.
postransf_feats (list) – The specification of the filters and the name for each feature extraction layer after the transformation block in the middle.
tnet_pre_filters (list) – The list of number of filters (integer) defining each convolutional block before the global pooling.
tnet_post_filters (list) – The list of number of filters (integer) defining each MLP block after the global pooling.
kernel_initializer (str) – The name of the kernel initializer
space_dimensionality (int) – The dimensionality of the space where the PointNet block operates (typicalle 3D for the structure space, i.e., x,y,z).
- Returns:
Last layer of the built PointNet, the list of pre-transformations, the layer of transformed features, and the list of post-transformations. Finally, the aligned input tensor.
- Return type:
tf.Tensorand list andkeras.Layerand list andtf.Tensor
- static build_transformation_block(inputs, num_features, name, tnet_pre_filters, tnet_post_filters, kernel_initializer)
Build a transformation block.
- Parameters:
inputs (
tf.Tensor) – The input tensor.num_features (int) – The number of features to be transformed.
name (str) – The name of the block.
tnet_pre_filters (list) – The list of number of filters (integer) defining each convolutional block before the global pooling.
tnet_post_filters (list) – The list of nubmer of filters (integer) defining each MLP block after the global pooling.
kernel_initializer (str) – The name of the kernel initializer
- Returns:
The last layer of the transformation block
- static build_transformation_net(inputs, num_features, name, tnet_pre_filters, tnet_post_filters, kernel_initializer)
Assists the
point_net.PointNet.build_transformation_block()method.
- static build_conv_block(x, filters, name, kernel_initializer)
Build a convolutional block.
- Parameters:
x (
tf.Tensor) – The input tensor.filters (int) – The dimensionality of the output.
name (str) – The name of the block
kernel_initializer (str) – The name of the kernel initializer
- static build_mlp_block(x, filters, name, kernel_initializer, batch_normalization=True)
Build an MLP block.
- Parameters:
x (
tf.Tensor) – The input tensor.filters (int) – The dimensionality of the output.
kernel_initializer (str) – The name of the kernel initializer
name (str) – The name of the block.
batch_normalization (bool) – Whether to apply batch normalization (True) or not (False).