class_docstr: Writes object detection dataset into tfrecords.
  
  Reads dataset from a subclass of ObjectDetectionReader and saves it using
  the default format for tfrecords.
class_docstr_tok: ["Writes","object","detection","dataset","into","tfrecords",".","Reads","dataset","from","a","subclass","of","ObjectDetectionReader","and","saves","it","using","the","default","format","for","tfrecords","."]
docstr: Args:
      reader:
      output_dir: Directory to save the resulting tfrecords.
      split: Split being save, which is used as a filename for the
          resulting file.
docstr_tok: ["Args",":","reader",":","output_dir",":","Directory","to","save","the","resulting","tfrecords",".","split",":","Split","being","save",",","which","is","used","as","a","filename","for","the","resulting","file","."]
code: def __init__(self, reader, output_dir, split="data"):
      """
      Args:
          reader:
          output_dir: Directory to save the resulting tfrecords.
          split: Split being save, which is used as a filename for the
              resulting file.
      """
      super(ObjectDetectionWriter, self).__init__()
      if not isinstance(reader, ObjectDetectionReader):
          raise ValueError(
              "Saver needs a valid ObjectDetectionReader subclass"
          )
  
      self._reader = reader
      self._output_dir = output_dir
      self._split = split
  
file_path: luminoth/luminoth/tools/dataset/writers/object_detection_writer.py
imports: import click
  import json
  import os
  import tensorflow
  from .base_writer import BaseWriter
  from luminoth.tools.dataset.readers import ObjectDetectionReader
  from luminoth.utils.dataset import to_int64, to_string, to_bytes
label_desc: Use image node_id 1 to create a new ObjectDetectionWriter object from inherited base classes: BaseWriter with example: obj = ObjectDetectionWriter(reader, output_dir, split)