{"record":{"id":"738fab6ca7102869","repo":"tensorflow/models","slug":"pool-boxes-must-be-a-boxlist","errorCode":null,"errorMessage":"pool_boxes must be a BoxList","messagePattern":"pool_boxes must be a BoxList","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/vision/utils/object_detection/box_list_ops.py","lineNumber":894,"sourceCode":"    nms_iou_thresh: (float scalar) iou threshold for non max suppression (NMS).\n    nms_max_detections: (int scalar) maximum output size for NMS.\n    voting_iou_thresh: (float scalar) iou threshold for box voting.\n\n  Returns:\n    BoxList of refined boxes.\n\n  Raises:\n    ValueError: if\n      a) nms_iou_thresh or voting_iou_thresh is not in [0, 1].\n      b) pool_boxes is not a BoxList.\n      c) pool_boxes does not have a scores and classes field.\n  \"\"\"\n  if not 0.0 <= nms_iou_thresh <= 1.0:\n    raise ValueError('nms_iou_thresh must be between 0 and 1')\n  if not 0.0 <= voting_iou_thresh <= 1.0:\n    raise ValueError('voting_iou_thresh must be between 0 and 1')\n  if not isinstance(pool_boxes, box_list.BoxList):\n    raise ValueError('pool_boxes must be a BoxList')\n  if not pool_boxes.has_field('scores'):\n    raise ValueError('pool_boxes must have a \\'scores\\' field')\n  if not pool_boxes.has_field('classes'):\n    raise ValueError('pool_boxes must have a \\'classes\\' field')\n\n  refined_boxes = []\n  for i in range(num_classes):\n    boxes_class = filter_field_value_equals(pool_boxes, 'classes', i)\n    refined_boxes_class = refine_boxes(boxes_class, nms_iou_thresh,\n                                       nms_max_detections, voting_iou_thresh)\n    refined_boxes.append(refined_boxes_class)\n  return sort_by_field(concatenate(refined_boxes), 'scores')\n\n\ndef refine_boxes(pool_boxes,\n                 nms_iou_thresh,\n                 nms_max_detections,\n                 voting_iou_thresh=0.5):","sourceCodeStart":876,"sourceCodeEnd":912,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/vision/utils/object_detection/box_list_ops.py#L876-L912","documentation":"Error \"pool_boxes must be a BoxList\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/vision/utils/object_detection/box_list_ops.py:894 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass pool_boxes as a BoxList instance.","Wrap your boxes in box_list.BoxList(boxes) first."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}