class_docstr: Keras layer for filtering detections using score threshold and NMS.
      
class_docstr_tok: ["Keras","layer","for","filtering","detections","using","score","threshold","and","NMS","."]
docstr: Constructs the NMS graph.
  
  Args
      inputs : List of [boxes, classification, other[0], other[1], ...] tensors.
docstr_tok: ["Constructs","the","NMS","graph",".","Args","inputs",":","List","of","[","boxes",",","classification",",","other","[","0","]",",","other","[","1","]",",","...","]","tensors","."]
code: def call(self, inputs, **kwargs):
      """Constructs the NMS graph.
  
      Args
          inputs : List of [boxes, classification, other[0], other[1], ...] tensors.
      """
      boxes = inputs[0]
      classification = inputs[1]
      other = inputs[2:]
  
      # wrap nms with our parameters
      def _filter_detections(args):
          boxes = args[0]
          classification = args[1]
          other = args[2]
  
          return filter_detections(
              boxes,
              classification,
              other,
              nms=self.nms,
              class_specific_filter=self.class_specific_filter,
              score_threshold=self.score_threshold,
              max_detections=self.max_detections,
              nms_threshold=self.nms_threshold,
          )
  
      # call filter_detections on each batch
      dtypes = [
          keras.backend.floatx(),
          keras.backend.floatx(),
          "int32",
      ] + [o.dtype for o in other]
      shapes = [
          (self.max_detections, 4),
          (self.max_detections,),
          (self.max_detections,),
      ]
      shapes.extend(
          [(self.max_detections,) + o.shape[2:] for o in other]
      )
      outputs = backend.map_fn(
          _filter_detections,
          elems=[boxes, classification, other],
          dtype=dtypes,
          shapes=shapes,
          parallel_iterations=self.parallel_iterations,
      )
  
      return outputs
  
file_path: ImageAI/imageai_tf_deprecated/Detection/keras_retinanet/layers/filter_detections.py
imports: import tensorflow
  from tensorflow import keras
  from ..None import backend
label_desc: Use image node_id 2 for calling the FilterDetections obj's underlying member method code with example usage: obj.call(inputs) and returns: outputs, filter_detections