open-mmlab/mmdetection · error · NotImplementedError
Regression head is not supported yet.
Error message
Regression head is not supported yet.
What it means
RoITrackHead (base class of QuasiDenseTrackHead) only initializes an embed head; passing regress_head raises NotImplementedError since the regression branch is not implemented in mmdet.
Source
Thrown at mmdet/models/tracking_heads/roi_track_head.py:46
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,
*args,
**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``"""
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
self.bbox_sampler = None
if self.train_cfg:
self.bbox_assigner = TASK_UTILS.build(self.train_cfg.assigner)
self.bbox_sampler = TASK_UTILS.build(
self.train_cfg.sampler, default_args=dict(context=self))
@propertyView on GitHub (pinned to cfd5d3a985)
Solutions
- Drop regress_head from the config
- In custom subclasses that do implement regression, override __init__ to handle regress_head before calling super() with regress_head=None
Example fix
# before head=dict(type='RoITrackHead', embed_head=..., regress_head=...) # after head=dict(type='RoITrackHead', embed_head=...) # omit regress_head
Defensive patterns
Strategy: validation
Validate before calling
assert not cfg.get('regress_head'), 'RoITrackHead regress_head unsupported' Prevention
- Custom subclasses should consume regress_head before calling super().__init__
- Keep track head configs minimal: embed_head only
When it happens
Trigger: Any track head derived from RoITrackHead constructed with a non-None regress_head in its config.
Common situations: Custom track heads inheriting RoITrackHead while forwarding a regress_head kwarg from the config; or config drift from upstream QDTrack.
Related errors
- Regression head is not supported yet.
- trackeval is not installed,please install it by: pip install
- metric must be a list or a str.
- metric {metric} is not supported.
- _forward function (namely 'tensor' mode) is not supported no
AI-assisted analysis of open-mmlab/mmdetection@cfd5d3a985 (2026-08-27).
Data as JSON: /api/errors/eb47b69525c796de.
Report an issue: GitHub.