code: def _parse_map_files(
      self,
      img_map_file,
      roi_map_file,
      max_annotations_per_image,
      max_images,
  ):
      # read image map file and buffer sequence numbers
      with open(img_map_file) as f:
          img_map_lines = f.readlines()
      img_map_lines = [line for line in img_map_lines if len(line) > 0]
      if max_images is not None:
          img_map_lines = img_map_lines[:max_images]
      img_sequence_numbers = [
          int(x.split("\t")[0]) for x in img_map_lines
      ]
      img_base_path = os.path.dirname(os.path.abspath(img_map_file))
      self._img_file_paths = [
          os.path.join(img_base_path, x.split("\t")[1])
          for x in img_map_lines
      ]
  
      # read roi map file
      with open(roi_map_file) as f:
          roi_map_lines = f.readlines()
  
      roi_map_lines = [line for line in roi_map_lines if len(line) > 0]
      if max_images is not None:
          roi_map_lines = roi_map_lines[:max_images]
      roi_sequence_numbers = []
      for roi_line in roi_map_lines:
          roi_sequence_numbers.append(
              int(roi_line[: roi_line.find(" ")])
          )
          rest = roi_line[roi_line.find(" ") + 1 :]
          bbox_input = rest[rest.find(" ") + 1 :]
          bbox_floats = np.fromstring(
              bbox_input, dtype=np.float32, sep=" "
          )
          num_floats = len(bbox_floats)
          assert (
              num_floats % 5 == 0
          ), "Ground truth annotation file is corrupt. Lines must contain 4 coordinates and a label per roi."
          annotations = np.zeros((max_annotations_per_image, 5))
          num_annotations = int(num_floats / 5)
  
          if num_annotations > max_annotations_per_image:
              print(
                  "Warning: The number of ground truth annotations ({}) is larger than the provided maximum number ({}).".format(
                      num_annotations, max_annotations_per_image
                  )
              )
              bbox_floats = bbox_floats[
                  : (max_annotations_per_image * 5)
              ]
              num_annotations = max_annotations_per_image
  
          annotations[:num_annotations, :] = np.array(
              bbox_floats
          ).reshape((num_annotations, 5))
          self._gt_annotations.append(annotations)
  
      # make sure sequence numbers match
      assert len(img_sequence_numbers) == len(
          roi_sequence_numbers
      ), "number of images and annotation lines do not match"
      assert np.allclose(
          img_sequence_numbers, roi_sequence_numbers, 0, 0
      ), "the sequence numbers in image and roi map files do not match"
  
      return len(img_sequence_numbers)
  
file_path: CNTK/Examples/Image/Detection/utils/od_reader.py
imports: import zipfile
  import cv2
  import numpy
  import os
  from utils.proposal_helpers import ProposalProvider, compute_targets, compute_image_stats
label_desc: Use image node_id 5 for calling the ObjectDetectionReader obj's underlying member method code with example usage: obj._parse_map_files(img_map_file, roi_map_file, max_annotations_per_image, max_images) and returns: len