{"record":{"id":"e891d2c4db193549","repo":"tensorflow/models","slug":"an-nms-algorithm-is-required-for-detection-generat","errorCode":null,"errorMessage":"An NMS algorithm is required for detection generator","messagePattern":"An NMS algorithm is required for detection generator","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/pointpillars/modeling/models.py","lineNumber":104,"sourceCode":"\n    if image_shape is None:\n      raise ValueError('Image_shape should not be None for evaluation.')\n    if anchor_boxes is None:\n      # Generate anchors if needed.\n      anchor_boxes = utils.generate_anchors(\n          self._min_level,\n          self._max_level,\n          self._image_size,\n          self._anchor_sizes,\n      )\n      for l in anchor_boxes:\n        anchor_boxes[l] = tf.tile(\n            tf.expand_dims(anchor_boxes[l], axis=0),\n            [tf.shape(image_shape)[0], 1, 1, 1])\n\n    # Generate detected boxes.\n    if not self._detection_generator.get_config()['apply_nms']:\n      raise ValueError('An NMS algorithm is required for detection generator')\n    detections = self._detection_generator(raw_boxes, raw_scores,\n                                           anchor_boxes, image_shape,\n                                           raw_attributes)\n    outputs.update({\n        'boxes': detections['detection_boxes'],\n        'scores': detections['detection_scores'],\n        'classes': detections['detection_classes'],\n        'num_detections': detections['num_detections'],\n        'attributes': detections['detection_attributes'],\n    })\n    return outputs\n\n  def call(self,  # pytype: disable=annotation-type-mismatch,signature-mismatch\n           pillars: tf.Tensor,\n           indices: tf.Tensor,\n           image_shape: Optional[tf.Tensor] = None,\n           anchor_boxes: Optional[Mapping[str, tf.Tensor]] = None,\n           training: bool = None) -> Mapping[str, Any]:  # pyrefly: ignore[bad-function-definition]","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/pointpillars/modeling/models.py#L86-L122","documentation":"Error \"An NMS algorithm is required for detection generator\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/pointpillars/modeling/models.py:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}