{"record":{"id":"a8dd7278a468850b","repo":"open-mmlab/mmdetection","slug":"you-are-calling-simple-test-bboxes-in-dense-tes","errorCode":null,"errorMessage":"You are calling `simple_test_bboxes` in `dense_test_mixins`, but the `dense_test_mixins`will be deprecated soon. Please use `simple_test` instead.","messagePattern":"You are calling `simple_test_bboxes` in `dense_test_mixins`, but the `dense_test_mixins`will be deprecated soon\\. Please use `simple_test` instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"mmdet/models/dense_heads/dense_test_mixins.py","lineNumber":44,"sourceCode":"            feats (tuple[torch.Tensor]): Multi-level features from the\n                upstream network, each is a 4D-tensor.\n            img_metas (list[dict]): List of image information.\n            rescale (bool, optional): Whether to rescale the results.\n                Defaults to False.\n\n        Returns:\n            list[obj:`InstanceData`]: Detection results of each\n                image after the post process. \\\n                Each item usually contains following keys. \\\n\n                - scores (Tensor): Classification scores, has a shape\n                  (num_instance,)\n                - labels (Tensor): Labels of bboxes, has a shape\n                  (num_instances,).\n                - bboxes (Tensor): Has a shape (num_instances, 4),\n                  the last dimension 4 arrange as (x1, y1, x2, y2).\n        \"\"\"\n        warnings.warn('You are calling `simple_test_bboxes` in '\n                      '`dense_test_mixins`, but the `dense_test_mixins`'\n                      'will be deprecated soon. Please use '\n                      '`simple_test` instead.')\n        outs = self.forward(feats)\n        results_list = self.get_results(\n            *outs, img_metas=img_metas, rescale=rescale)\n        return results_list\n\n    def aug_test_bboxes(self, feats, img_metas, rescale=False):\n        \"\"\"Test det bboxes with test time augmentation, can be applied in\n        DenseHead except for ``RPNHead`` and its variants, e.g., ``GARPNHead``,\n        etc.\n\n        Args:\n            feats (list[Tensor]): the outer list indicates test-time\n                augmentations and inner Tensor should have a shape NxCxHxW,\n                which contains features for all images in the batch.\n            img_metas (list[list[dict]]): the outer list indicates test-time","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/mmdet/models/dense_heads/dense_test_mixins.py#L26-L62","documentation":"Warns that the DenseTestMixins.simple_test_bboxes path is deprecated in favor of the head's unified simple_test method. The mixin still runs (it forwards feats and calls get_results) but will be removed.","triggerScenarios":"Calling head.simple_test_bboxes(...) directly on a head that inherits DenseTestMixins (e.g. older YOLO/Retina-style heads).","commonSituations":"Custom test scripts or inherited head code calling simple_test_bboxes instead of the detector's standard test path.","solutions":["Switch to head.simple_test(feats, img_metas, rescale=True) which returns results_list","Refactor custom heads to override simple_test rather than mixin methods"],"exampleFix":"# before\nbboxes, labels = self.bbox_head.simple_test_bboxes(feats, img_metas, ...) \n# after\nresults_list = self.bbox_head.simple_test(feats, img_metas, rescale=True)","handlingStrategy":"validation","validationCode":"assert not hasattr(head, 'simple_test_bboxes') or hasattr(head, 'simple_test'), 'prefer simple_test'\nresults_list = head.simple_test(feats, img_metas, rescale=True)","typeGuard":"def has_simple_test(head):\n    return callable(getattr(head, 'simple_test', None))","tryCatchPattern":null,"preventionTips":["Use the detector's standard test/inference entry points rather than head mixins"],"tags":["mmdet","deprecation","dense-head","testing"],"backgroundTag":"deprecated-argument-migration","analyzedSha":"cfd5d3a985b0249de009b67d04f37263e11cdf3d","analyzedAt":"2026-08-27T20:54:20.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}