class_docstr: Class for writing annotations in KITTI detection format.
  
  See :ref:`this page <KITTIDetectionDataset-export>` for format details.
docstr: Writes the detections to disk.
  
  Args:
      detections: a :class:`fiftyone.core.labels.Detections` instance
      metadata: a :class:`fiftyone.core.metadata.ImageMetadata` instance
      txt_path: the path to write the annotation TXT file
docstr_tok: ["Writes","the","detections","to","disk",".","Args",":","detections",":","a",":","class",":","`","fiftyone.core.labels.Detections","`","instance","metadata",":","a",":","class",":","`","fiftyone.core.metadata.ImageMetadata","`","instance","txt_path",":","the","path","to","write","the","annotation","TXT","file"]
code: def write(self, detections, metadata, txt_path):
      """Writes the detections to disk.
  
      Args:
          detections: a :class:`fiftyone.core.labels.Detections` instance
          metadata: a :class:`fiftyone.core.metadata.ImageMetadata` instance
          txt_path: the path to write the annotation TXT file
      """
      frame_size = (metadata.width, metadata.height)
  
      rows = []
      for detection in detections.detections:
          row = _make_kitti_detection_row(detection, frame_size)
          rows.append(row)
  
      etau.write_file("\n".join(rows), txt_path)
  
imports: import csv
  import logging
  import struct
  import os
  import numpy
  import eta.core.utils
  import eta.core.web
  import fiftyone
  import fiftyone.core.labels
  import fiftyone.core.metadata
  import fiftyone.core.storage
  import fiftyone.core.utils
  import fiftyone.utils.data
label_desc: Use image node_id 1 for calling the KITTIAnnotationWriter obj's underlying member method code with example usage: obj.write(detections, metadata, txt_path) without return types