open-mmlab/mmdetection · error · NotImplementedError

Regression head is not supported yet.

Error message

Regression head is not supported yet.

What it means

QuasiDenseTrackHead implements embedding-based matching only; the regress_head argument exists for interface parity with other track heads but a non-None value raises NotImplementedError because box regression for tracking is unimplemented.

Source

Thrown at mmdet/models/tracking_heads/quasi_dense_track_head.py:33

    """The quasi-dense track head."""

    def __init__(self,
                 roi_extractor: Optional[dict] = None,
                 embed_head: Optional[dict] = None,
                 regress_head: Optional[dict] = None,
                 train_cfg: Optional[dict] = None,
                 test_cfg: Optional[dict] = None,
                 init_cfg: Optional[dict] = None,
                 **kwargs):
        super().__init__(init_cfg=init_cfg)
        self.train_cfg = train_cfg
        self.test_cfg = test_cfg

        if embed_head is not None:
            self.init_embed_head(roi_extractor, embed_head)

        if regress_head is not None:
            raise NotImplementedError('Regression head is not supported yet.')

        self.init_assigner_sampler()

    def init_embed_head(self, roi_extractor, embed_head) -> None:
        """Initialize ``embed_head``

        Args:
            roi_extractor (dict, optional): Configuration of roi extractor.
                Defaults to None.
            embed_head (dict, optional): Configuration of embed head. Defaults
                to None.
        """
        self.roi_extractor = MODELS.build(roi_extractor)
        self.embed_head = MODELS.build(embed_head)

    def init_assigner_sampler(self) -> None:
        """Initialize assigner and sampler."""
        self.bbox_assigner = None

View on GitHub (pinned to cfd5d3a985)

Solutions

  1. Remove regress_head from the QuasiDenseTrackHead config (set to None / omit it)
  2. If you truly need joint detection+embedding regression, subclass and implement the regression branch yourself

Example fix

# before
track_head=dict(type='QuasiDenseTrackHead',
    embed_channels=256, regress_head=dict(type='Shared2FCBBoxHead'))
# after
track_head=dict(type='QuasiDenseTrackHead',
    embed_channels=256)  # no regress_head
Defensive patterns

Strategy: validation

Validate before calling

assert not cfg['track_head'].get('regress_head'), \
    'QuasiDenseTrackHead does not support regress_head'

Prevention

When it happens

Trigger: QuasiDenseTrackHead(embed_head=..., regress_head=dict(...)) — i.e. passing any regress_head config, e.g. copied from a QDTrack config variant that included regression.

Common situations: Copying the QDTrack paper's full config (which includes a regression branch) or adapting a two-stage head config into QuasiDenseTrackHead.

Related errors


AI-assisted analysis of open-mmlab/mmdetection@cfd5d3a985 (2026-08-27). Data as JSON: /api/errors/382d2980af612b8b. Report an issue: GitHub.