pointconv_sa
PointConv set abstraction modules for hierarchical and global feature extraction.
Classes:
-
PointConvSetAbstraction–PointConv set-abstraction block: optional downsampling, \(k\)-NN grouping, and a
-
PointConvDensitySetAbstraction–PointConv set-abstraction block with inverse-density re-weighting.
-
PointConvGlobalSetAbstraction–Global PointConv set-abstraction block: one weight-net convolution over each whole sample.
-
PointConvDensityGlobalSetAbstraction–Global PointConv set-abstraction block with inverse-density re-weighting.
PointConvSetAbstraction
¶
PointConvSetAbstraction(
in_channels: int,
num_neighbors: int,
channels: Sequence[int],
weight_channels: Sequence[int] = (8, 8),
expansion: int = 16,
act: Union[str, Callable, None] = "relu",
act_kwargs: Optional[Dict[str, Any]] = None,
act_first: bool = False,
norm: Union[str, Callable, None] = "batch_norm",
norm_kwargs: Optional[Dict[str, Any]] = None,
bias: bool = True,
spatial_dim: int = 3,
downsample: Optional[Module] = None,
)
Bases: Module
PointConv set-abstraction block: optional downsampling, \(k\)-NN grouping, and a weight-net continuous convolution.
Parameters:
-
in_channels(int) –Number of input feature channels.
-
num_neighbors(int) –Number of neighbors gathered per output point.
-
channels(Sequence[int]) –Per-layer channel sizes of the feature MLP.
-
weight_channels(Sequence[int], default:(8, 8)) –Hidden channel sizes of the weight net applied to relative positions.
-
expansion(int, default:16) –Channel expansion factor of the final matrix multiplication.
-
spatial_dim(int, default:3) –Dimension of point coordinates.
-
downsample(Optional[Module], default:None) –Optional module returning the sampled indices (e.g.
FPS). IfNone, the resolution is unchanged.
PointConvDensitySetAbstraction
¶
PointConvDensitySetAbstraction(
in_channels: int,
num_neighbors: int,
channels: Sequence[int],
bandwidth: float = 1.0,
weight_channels: Sequence[int] = (8, 8),
density_channels: Sequence[int] = (16, 8),
expansion: int = 16,
act: Union[str, Callable, None] = "relu",
act_kwargs: Optional[Dict[str, Any]] = None,
act_first: bool = False,
norm: Union[str, Callable, None] = "batch_norm",
norm_kwargs: Optional[Dict[str, Any]] = None,
bias: bool = True,
spatial_dim: int = 3,
downsample: Optional[Module] = None,
)
Bases: Module
PointConv set-abstraction block with inverse-density re-weighting.
Same layout as PointConvSetAbstraction, with a Gaussian kernel density estimated per point;
the inverse density is transformed by a density net and re-weights the grouped features.
Parameters:
-
in_channels(int) –Number of input feature channels.
-
num_neighbors(int) –Number of neighbors gathered per output point.
-
channels(Sequence[int]) –Per-layer channel sizes of the feature MLP.
-
bandwidth(float, default:1.0) –Bandwidth of the Gaussian kernel density estimate.
-
weight_channels(Sequence[int], default:(8, 8)) –Hidden channel sizes of the weight net applied to relative positions.
-
density_channels(Sequence[int], default:(16, 8)) –Hidden channel sizes of the density net.
-
expansion(int, default:16) –Channel expansion factor of the final matrix multiplication.
-
spatial_dim(int, default:3) –Dimension of point coordinates.
-
downsample(Optional[Module], default:None) –Optional module returning the sampled indices (e.g.
FPS). IfNone, the resolution is unchanged.
PointConvGlobalSetAbstraction
¶
PointConvGlobalSetAbstraction(
in_channels: int,
channels: Sequence[int],
weight_channels: Sequence[int] = (8, 8),
expansion: int = 16,
act: Union[str, Callable, None] = "relu",
act_kwargs: Optional[Dict[str, Any]] = None,
act_first: bool = False,
norm: Union[str, Callable, None] = "batch_norm",
norm_kwargs: Optional[Dict[str, Any]] = None,
bias: bool = True,
aggr: PoolLike = "mean",
spatial_dim: int = 3,
)
Bases: Module
Global PointConv set-abstraction block: one weight-net convolution over each whole sample.
Parameters:
-
in_channels(int) –Number of input feature channels.
-
channels(Sequence[int]) –Per-layer channel sizes of the feature MLP.
-
weight_channels(Sequence[int], default:(8, 8)) –Hidden channel sizes of the weight net applied to relative positions.
-
expansion(int, default:16) –Channel expansion factor of the final matrix multiplication.
-
aggr(PoolLike, default:'mean') –Pooling used to place the single output position of each sample.
-
spatial_dim(int, default:3) –Dimension of point coordinates.
PointConvDensityGlobalSetAbstraction
¶
PointConvDensityGlobalSetAbstraction(
in_channels: int,
channels: Sequence[int],
bandwidth: float,
weight_channels: Sequence[int] = (8, 8),
density_channels: Sequence[int] = (16, 8),
expansion: int = 16,
act: Union[str, Callable, None] = "relu",
act_kwargs: Optional[Dict[str, Any]] = None,
act_first: bool = False,
norm: Union[str, Callable, None] = "batch_norm",
norm_kwargs: Optional[Dict[str, Any]] = None,
bias: bool = True,
pool: PoolLike = "mean",
spatial_dim: int = 3,
)
Bases: Module
Global PointConv set-abstraction block with inverse-density re-weighting.
Parameters:
-
in_channels(int) –Number of input feature channels.
-
channels(Sequence[int]) –Per-layer channel sizes of the feature MLP.
-
bandwidth(float) –Bandwidth of the Gaussian kernel density estimate.
-
weight_channels(Sequence[int], default:(8, 8)) –Hidden channel sizes of the weight net applied to relative positions.
-
density_channels(Sequence[int], default:(16, 8)) –Hidden channel sizes of the density net.
-
expansion(int, default:16) –Channel expansion factor of the final matrix multiplication.
-
pool(PoolLike, default:'mean') –Pooling used to place the single output position of each sample.
-
spatial_dim(int, default:3) –Dimension of point coordinates.