pytorch3d.implicitron.models.feature_extractor.feature_extractor
feature_extractor
- class pytorch3d.implicitron.models.feature_extractor.feature_extractor.FeatureExtractorBase(*args, **kwargs)[source]
Bases:
ReplaceableBase
,Module
Base class for an extractor of a set of features from images.
- get_feat_dims() int [source]
- Returns:
total number of feature dimensions of the output. (i.e. sum_i(dim_i))
- forward(imgs: Tensor | None, masks: Tensor | None = None, **kwargs) Dict[Any, Tensor] [source]
- Parameters:
imgs – A batch of input images of shape (B, 3, H, W).
masks – A batch of input masks of shape (B, 3, H, W).
- Returns:
out_feats –
- A dict {f_i: t_i} keyed by predicted feature names f_i
and their corresponding tensors t_i of shape (B, dim_i, H_i, W_i).