src.model.deeplearn.dlrun.grid_subsampling_post_processor
Classes
|
- class src.model.deeplearn.dlrun.grid_subsampling_post_processor.GridSubsamplingPostProcessor(gs_preproc, **kwargs)
- Author:
Alberto M. Esmoris Pena
Postprocess an input in the grid subsampling space back to the original space before the subsampling.
See
GridSubsamplingPreProcessor.- Variables:
gs_preproc (
GridSubsamplingPreProcessor) – The preprocessor that generated the grid subsampling that must be reverted by the post-processor.
- __init__(gs_preproc, **kwargs)
Initialization/instantiation of a Grid Subsampling post-processor.
- Parameters:
kwargs – The key-word arguments for the GridSubsamplingPostProcessor.
- __call__(inputs, reducer=None)
Executes the post-processing logic.
- Parameters:
inputs (dict) – A key-word input where the key “X” gives the coordinates of the points in the original point cloud. Also, the key “z” gives the predictions computed on a receptive field of \(R\) points that must be propagated back to the \(m\) points of the original point cloud.
reducer (
PredictionReducer) – The prediction reducer for the post-processor, if any.
- Returns:
The \(m\) point-wise predictions derived from the \(R\) input predictions on the receptive field.
- static pwise_reduce(npoints, nvars, I, v_propagated)
Compute a point-wise reduction of propagated values with overlapping. In other words, this method can be used to reduce values computed on overlapping neighborhoods so there is potentially more than one value for the same variable of the same point. The reduction consists of computing the mean value.
- Parameters:
npoints – The number of points.
nvars – The number of considered point-wise variables.
I – The list of neighborhoods. I[i] is the list of indices corresponding to the points composing the neighborhood i.
v_propagated – The values to be point-wise reduced. They often come from a propagation operation computed on a receptive field, thus the name.
- Returns:
The reduced v vector with a single value for the same variable of the same point.
- Return type:
np.ndarray
- static post_process(inputs, rf, I, nthreads=1, reducer=None)
Computes the post-processing logic. The method is used to aid the
grid_subsampling_post_processor.GridSubsamplingPostProcessor.__call__()method.- Parameters:
inputs (dict) – A key-word input where the key “X” gives the coordinates of the points in the original point cloud. Also, the key “z” gives the predictions computed on a receptive field of \(R\) points that must be propagated back to the \(m\) points of the original point cloud.
rf (list) – The receptive fields to compute the propagations. See
ReceptiveFieldandReceptiveFieldGS.I (list) – The list of neighborhoods, where each neighborhood is given as a list of indices.
nthreads (int) – The number of threads for parallel computing.
reducer (
PredictionReducer) – The prediction reducer for the post-processor, if any.
- Returns:
The \(m\) point-wise predictions derived from the \(R\) input predictions on the receptive field.