{"record":{"id":"eb47b69525c796de","repo":"open-mmlab/mmdetection","slug":"regression-head-is-not-supported-yet-eb47b6","errorCode":null,"errorMessage":"Regression head is not supported yet.","messagePattern":"Regression head is not supported yet\\.","errorType":"validation","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"mmdet/models/tracking_heads/roi_track_head.py","lineNumber":46,"sourceCode":"\n    def __init__(self,\n                 roi_extractor: Optional[dict] = None,\n                 embed_head: Optional[dict] = None,\n                 regress_head: Optional[dict] = None,\n                 train_cfg: Optional[dict] = None,\n                 test_cfg: Optional[dict] = None,\n                 init_cfg: Optional[dict] = None,\n                 *args,\n                 **kwargs):\n        super().__init__(init_cfg=init_cfg)\n        self.train_cfg = train_cfg\n        self.test_cfg = test_cfg\n\n        if embed_head is not None:\n            self.init_embed_head(roi_extractor, embed_head)\n\n        if regress_head is not None:\n            raise NotImplementedError('Regression head is not supported yet.')\n\n        self.init_assigner_sampler()\n\n    def init_embed_head(self, roi_extractor, embed_head) -> None:\n        \"\"\"Initialize ``embed_head``\"\"\"\n        self.roi_extractor = MODELS.build(roi_extractor)\n        self.embed_head = MODELS.build(embed_head)\n\n    def init_assigner_sampler(self) -> None:\n        \"\"\"Initialize assigner and sampler.\"\"\"\n        self.bbox_assigner = None\n        self.bbox_sampler = None\n        if self.train_cfg:\n            self.bbox_assigner = TASK_UTILS.build(self.train_cfg.assigner)\n            self.bbox_sampler = TASK_UTILS.build(\n                self.train_cfg.sampler, default_args=dict(context=self))\n\n    @property","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/mmdet/models/tracking_heads/roi_track_head.py#L28-L64","documentation":"RoITrackHead (base class of QuasiDenseTrackHead) only initializes an embed head; passing regress_head raises NotImplementedError since the regression branch is not implemented in mmdet.","triggerScenarios":"Any track head derived from RoITrackHead constructed with a non-None regress_head in its config.","commonSituations":"Custom track heads inheriting RoITrackHead while forwarding a regress_head kwarg from the config; or config drift from upstream QDTrack.","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"],"exampleFix":"# before\nhead=dict(type='RoITrackHead', embed_head=..., regress_head=...)\n# after\nhead=dict(type='RoITrackHead', embed_head=...)  # omit regress_head","handlingStrategy":"validation","validationCode":"assert not cfg.get('regress_head'), 'RoITrackHead regress_head unsupported'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Custom subclasses should consume regress_head before calling super().__init__","Keep track head configs minimal: embed_head only"],"tags":["mmdetection","tracking","roi-head","not-implemented"],"backgroundTag":"unsupported-feature","analyzedSha":"cfd5d3a985b0249de009b67d04f37263e11cdf3d","analyzedAt":"2026-08-27T20:54:20.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}