otx.algo.object_detection_3d.heads#
heads modules for 3d object detection.
Classes
|
Depth predictor and depth encoder. |
|
DepthAwareTransformerBuilder. |
- class otx.algo.object_detection_3d.heads.DepthAwareTransformerBuilder(model_name: str)[source]#
Bases:
object
DepthAwareTransformerBuilder.
Create the DepthAwareTransformer.
- class otx.algo.object_detection_3d.heads.DepthPredictor(depth_num_bins: int, depth_min: float, depth_max: float, hidden_dim: int, activation: ~typing.Callable[[...], ~torch.nn.modules.module.Module] = <class 'torch.nn.modules.activation.ReLU'>)[source]#
Bases:
Module
Depth predictor and depth encoder.
Initialize depth predictor and depth encoder.
- Parameters:
- forward(feature: list[Tensor], mask: Tensor, pos: Tensor) tuple[Tensor, Tensor, Tensor, Tensor] [source]#
Forward pass of the DepthPredictor.
- Parameters:
feature (List[torch.Tensor]) – The list of input feature tensors.
mask (torch.Tensor) – The mask tensor.
pos (torch.Tensor) – The positional tensor.
- Returns:
- The output tensors.
depth_logits: The depth logits tensor.
depth_embed: The depth embedding tensor.
weighted_depth: The weighted depth tensor.
depth_pos_embed_ip: The interpolated depth positional embedding tensor.
- Return type:
Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]