MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / FCAF3DHeadRotMat

Class FCAF3DHeadRotMat

embodiedscan/models/dense_heads/fcaf3d_head.py:828–1725  ·  view source on GitHub ↗

r"""FCAF3D head with a 6D representation for rotation of boxes. Actually here we store both the sparse 3D FPN and a head. The neck and the head can not be simply separated as pruning score on the i-th level of FPN requires classification scores from i+1-th level of the head. Args:

Source from the content-addressed store, hash-verified

826
827@MODELS.register_module()
828class FCAF3DHeadRotMat(BaseModel):
829 r"""FCAF3D head with a 6D representation for rotation of boxes.
830
831 Actually here we store both the sparse 3D FPN and a head. The neck and
832 the head can not be simply separated as pruning score on the i-th level
833 of FPN requires classification scores from i+1-th level of the head.
834
835 Args:
836 num_classes (int): Number of classes.
837 in_channels (tuple(int)): Number of channels in input tensors.
838 out_channels (int): Number of channels in the neck output tensors.
839 num_reg_outs (int): Number of regression layer channels.
840 voxel_size (float): Voxel size in meters.
841 pts_prune_threshold (int): Pruning threshold on each feature level.
842 pts_assign_threshold (int): Box to location assigner parameter.
843 Assigner selects the maximum feature level with more locations
844 inside the box than pts_assign_threshold.
845 pts_center_threshold (int): Box to location assigner parameter.
846 After feature level for the box is determined, assigner selects
847 pts_center_threshold locations closest to the box center.
848 center_loss (dict): Config of centerness loss. Defaults to
849 dict(type='mmdet.CrossEntropyLoss', use_sigmoid=True).
850 bbox_loss (dict): Config of bbox loss. Defaults to
851 dict(type='BBoxCDLoss', mode='l1', loss_weight=1.0, group='g8').
852 cls_loss (dict): Config of classification loss. Defaults to
853 dict = dict(type='mmdet.FocalLoss').
854 train_cfg (dict, optional): Config for train stage. Defaults to None.
855 test_cfg (dict, optional): Config for test stage. Defaults to None.
856 init_cfg (dict, optional): Config for weight initialization.
857 Defaults to None.
858 """
859
860 def __init__(self,
861 num_classes: int,
862 in_channels: Tuple[int],
863 out_channels: int,
864 num_reg_outs: int,
865 voxel_size: float,
866 pts_prune_threshold: int,
867 pts_assign_threshold: int,
868 pts_center_threshold: int,
869 center_loss: dict = dict(type='mmdet.CrossEntropyLoss',
870 use_sigmoid=True),
871 bbox_loss: dict = dict(type='BBoxCDLoss',
872 mode='l1',
873 loss_weight=1.0,
874 group='g8'),
875 cls_loss: dict = dict(type='mmdet.FocalLoss'),
876 decouple_bbox_loss: bool = False,
877 decouple_groups: int = 3,
878 decouple_weights: Optional[list] = None,
879 norm_decouple_loss: bool = False,
880 train_cfg: Optional[dict] = None,
881 test_cfg: Optional[dict] = None,
882 init_cfg: Optional[dict] = None):
883 super(FCAF3DHeadRotMat, self).__init__(init_cfg)
884 if ME is None:
885 raise ImportError(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected