open-mmlab/mmdetection · info

You are calling `aug_test_bboxes` in `dense_test_mixins`, bu

Error message

You are calling `aug_test_bboxes` in `dense_test_mixins`, but the `dense_test_mixins`will be deprecated soon. Please use `aug_test` instead.

What it means

Warns that DenseTestMixins.aug_test_bboxes is deprecated; use the head's aug_test instead. Note the caller chain shows aug_test itself may delegate to this mixin method, so the warning can appear during normal TTA inference — it signals the mixin will be removed, not user error.

Source

Thrown at mmdet/models/dense_heads/dense_test_mixins.py:76

        Args:
            feats (list[Tensor]): the outer list indicates test-time
                augmentations and inner Tensor should have a shape NxCxHxW,
                which contains features for all images in the batch.
            img_metas (list[list[dict]]): the outer list indicates test-time
                augs (multiscale, flip, etc.) and the inner list indicates
                images in a batch. each dict has image information.
            rescale (bool, optional): Whether to rescale the results.
                Defaults to False.

        Returns:
            list[tuple[Tensor, Tensor]]: Each item in result_list is 2-tuple.
                The first item is ``bboxes`` with shape (n, 5),
                where 5 represent (tl_x, tl_y, br_x, br_y, score).
                The shape of the second tensor in the tuple is ``labels``
                with shape (n,). The length of list should always be 1.
        """

        warnings.warn('You are calling `aug_test_bboxes` in '
                      '`dense_test_mixins`, but the `dense_test_mixins`'
                      'will be deprecated soon. Please use '
                      '`aug_test` instead.')
        # check with_nms argument
        gb_sig = signature(self.get_results)
        gb_args = [p.name for p in gb_sig.parameters.values()]
        gbs_sig = signature(self._get_results_single)
        gbs_args = [p.name for p in gbs_sig.parameters.values()]
        assert ('with_nms' in gb_args) and ('with_nms' in gbs_args), \
            f'{self.__class__.__name__}' \
            ' does not support test-time augmentation'

        aug_bboxes = []
        aug_scores = []
        aug_labels = []
        for x, img_meta in zip(feats, img_metas):
            # only one image in the batch
            outs = self.forward(x)

View on GitHub (pinned to cfd5d3a985)

Solutions

  1. Upgrade mmdet to a version where the head implements aug_test natively
  2. If writing custom heads, override aug_test instead of using the mixin
Defensive patterns

Strategy: fallback

Validate before calling

if type(head).aug_test is DenseTestMixin.aug_test if hasattr(DenseTestMixin,'aug_test') else False:
    logging.warning('head relies on deprecated DenseTestMixins; plan migration')

Prevention

When it happens

Trigger: Running test-time augmentation (TTA) inference on a head using DenseTestMixins, or calling aug_test_bboxes directly.

Common situations: Multi-scale / flip TTA configs with older head implementations that still route through the mixin.

Related errors


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