{"record":{"id":"67761d0acde2e491","repo":"open-mmlab/mmdetection","slug":"ioutype-not-supported","errorCode":null,"errorMessage":"iouType not supported","messagePattern":"iouType not supported","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"mmdet/evaluation/functional/ytviseval.py","lineNumber":620,"sourceCode":"        self.catIds = []\n        # np.arange causes trouble.  the data point on arange\n        # is slightly larger than the true value\n        self.iouThrs = np.linspace(\n            .5, 0.95, int(np.round((0.95 - .5) / .05)) + 1, endpoint=True)\n        self.recThrs = np.linspace(\n            .0, 1.00, int(np.round((1.00 - .0) / .01)) + 1, endpoint=True)\n        self.maxDets = [20]\n        self.areaRng = [[0**2, 1e5**2], [32**2, 96**2], [96**2, 1e5**2]]\n        self.areaRngLbl = ['all', 'medium', 'large']\n        self.useCats = 1\n\n    def __init__(self, iouType='segm'):\n        if iouType == 'segm' or iouType == 'bbox':\n            self.setDetParams()\n        elif iouType == 'keypoints':\n            self.setKpParams()\n        else:\n            raise Exception('iouType not supported')\n        self.iouType = iouType\n        # useSegm is deprecated\n        self.useSegm = None\n","sourceCodeStart":602,"sourceCodeEnd":624,"githubUrl":"https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/mmdet/evaluation/functional/ytviseval.py#L602-L624","documentation":"YTVISEvalParams.__init__ only accepts iouType 'segm', 'bbox', or 'keypoints' when selecting parameter presets; anything else raises 'iouType not supported'.","triggerScenarios":"Constructing YTVISEval with iouType='mask', 'poly', or a misspelled value.","commonSituations":"Typos and adapting other eval APIs; passing the task name ('vis') instead of the iou type.","solutions":["Use one of 'segm', 'bbox', 'keypoints'","Note that 'keypoints' passes __init__ but later fails in computeIoU (error 72); prefer segm/bbox"],"exampleFix":"# before\nYTVISEval(gt, dt, iouType='poly')\n# after\nYTVISEval(gt, dt, iouType='segm')","handlingStrategy":"validation","validationCode":"assert iouType in ('segm', 'bbox', 'keypoints')","typeGuard":"def is_valid_iou_type(t) -> bool:\n    return isinstance(t, str) and t in ('segm', 'bbox', 'keypoints')","tryCatchPattern":null,"preventionTips":["Validate iouType against the supported set before constructing YTVISEval","Prefer 'segm' for VIS tasks"],"tags":["ytvis","iou-type","invalid-argument","mmdetection"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cfd5d3a985b0249de009b67d04f37263e11cdf3d","analyzedAt":"2026-08-27T20:54:20.183Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}