class_docstr: MetadataWriter to write the metadata into the object detector.
docstr: Creates MetadataWriter to write the metadata for object detector with postprocessing in the model.
  
  This method create a metadata writer for the models with postprocessing [1].
  
  The parameters required in this method are mandatory when using MediaPipe
  Tasks.
  
  Example usage:
    metadata_writer = object_detector.Metadatawriter.create(model_buffer, ...)
    tflite_content, json_content = metadata_writer.populate()
  
  When calling `populate` function in this class, it returns TfLite content
  and JSON content. Note that only the output TFLite is used for deployment.
  The output JSON content is used to interpret the metadata content.
  
  Args:
    model_buffer: A valid flatbuffer loaded from the TFLite model file.
    input_norm_mean: the mean value used in the input tensor normalization
      [2].
    input_norm_std: the std value used in the input tensor normalizarion [2].
    labels: an instance of Labels helper class used in the output
      classification tensor [3].
    score_calibration: A container of the score calibration operation [4] in
      the classification tensor. Optional if the model does not use score
      calibration.
    [1]:
      https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/kernels/detection_postprocess.cc
    [2]:
      https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L389
    [3]:
      https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L99
    [4]:
      https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L456
  
  Returns:
    A MetadataWriter object.
docstr_tok: ["Creates","MetadataWriter","to","write","the","metadata","for","object","detector","with","postprocessing","in","the","model",".","This","method","create","a","metadata","writer","for","the","models","with","postprocessing","[","1","]",".","The","parameters","required","in","this","method","are","mandatory","when","using","MediaPipe","Tasks",".","Example","usage",":","metadata_writer","=","object_detector.Metadatawriter.create","(","model_buffer",",","...",")","tflite_content",",","json_content","=","metadata_writer.populate","(",")","When","calling","`","populate","`","function","in","this","class",",","it","returns","TfLite","content","and","JSON","content",".","Note","that","only","the","output","TFLite","is","used","for","deployment",".","The","output","JSON","content","is","used","to","interpret","the","metadata","content",".","Args",":","model_buffer",":","A","valid","flatbuffer","loaded","from","the","TFLite","model","file",".","input_norm_mean",":","the","mean","value","used","in","the","input","tensor","normalization","[","2","]",".","input_norm_std",":","the","std","value","used","in","the","input","tensor","normalizarion","[","2","]",".","labels",":","an","instance","of","Labels","helper","class","used","in","the","output","classification","tensor","[","3","]",".","score_calibration",":","A","container","of","the","score","calibration","operation","[","4","]","in","the","classification","tensor",".","Optional","if","the","model","does","not","use","score","calibration",".","[","1","]",":","https",":","\/\/github.com\/tensorflow\/tensorflow\/blob\/master\/tensorflow\/lite\/kernels\/detection_postprocess.cc","[","2","]",":","https",":","\/\/github.com\/google\/mediapipe\/blob\/f8af41b1eb49ff4bdad756ff19d1d36f486be614\/mediapipe\/tasks\/metadata\/metadata_schema.fbs","#","L389","[","3","]",":","https",":","\/\/github.com\/google\/mediapipe\/blob\/f8af41b1eb49ff4bdad756ff19d1d36f486be614\/mediapipe\/tasks\/metadata\/metadata_schema.fbs","#","L99","[","4","]",":","https",":","\/\/github.com\/google\/mediapipe\/blob\/f8af41b1eb49ff4bdad756ff19d1d36f486be614\/mediapipe\/tasks\/metadata\/metadata_schema.fbs","#","L456","Returns",":","A","MetadataWriter","object","."]
code: def create_for_models_with_nms(
      cls,
      model_buffer: bytearray,
      input_norm_mean: List[float],
      input_norm_std: List[float],
      labels: metadata_writer.Labels,
      score_calibration: Optional[
          metadata_writer.ScoreCalibration
      ] = None,
  ) -> "MetadataWriter":
      """Creates MetadataWriter to write the metadata for object detector with postprocessing in the model.
  
      This method create a metadata writer for the models with postprocessing [1].
  
      The parameters required in this method are mandatory when using MediaPipe
      Tasks.
  
      Example usage:
        metadata_writer = object_detector.Metadatawriter.create(model_buffer, ...)
        tflite_content, json_content = metadata_writer.populate()
  
      When calling `populate` function in this class, it returns TfLite content
      and JSON content. Note that only the output TFLite is used for deployment.
      The output JSON content is used to interpret the metadata content.
  
      Args:
        model_buffer: A valid flatbuffer loaded from the TFLite model file.
        input_norm_mean: the mean value used in the input tensor normalization
          [2].
        input_norm_std: the std value used in the input tensor normalizarion [2].
        labels: an instance of Labels helper class used in the output
          classification tensor [3].
        score_calibration: A container of the score calibration operation [4] in
          the classification tensor. Optional if the model does not use score
          calibration.
        [1]:
          https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/kernels/detection_postprocess.cc
        [2]:
          https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L389
        [3]:
          https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L99
        [4]:
          https://github.com/google/mediapipe/blob/f8af41b1eb49ff4bdad756ff19d1d36f486be614/mediapipe/tasks/metadata/metadata_schema.fbs#L456
  
      Returns:
        A MetadataWriter object.
      """
      writer = metadata_writer.MetadataWriter(model_buffer)
      writer.add_general_info(_MODEL_NAME, _MODEL_DESCRIPTION)
      writer.add_image_input(input_norm_mean, input_norm_std)
      writer.add_detection_output(labels, score_calibration)
      return cls(writer)
  
imports: import dataclasses
  from typing import List, Optional
  import flatbuffers
  from mediapipe.tasks.metadata import metadata_schema_py_generated
  from mediapipe.tasks.metadata import object_detector_metadata_schema_py_generated
  from mediapipe.tasks.python.metadata import metadata
  from mediapipe.tasks.python.metadata.metadata_writers import metadata_info
  from mediapipe.tasks.python.metadata.metadata_writers import metadata_writer
label_desc: Use image node_id 1 for calling the MetadataWriter obj's underlying member method code with example usage: obj.create_for_models_with_nms(cls, model_buffer, input_norm_mean, input_norm_std, labels, score_calibration) and returns: cls