src.model.deeplearn.point_net_pwise_classif_model

Classes

PointNetPwiseClassifModel(**kwargs)

class src.model.deeplearn.point_net_pwise_classif_model.PointNetPwiseClassifModel(**kwargs)
Author:

Alberto M. Esmoris Pena

PointNet model for point-wise classification tasks. See ClassificationModel.

Variables:

model (DLModelHandler) – The deep learning model wrapped by the corresponding handler, i.e., the PointNetPwiseClassif model wrapped by a SimpleDLModelHandler handler.

static extract_model_args(spec)

Extract the arguments to initialize/instantiate a PointNetPwiseClassifModel from a key-word specification.

Parameters:

spec – The key-word specification containing the arguments.

Returns:

The arguments to initialize/instantiate a PointNetPwiseClassifModel.

__init__(**kwargs)

Initialize an instance of PointNetPwiseClassifModel.

Parameters:

kwargs – The attributes for the PointNetPwiseClassifModel that will also be passed to the parent.

is_deep_learning_model()

See Model and model.Model.is_deep_learning_model().

prepare_model()

Prepare a PointNet point-wise classifier with current model arguments.

Returns:

The prepared model itself. Note it is also assigned as the model attribute of the object/instance.

Return type:

PointNetPwiseClassif

overwrite_pretrained_model(spec)

See model.Model.overwrite_pretrained_model().

static update_pretrained_model(dlmodel, spec)

See PointNetPwiseClassifModel.overwrite_pretrained_model().

static update_pretrained_model_inner_dict(new_dict_container, target_dict_container, dict_name)

Assist the PointNetPwiseClassifModel.update_pretrained_model() method to update the inner dictionaries of a dlmodel. Typically, the inner dictionaries that are children of dlmodel.model_args.

Parameters:
  • new_dict_container – The object containing the new version of the dictionary.

  • target_dict_container – The object containing the target version of the dictionary, i.e., the one that must be updated.

  • dict_name – The name of the dictionary to be updated.

Returns:

Nothing at all, but the target dictionary is updated inplace.

update_paths()

Consider the current specification of model args (self.model_args) to update the paths.

predict(pcloud, X=None, F=None, plots_and_reports=True)

Use the model to compute predictions on the input point cloud.

The behavior of the base implementation (see model.Model.predict()) is extended to account for X as a coordinates matrix and to ignore F. In other words, this PointNet implementation does not support input features.

Parameters:
  • X (np.ndarray) – The input matrix of coordinates where each row represents a point from the point cloud: If not given, it will be retrieved from the point cloud.

  • F – Ignored.

get_input_from_pcloud(pcloud)

See model.Model.get_input_from_pcloud().

training(X, y, F=None, info=True)

The fundamental training logic to train a PointNet-based point-wise classifier.

See ClassificationModel and Model. Also see model.Model.training().

Parameters:

F – Ignored.

on_training_finished(X, y, yhat=None)

See model.Model.on_training_finished().

static on_training_finished_predict(dlmodel, X, y, yhat)

See PointNetPwiseClassifModel.on_training_finished() and PointNetPwiseClassifModel.on_training_finished_evaluate().

static on_training_finished_evaluate(dlmodel, X, y, zhat, yhat, reducer=None)

See PointNetPwiseClassifModel.on_training_finished() and PointNetPwiseClassifModel.on_training_finished_predict().

compute_pwise_activations(X)

Compute the point wise activations of the last layer before the output softmax layer in the PointNet-based point-wise classification model.

Parameters:

X (np.ndarray) – The matrix of coordinates representing the point cloud.

Returns:

The matrix of point wise activations where points are rows and the columns are the components of the output activation function (activated vector or point-wise features).

Return type:

np.ndarray

static do_pwise_activations(model, remodel, X, reducer=None)

Assist the PointNetPwiseClassifModel.compute_pwise_activations() method.