model.deeplearn package
Subpackages
- model.deeplearn.arch package
- Submodules
- model.deeplearn.arch.architecture module
ArchitectureArchitecture.__init__()Architecture.run_pre()Architecture.run_post()Architecture.build()Architecture.is_built()Architecture.build_input()Architecture.build_hidden()Architecture.build_output()Architecture.plot()Architecture.overwrite_pretrained_model()Architecture.get_num_output_heads()Architecture.pre_processor_to_temporary_file()Architecture.pre_processor_from_temporary_file()
- model.deeplearn.arch.conv_autoenc_pwise_classif module
ConvAutoencPwiseClassifConvAutoencPwiseClassif.__init__()ConvAutoencPwiseClassif.build_input()ConvAutoencPwiseClassif.build_hidden()ConvAutoencPwiseClassif.build_output()ConvAutoencPwiseClassif.get_num_output_heads()ConvAutoencPwiseClassif.build_downsampling_hierarchy()ConvAutoencPwiseClassif.build_downsampling_pnet_hierarchy()ConvAutoencPwiseClassif.build_downsampling_kpconv_hierarchy()ConvAutoencPwiseClassif.build_downsampling_layer()ConvAutoencPwiseClassif.build_downsampling_lightkpconv_hierarchy()ConvAutoencPwiseClassif.build_downsampling_pttransf_hierarchy()ConvAutoencPwiseClassif.build_downsampling_gpttransf_hierarchy()ConvAutoencPwiseClassif.build_encoding_gpttransf_block()ConvAutoencPwiseClassif.build_downsampling_pointmlp_hierarchy()ConvAutoencPwiseClassif.build_encoding_pointmlp_block()ConvAutoencPwiseClassif.build_downsampling_kpconvx_hierarchy()ConvAutoencPwiseClassif.build_encoding_kpconvx_block()ConvAutoencPwiseClassif.build_downsampling_contextual_hierarchy()ConvAutoencPwiseClassif.build_encoding_contextual_block()ConvAutoencPwiseClassif.build_upsampling_hierarchy()ConvAutoencPwiseClassif.build_upsampling_layer()ConvAutoencPwiseClassif.build_decoding_kpconvx()ConvAutoencPwiseClassif.apply_prewrap()ConvAutoencPwiseClassif.apply_postwrap()ConvAutoencPwiseClassif.unary_convolution_prewrap()ConvAutoencPwiseClassif.unary_convolution_postwrap()ConvAutoencPwiseClassif.hourglass_prewrap()ConvAutoencPwiseClassif.hourglass_postwrap()ConvAutoencPwiseClassif.point_transformer_prewrap()ConvAutoencPwiseClassif.point_transformer_postwrap()ConvAutoencPwiseClassif.prefit_logic_callback()ConvAutoencPwiseClassif.posfit_logic_callback()
- model.deeplearn.arch.point_net module
- model.deeplearn.arch.point_net_pwise_classif module
- model.deeplearn.arch.rbfnet module
- model.deeplearn.arch.rbfnet_pwise_classif module
- model.deeplearn.arch.spconv3d_pwise_classif module
SpConv3DPwiseClassifSpConv3DPwiseClassif.__init__()SpConv3DPwiseClassif.build_input()SpConv3DPwiseClassif.build_hidden()SpConv3DPwiseClassif.build_output()SpConv3DPwiseClassif.build_spconv_hierarchy()SpConv3DPwiseClassif.build_layer_by_layer_downsampling_hierarchy()SpConv3DPwiseClassif.build_layer_by_layer_upsampling_hierarchy()SpConv3DPwiseClassif.build_encoder_layer_downsampling_hierarchy()SpConv3DPwiseClassif.build_decoder_layer_upsampling_hierarchy()SpConv3DPwiseClassif.build_nonresidual_spconv_block()SpConv3DPwiseClassif.build_residual_spconv_block()SpConv3DPwiseClassif.build_residual_conv1d_block()SpConv3DPwiseClassif.spconv_prewrap()SpConv3DPwiseClassif.spconv_postwrap()
- Module contents
- model.deeplearn.dlrun package
- Submodules
- model.deeplearn.dlrun.furthest_point_subsampling_post_processor module
- model.deeplearn.dlrun.furthest_point_subsampling_post_processorpp module
FurthestPointSubsamplingPostProcessorPPFurthestPointSubsamplingPostProcessorPP.__init__()FurthestPointSubsamplingPostProcessorPP.post_process()FurthestPointSubsamplingPostProcessorPP.find_cpp_postproc_fun()FurthestPointSubsamplingPostProcessorPP.find_cpp_reduction_type()FurthestPointSubsamplingPostProcessorPP.extract_cpp_extra_args()
- model.deeplearn.dlrun.furthest_point_subsampling_pre_processor module
FurthestPointSubsamplingPreProcessorFurthestPointSubsamplingPreProcessor.__init__()FurthestPointSubsamplingPreProcessor.__call__()FurthestPointSubsamplingPreProcessor.get_num_input_points()FurthestPointSubsamplingPreProcessor.clean_support_neighborhoods()FurthestPointSubsamplingPreProcessor.reduce_labels()FurthestPointSubsamplingPreProcessor.find_neighborhood()FurthestPointSubsamplingPreProcessor.overwrite_pretrained_model()FurthestPointSubsamplingPreProcessor.from_temporary_file()
- model.deeplearn.dlrun.furthest_point_subsampling_pre_processorpp module
FurthestPointSubsamplingPreProcessorPPFurthestPointSubsamplingPreProcessorPP.__init__()FurthestPointSubsamplingPreProcessorPP.__call__()FurthestPointSubsamplingPreProcessorPP.reduce_labels()FurthestPointSubsamplingPreProcessorPP.reduce_labels_python()FurthestPointSubsamplingPreProcessorPP.find_cpp_reduce_label_function()FurthestPointSubsamplingPreProcessorPP.prepare_training_class_distribution()FurthestPointSubsamplingPreProcessorPP.prepare_radii()FurthestPointSubsamplingPreProcessorPP.prepare_oversampling()
- model.deeplearn.dlrun.grid_subsampling_post_processor module
- model.deeplearn.dlrun.grid_subsampling_pre_processor module
GridSubsamplingPreProcessorGridSubsamplingPreProcessor.__init__()GridSubsamplingPreProcessor.__call__()GridSubsamplingPreProcessor.get_num_input_points()GridSubsamplingPreProcessor.build_support_points()GridSubsamplingPreProcessor.clean_support_neighborhoods()GridSubsamplingPreProcessor.support_points_to_file()GridSubsamplingPreProcessor.reduce_labels()GridSubsamplingPreProcessor.find_neighborhood()GridSubsamplingPreProcessor.overwrite_pretrained_model()GridSubsamplingPreProcessor.handle_unit_sphere_transform()
- model.deeplearn.dlrun.hierarchical_fps_post_processor module
- model.deeplearn.dlrun.hierarchical_fps_post_processorpp module
- model.deeplearn.dlrun.hierarchical_fps_pre_processor module
- model.deeplearn.dlrun.hierarchical_fps_pre_processorpp module
- model.deeplearn.dlrun.hierarchical_post_processor module
- model.deeplearn.dlrun.hierarchical_pre_processor module
- model.deeplearn.dlrun.hierarchical_sg_post_processorpp module
- model.deeplearn.dlrun.hierarchical_sg_pre_processorpp module
- model.deeplearn.dlrun.point_net_post_processor module
- model.deeplearn.dlrun.point_net_pre_processor module
- model.deeplearn.dlrun.receptive_field_pre_processor module
ReceptiveFieldPreProcessorReceptiveFieldPreProcessor.__init__()ReceptiveFieldPreProcessor.__call__()ReceptiveFieldPreProcessor.export_support_points()ReceptiveFieldPreProcessor.overwrite_pretrained_model()ReceptiveFieldPreProcessor.update_paths()ReceptiveFieldPreProcessor.transform_to_unit_sphere()ReceptiveFieldPreProcessor.handle_unit_sphere_transform()ReceptiveFieldPreProcessor.fit_receptive_fields()ReceptiveFieldPreProcessor.handle_features_reduction()ReceptiveFieldPreProcessor.num_classes_from_pwise_labels()ReceptiveFieldPreProcessor.purge_receptive_fields()ReceptiveFieldPreProcessor.to_temporary_file()ReceptiveFieldPreProcessor.from_temporary_file()
- Module contents
- model.deeplearn.handle package
- Submodules
- model.deeplearn.handle.dl_callback_builder module
- model.deeplearn.handle.dl_class_weighter module
- model.deeplearn.handle.dl_label_formatter module
- model.deeplearn.handle.dl_model_compiler module
- model.deeplearn.handle.dl_model_handler module
- model.deeplearn.handle.dl_model_reporter module
- model.deeplearn.handle.dl_path_manager module
- model.deeplearn.handle.dl_pretrained_handler module
- model.deeplearn.handle.dl_sequencer_builder module
- model.deeplearn.handle.dl_training_handler module
DLTrainingHandlerDLTrainingHandler.__init__()DLTrainingHandler.__call__()DLTrainingHandler.pre_fit()DLTrainingHandler.fit()DLTrainingHandler.model_fit()DLTrainingHandler.store_fit_backup()DLTrainingHandler.restore_fit_backup()DLTrainingHandler.check_architecture_needs_backup()DLTrainingHandler.check_input_needs_backup()DLTrainingHandler.post_fit()DLTrainingHandler.prepare_freeze_training()DLTrainingHandler.handle_round_robin_freezing()DLTrainingHandler.handle_random_freezing()
- model.deeplearn.handle.dl_transfer_handler module
DLTransferHandlerDLTransferHandler.__init__()DLTransferHandler.transfer()DLTransferHandler.do_transfer()DLTransferHandler.transfer_from_model_file()DLTransferHandler.transfer_from_weights_file()DLTransferHandler.can_transfer()DLTransferHandler.extract_neural_network_from_model_handler()DLTransferHandler.translate_layer_name()DLTransferHandler.update_paths()
- model.deeplearn.handle.simple_dl_model_handler module
- Module contents
- model.deeplearn.initializer package
- Submodules
- model.deeplearn.initializer.fibonacci_shell_initializer module
- model.deeplearn.initializer.initializer module
- model.deeplearn.initializer.kernel_point_ball_initializer module
- model.deeplearn.initializer.kernel_point_structure_initializer module
KernelPointStructureInitializerKernelPointStructureInitializer.__init__()KernelPointStructureInitializer.__call__()KernelPointStructureInitializer.sample_concentric_ellipsoids()KernelPointStructureInitializer.sample_concentric_grids()KernelPointStructureInitializer.sample_concentric_rectangulars()KernelPointStructureInitializer.sample_concentric_cylinders()KernelPointStructureInitializer.sample_cone()KernelPointStructureInitializer.compute_num_kernel_points()
- Module contents
- model.deeplearn.layer package
- Submodules
- model.deeplearn.layer.contextual_point_layer module
- model.deeplearn.layer.downsampling_spconv3d_layer module
- model.deeplearn.layer.expansion_layer module
- model.deeplearn.layer.features_downsampling_layer module
FeaturesDownsamplingLayerFeaturesDownsamplingLayer.__init__()FeaturesDownsamplingLayer.build()FeaturesDownsamplingLayer.call()FeaturesDownsamplingLayer.mean_filter()FeaturesDownsamplingLayer.max_filter()FeaturesDownsamplingLayer.gaussian_filter()FeaturesDownsamplingLayer.exponential_filter()FeaturesDownsamplingLayer.nearest_filter()FeaturesDownsamplingLayer.compute_squared_distances()FeaturesDownsamplingLayer.gather_input_features()FeaturesDownsamplingLayer.get_config()FeaturesDownsamplingLayer.from_config()
- model.deeplearn.layer.features_structuring_layer module
FeaturesStructuringLayerFeaturesStructuringLayer.__init__()FeaturesStructuringLayer.build()FeaturesStructuringLayer.call()FeaturesStructuringLayer.concatf_full()FeaturesStructuringLayer.concatf_opaque()FeaturesStructuringLayer.assign_concatf()FeaturesStructuringLayer.get_config()FeaturesStructuringLayer.from_config()FeaturesStructuringLayer.export_representation()
- model.deeplearn.layer.features_upsampling_layer module
FeaturesUpsamplingLayerFeaturesUpsamplingLayer.__init__()FeaturesUpsamplingLayer.build()FeaturesUpsamplingLayer.call()FeaturesUpsamplingLayer.mean_filter()FeaturesUpsamplingLayer.max_filter()FeaturesUpsamplingLayer.gaussian_filter()FeaturesUpsamplingLayer.exponential_filter()FeaturesUpsamplingLayer.nearest_filter()FeaturesUpsamplingLayer.get_config()FeaturesUpsamplingLayer.from_config()
- model.deeplearn.layer.geometric_affine_layer module
- model.deeplearn.layer.grouped_point_transformer_layer module
- model.deeplearn.layer.grouping_point_net_layer module
- model.deeplearn.layer.hourglass_layer module
HourglassLayerHourglassLayer.__init__()HourglassLayer.build()HourglassLayer.call()HourglassLayer.do_hourglass_regularization()HourglassLayer.do_no_regularization()HourglassLayer.compute_spectral_unsafe()HourglassLayer.compute_spectral_safe()HourglassLayer.compute_spectral_approx()HourglassLayer.get_config()HourglassLayer.from_config()
- model.deeplearn.layer.interdimensional_point_transformer_layer module
- model.deeplearn.layer.kpconv_layer module
- model.deeplearn.layer.kpconvx_layer module
- model.deeplearn.layer.layer module
- model.deeplearn.layer.light_kpconv_layer module
- model.deeplearn.layer.point_mlp_layer module
- model.deeplearn.layer.point_transformer_layer module
- model.deeplearn.layer.rbf_feat_extract_layer module
- model.deeplearn.layer.rbf_feat_processing_layer module
RBFFeatProcessingLayerRBFFeatProcessingLayer.__init__()RBFFeatProcessingLayer.build()RBFFeatProcessingLayer.call()RBFFeatProcessingLayer.compute_gaussian_kernel()RBFFeatProcessingLayer.compute_markov_kernel()RBFFeatProcessingLayer.get_config()RBFFeatProcessingLayer.from_config()RBFFeatProcessingLayer.export_representation()
- model.deeplearn.layer.shadow_activation_layer module
- model.deeplearn.layer.shadow_batch_normalization_layer module
- model.deeplearn.layer.shadow_conv1d_layer module
- model.deeplearn.layer.shadow_dense_layer module
- model.deeplearn.layer.sparse_indexing_map_layer module
- model.deeplearn.layer.spconv3d_decoding_layer module
- model.deeplearn.layer.spconv3d_encoding_layer module
- model.deeplearn.layer.strided_kpconv_layer module
- model.deeplearn.layer.strided_light_kpconv_layer module
- model.deeplearn.layer.submanifold_spconv3d_layer module
- model.deeplearn.layer.upsampling_spconv3d_layer module
- Module contents
- model.deeplearn.loss package
- Submodules
- model.deeplearn.loss.class_weighted_binary_crossentropy module
- model.deeplearn.loss.class_weighted_categorical_crossentropy module
- model.deeplearn.loss.multiloss_linear_superposition module
- model.deeplearn.loss.ragged_binary_crossentropy module
- model.deeplearn.loss.ragged_categorical_crossentropy module
- model.deeplearn.loss.ragged_class_weighted_binary_crossentropy module
- model.deeplearn.loss.ragged_class_weighted_categorical_crossentropy module
- Module contents
- model.deeplearn.metric package
- model.deeplearn.optimizer package
- Submodules
- model.deeplearn.optimizer.centralized_adadelta module
- model.deeplearn.optimizer.centralized_adagrad module
- model.deeplearn.optimizer.centralized_adam module
- model.deeplearn.optimizer.centralized_adamax module
- model.deeplearn.optimizer.centralized_adamw module
- model.deeplearn.optimizer.centralized_ftrl module
- model.deeplearn.optimizer.centralized_lamb module
- model.deeplearn.optimizer.centralized_lion module
- model.deeplearn.optimizer.centralized_nadam module
- model.deeplearn.optimizer.centralized_rmsprop module
- model.deeplearn.optimizer.centralized_sgd module
- Module contents
- model.deeplearn.regularizer package
- model.deeplearn.sequencer package
- Submodules
- model.deeplearn.sequencer.dl_abstract_sequencer module
DLAbstractSequencerDLAbstractSequencer.__init__()DLAbstractSequencer.on_epoch_end()DLAbstractSequencer.set_input_data()DLAbstractSequencer.get_input_data()DLAbstractSequencer.augment()DLAbstractSequencer.getitem_training()DLAbstractSequencer.on_epoch_end_training()DLAbstractSequencer.enable_training_mode()DLAbstractSequencer.getitem_predict()DLAbstractSequencer.on_epoch_end_predict()DLAbstractSequencer.enable_predict_mode()DLAbstractSequencer.init_random_indices()DLAbstractSequencer.apply_random_indices()DLAbstractSequencer.extract_input_batch()DLAbstractSequencer.extract_reference_batch()DLAbstractSequencer.post_process_output()
- model.deeplearn.sequencer.dl_offline_sequencer module
DLOfflineSequencerDLOfflineSequencer.__init__()DLOfflineSequencer.set_input_data()DLOfflineSequencer.get_input_data()DLOfflineSequencer.getitem_training()DLOfflineSequencer.on_epoch_end_training()DLOfflineSequencer.getitem_predict()DLOfflineSequencer.on_epoch_end_predict()DLOfflineSequencer.is_offline_storage_open()DLOfflineSequencer.open_offline_storage()DLOfflineSequencer.are_pclouds_loaded_in_offline_storage()DLOfflineSequencer.load_pclouds_in_offline_storage()DLOfflineSequencer.load_backbone_pcloud_in_offline_storage()DLOfflineSequencer.insert_chunk_into_offline_storage_file()DLOfflineSequencer.load_pcloud_in_backbone()DLOfflineSequencer.is_offline_storage_file_initialized()DLOfflineSequencer.initialize_offline_storage_file()DLOfflineSequencer.getitem_training_from_offline_storage()DLOfflineSequencer.load_current_chunk_in_cache()DLOfflineSequencer.init_random_indices()DLOfflineSequencer.apply_random_indices()DLOfflineSequencer.post_process_output()
- model.deeplearn.sequencer.dl_sequencer module
- model.deeplearn.sequencer.dl_sparse_shadow_sequencer module
DLSparseShadowSequencerDLSparseShadowSequencer.__init__()DLSparseShadowSequencer.set_input_data()DLSparseShadowSequencer.getitem_training()DLSparseShadowSequencer.getitem_predict()DLSparseShadowSequencer.on_epoch_end_training()DLSparseShadowSequencer.init_random_indices()DLSparseShadowSequencer.apply_random_indices()DLSparseShadowSequencer.prepare_data()DLSparseShadowSequencer.prepare_indexing_maps()DLSparseShadowSequencer.extract_input_batch()DLSparseShadowSequencer.extract_reference_batch()DLSparseShadowSequencer.post_process_output()
- Module contents
Submodules
model.deeplearn.conv_autoenc_pwise_classif_model module
- class model.deeplearn.conv_autoenc_pwise_classif_model.ConvAutoencPwiseClassifModel(**kwargs)
Bases:
ClassificationModel- Author:
Alberto M. Esmoris Pena
Convolutional autoencoder model for classification tasks. See
ClassificationModel.- Variables:
model (
DLModelHandler) – The deep learning model wrapped by the corresponding handler, i.e., theConvAutoencPwiseClassifmodel wrapped by aSimpleDLModelHandlerhandler.
- static extract_model_args(spec)
Extract the arguments to initialize/instantiate a ConvAutoencPwiseClassifModel from a key-word specification.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate a ConvAutoencPwiseClassifModel.
- __init__(**kwargs)
Initialize an instance of ConvAutoencPwiseClassifModel.
- Parameters:
kwargs – The attributes for the ConvAutoencPwiseClassifModel that will also be passed to the parent.
- prepare_model()
Prepare a convolutional autoencoder 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:
- overwrite_pretrained_model(spec)
See
model.Model.overwrite_pretrained_model().
- update_paths()
Consider the current specification of model args (self.model_args) to update the paths.
- predict(pcloud, X=None, F=None)
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 and F matrix as different entities.- Parameters:
X (
np.ndarray) – The input matrix of coordinates where each row represents a point from the point cloud (OPTIONAL). If not given, it will be retrieved from the point cloud.F (
np.ndarray) – The input matrix of features (OPTIONAL). If not given, it will be retrieved from the point cloud if there are feature names (fnames) available.
- 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 convolutional autoencoder point-wise classifier.
See
ClassificationModelandModel. Also seemodel.Model.training().- Parameters:
F (
np.ndarray) – An optional (can be None) matrix of input features.
- on_training_finished(X, y, yhat=None)
See
model.Model.on_training_finished().
- compute_pwise_activations(X, reducer=None)
Compute the point-wise activations of the last layer before the output softmax (or sigmoid for binary classification) layer in the convolutional autoencoder point-wise classification model.
- Parameters:
X (
np.ndarrayor list) – The matrix of coordinates representing the point cloud. Alternatively, it can be a list such that X[0] is the matrix of coordinates and X[1] the matrix of features.reducer (
PredictionReduceror None) – The prediction reducer to reduce the point-wise activations (it should be the same used for typical predictions).
- 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
model.deeplearn.deep_learning_exception module
- exception model.deeplearn.deep_learning_exception.DeepLearningException(message='')
Bases:
VL3DException- Author:
Alberto M. Esmoris Pena
Class for exceptions related to deep learning components. See
VL3DException.- __init__(message='')
model.deeplearn.point_net_pwise_classif_model module
- class model.deeplearn.point_net_pwise_classif_model.PointNetPwiseClassifModel(**kwargs)
Bases:
ClassificationModel- 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., thePointNetPwiseClassifmodel wrapped by aSimpleDLModelHandlerhandler.
- 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.
- 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:
- overwrite_pretrained_model(spec)
See
model.Model.overwrite_pretrained_model().
- static update_pretrained_model(dlmodel, spec)
- 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
ClassificationModelandModel. Also seemodel.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()andPointNetPwiseClassifModel.on_training_finished_evaluate().
- static on_training_finished_evaluate(dlmodel, X, y, zhat, yhat, reducer=None)
See
PointNetPwiseClassifModel.on_training_finished()andPointNetPwiseClassifModel.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.
model.deeplearn.rbf_net_pwise_classif_model module
- class model.deeplearn.rbf_net_pwise_classif_model.RBFNetPwiseClassifModel(**kwargs)
Bases:
ClassificationModel- Author:
Alberto M. Esmoris Pena
RBFNet model for point-wise classification tasks. See
ClassificationModel.- Variables:
model (
DLModelHandler) – The deep learning model wrapped by the corresponding handler, i.e., theRBFNetPwiseClassifmodel wrapped by aSimpleDLModelHandlerhandler.
- static extract_model_args(spec)
Extract the arguments to initialize/instantiate a RBFNetPwiseClassifModel from a key-word specification.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate a RBFNetPwiseClassifModel.
- __init__(**kwargs)
Initialize an instance of RBFNetPwiseClassifModel.
- Parameters:
kwargs – The attributes for the RBFNetPwiseClassifModel that will also be passed to the parent.
- prepare_model()
Prepare a RBFNet 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:
- overwrite_pretrained_model(spec)
See
model.Model.overwrite_pretrained_model().
- 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 RBFNet implementation does not support input features.- Parameters:
pcloud (
PointCloud) – The input point cloudX (
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 RBFNet-based point-wise classifier.
See
ClassificationModelandModel. Also seemodel.Model.training().- Parameters:
F – Ignored.
- on_training_finished(X, y, yhat=None)
See
model.Model.on_training_finished().
- compute_pwise_activations(X)
Compute the point wise activations of the last layer before the output softmax layer in the RBFNet-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
model.deeplearn.spconv3d_pwise_classif_model module
- class model.deeplearn.spconv3d_pwise_classif_model.SpConv3DPwiseClassifModel(**kwargs)
Bases:
ClassificationModel- Author:
Alberto M. Esmoris Pena
Sparse 3D convolutional model for classification tasks. See
ClassificationModel.- Variables:
model (
DLModelHandler) – The deep learning model wrapped by the corresponding handler, i.e., theSpConv3DPwiseClassifmodel wrapped by aSimpleDLModelHandlerhandler.
- static extract_model_args(spec)
Extract the arguments to initialize/instantiate a SpConv3DPwiseClassifModel from a key-word specification.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate a SpConv3DPwiseClassifModel.
- __init__(**kwargs)
Initialize an instance of SpConv3DPwiseClassifModel.
- Parameters:
kwargs – The attributes for the SpConv3DPwiseClassifModel that will also be passed to the parent.
- prepare_model()
Prepare a sparse 3D convolutional 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:
- overwrite_pretrained_model(spec)
See
model.Model.overwrite_pretrained_model().
- update_paths()
Consider the current specification of model args (self.model_args) to update the paths.
- predict(pcloud, X=None, F=None)
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 and F matrix as different entities.- Parameters:
X (
np.ndarray) – The input matrix of coordinates where each row represents a point from the point cloud (OPTIONAL). If not given, it will be retrieved from the point cloud.F (
np.ndarray) – The input matrix of features (OPTIONAL). If not given, it will be retrieved from the point cloud if there are feature names (fnames) available.
- 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 sparse 3D convolutional point-wise classifier.
See
ClassificationModelandModel. Also seemodel.Model.training().- Parameters:
F (
np.ndarray) – An optional (can be None) matrix of input features.
- on_training_finished(X, y, yhat=None)
See
model.Model.on_training_finished().
- compute_pwise_activations(X, reducer=None)
Compute the point-wise activations of the last layer before the output softmax (or sigmoid for binary classification) layer in the 3D sparse convolutional point-wise classification model.
- Parameters:
X (
np.ndarrayor list) – The matrix of coordinates representing the point cloud. Alternatively, it can be a list such that X[0] is the matrix of coordinates and X[1] the matrix of features.reducer (
PredictionReduceror None) – The prediction reducer to reduce the point-wise activations (it should be the same used for typical predictions).
- 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
Module contents
- author:
Alberto M. Esmoris Pena
The deeplearn package contains the logic to handle deep learning-based models for classification and regression problems on point clouds.