{"record":{"id":"b573d397e011f0c5","repo":"open-mmlab/mmdetection","slug":"pascal-voc2007-uses-11points-as-default-evaluate","errorCode":null,"errorMessage":"Pascal VOC2007 uses `11points` as default evaluate mode, but you are using {self.eval_mode}.","messagePattern":"Pascal VOC2007 uses `11points` as default evaluate mode, but you are using (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"mmdet/evaluation/metrics/voc_metric.py","lineNumber":128,"sourceCode":"        \"\"\"Compute the metrics from processed results.\n\n        Args:\n            results (list): The processed results of each batch.\n\n        Returns:\n            dict: The computed metrics. The keys are the names of the metrics,\n            and the values are corresponding results.\n        \"\"\"\n        logger: MMLogger = MMLogger.get_current_instance()\n        gts, preds = zip(*results)\n        eval_results = OrderedDict()\n        if self.metric == 'mAP':\n            assert isinstance(self.iou_thrs, list)\n            dataset_type = self.dataset_meta.get('dataset_type')\n            if dataset_type in ['VOC2007', 'VOC2012']:\n                dataset_name = 'voc'\n                if dataset_type == 'VOC2007' and self.eval_mode != '11points':\n                    warnings.warn('Pascal VOC2007 uses `11points` as default '\n                                  'evaluate mode, but you are using '\n                                  f'{self.eval_mode}.')\n                elif dataset_type == 'VOC2012' and self.eval_mode != 'area':\n                    warnings.warn('Pascal VOC2012 uses `area` as default '\n                                  'evaluate mode, but you are using '\n                                  f'{self.eval_mode}.')\n            else:\n                dataset_name = self.dataset_meta['classes']\n\n            mean_aps = []\n            for iou_thr in self.iou_thrs:\n                logger.info(f'\\n{\"-\" * 15}iou_thr: {iou_thr}{\"-\" * 15}')\n                # Follow the official implementation,\n                # http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCdevkit_18-May-2011.tar\n                # we should use the legacy coordinate system in mmdet 1.x,\n                # which means w, h should be computed as 'x2 - x1 + 1` and\n                # `y2 - y1 + 1`\n                mean_ap, _ = eval_map(","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/mmdet/evaluation/metrics/voc_metric.py#L110-L146","documentation":"VOCMetric.compute_metrics() warns that VOC2007's standard evaluation protocol uses 11-point interpolation mAP ('11points'), but the metric is configured with a different eval mode. Scores will not match published VOC2007 benchmarks.","triggerScenarios":"Setting metric=['mAP'] with eval_mode not equal to '11points' while dataset_meta['dataset_type'] == 'VOC2007' — e.g. passing eval_mode='area' in the VOCMetric config.","commonSituations":"Copy-pasting a VOC2012 config for VOC2007 data, or manually setting iou_thrs/eval_mode without matching the dataset year.","solutions":["Set eval_mode='11points' in the VOCMetric val_evaluator config for VOC2007","Or intentionally accept the non-standard mode if comparing against area-mode baselines","Double-check dataset_type in the dataset config matches the actual year of data"],"exampleFix":"# before\nval_evaluator = dict(type='VOCMetric', metric='mAP', eval_mode='area')\n# after\nval_evaluator = dict(type='VOCMetric', metric='mAP', eval_mode='11points')  # VOC2007 default","handlingStrategy":"validation","validationCode":"eval_mode = '11points' if dataset_meta['dataset_type'] == 'VOC2007' else eval_mode\nassert not (dataset_meta['dataset_type'] == 'VOC2007' and eval_mode != '11points')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive eval_mode from dataset_type programmatically","Keep VOC2007 and VOC2012 configs separate","Compare results only within one protocol"],"tags":["mmdet","voc","evaluation-protocol","map","config"],"backgroundTag":"evaluation-protocol-mismatch","analyzedSha":"cfd5d3a985b0249de009b67d04f37263e11cdf3d","analyzedAt":"2026-08-27T20:54:20.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}