class_docstr: Reads data suitable for object detection.
  
  The object detection task needs the following information:
      - images.
      - ground truth, rectangular bounding boxes with associated labels.
  
  For implementing a subclass of object detection, one needs to implement
  the following methods:
      - __init__
      - get_total
      - get_classes
      - iterate
  
  Optionally:
      - pretty_name
  
  Additionally, must use the `_per_class_counter` variable to honor the max
  number of examples per class in an efficient way.
class_docstr_tok: ["Reads","data","suitable","for","object","detection",".","The","object","detection","task","needs","the","following","information",":","-","images",".","-","ground","truth",",","rectangular","bounding","boxes","with","associated","labels",".","For","implementing","a","subclass","of","object","detection",",","one","needs","to","implement","the","following","methods",":","-","__init__","-","get_total","-","get_classes","-","iterate","Optionally",":","-","pretty_name","Additionally",",","must","use","the","`","_per_class_counter","`","variable","to","honor","the","max","number","of","examples","per","class","in","an","efficient","way","."]
docstr: Called whenever a new record is to be added.
docstr_tok: ["Called","whenever","a","new","record","is","to","be","added","."]
code: def _will_add_record(self, record):
      """
      Called whenever a new record is to be added.
      """
      # Adjust per-class counter from totals from current record
      for box in record["gt_boxes"]:
          self._per_class_counter[self.classes[box["label"]]] += 1
  
      if self._class_examples is not None:
          # Check which classes we have maxed out.
          old_maxed_out = self._maxed_out_classes.copy()
  
          self._maxed_out_classes |= set(
              [
                  label
                  for label, count in self._per_class_counter.items()
                  if count >= self._class_examples
              ]
          )
  
          for label in self._maxed_out_classes - old_maxed_out:
              tf.logging.debug(
                  'Maxed out "{}" at {} examples'.format(
                      self.pretty_name(label),
                      self._per_class_counter[label],
                  )
              )
  
imports: import abc
  import six
  import tensorflow
  from collections import Counter
  from luminoth.tools.dataset.readers import BaseReader
label_desc: Use image node_id 13 for calling the ObjectDetectionReader obj's underlying member method code with example usage: obj._will_add_record(record) without return types