UnifiedDetector#

class UnifiedDetector(backbone: dict[str, ~typing.Any], label_configs: dict[str, dict[str, ~typing.Any]], postprocess: dict[str, ~typing.Any], full_in_channels: int, hidden_channels: int, num_heads: int, eval_label: str | None = None, depth: int = 3, mlp_ratio: float = 4.0, qkv_bias: bool = False, qk_scale: float | None = None, attn_drop: float = 0.0, proj_drop: float = 0.0, drop_path: float = 0.0, layer_scale: float | None = None, norm_layer: ~typing.Callable[[int], ~torch.nn.modules.module.Module] = <class 'torch.nn.modules.normalization.LayerNorm'>, act_layer: ~typing.Callable[[], ~torch.nn.modules.module.Module] = <class 'torch.nn.modules.activation.GELU'>, pre_norm: bool = True, enable_flash: bool = True, upcast_attention: bool = False, upcast_softmax: bool = False, pos_emb: bool = True, supervise_attn_mask: bool = True, mlp_point_proj: bool = False)[source]#

Bases: PointModel

Backbone, shared query decoder, losses, and panoptic postprocessing.

label_configs insertion order defines the label and query order. Each label requires query/class counts, target keys, and a criterion. Stuff, overlap, loss-weight, and query-head fields have defaults. A query head only requires a name; continuous heads default to one output, while categorical heads also specify kind="categorical" and num_classes.

The last configured label is the default evaluation label unless eval_label names another one. Evaluation also returns every label under outputs_by_label and the *_by_label aliases.

postprocess(forward_output, label=None, **overrides)[source]#

Fuse one label’s query masks and classes into point assignments.

forward_output is the dictionary returned by forward() in evaluation mode. Keyword overrides replace values from the constructor’s postprocess mapping for this call only.

up_cast(point)[source]#

Concatenate pooled-scale features back to input point resolution.

update_anneal_step(step)[source]#
UnifiedDetector.forward(input_dict, return_point=False)[source]#

Run the backbone, query decoder, and configured task losses.