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: Filters total number of records we will need to iterate over in dataset
  based on reader options used.
docstr_tok: ["Filters","total","number","of","records","we","will","need","to","iterate","over","in","dataset","based","on","reader","options","used","."]
code: def _filter_total(self, original_total_records):
      """
      Filters total number of records we will need to iterate over in dataset
      based on reader options used.
      """
      if self._only_images:  # not None and not empty
          return len(self._only_images)
  
      if self._limit_examples is not None and self._limit_examples > 0:
          return min(self._limit_examples, original_total_records)
  
      # With _class_examples we potentially have to iterate over every
      # record, so we don't know the total ahead of time.
  
      return original_total_records
  
imports: import abc
  import six
  import tensorflow
  from collections import Counter
  from luminoth.tools.dataset.readers import BaseReader
label_desc: Use image node_id 8 for calling the ObjectDetectionReader obj's underlying member method code with example usage: obj._filter_total(original_total_records) and returns: original_total_records, len, min