code: def next_minibatch(
      self,
      num_samples,
      number_of_workers=1,
      worker_rank=1,
      device=None,
      input_map=None,
  ):
      if num_samples > 1:
          print(
              "Only single item mini batches are supported currently by od_mb_source.py"
          )
          exit(1)
  
      (
          img_data,
          roi_data,
          img_dims,
          proposals,
          label_targets,
          bbox_targets,
          bbox_inside_weights,
      ) = self.od_reader.get_next_input()
      sweep_end = self.od_reader.sweep_end()
  
      if input_map is None:
          result = {
              self.image_si: MinibatchData(
                  Value(batch=img_data), 1, 1, sweep_end
              ),
              self.roi_si: MinibatchData(
                  Value(batch=roi_data), 1, 1, sweep_end
              ),
              self.dims_si: MinibatchData(
                  Value(batch=np.asarray(img_dims, dtype=np.float32)),
                  1,
                  1,
                  sweep_end,
              ),
              self.proposals_si: MinibatchData(
                  Value(batch=np.asarray(proposals, dtype=np.float32)),
                  1,
                  1,
                  sweep_end,
              ),
              self.label_targets_si: MinibatchData(
                  Value(
                      batch=np.asarray(label_targets, dtype=np.float32)
                  ),
                  1,
                  1,
                  sweep_end,
              ),
              self.bbox_targets_si: MinibatchData(
                  Value(
                      batch=np.asarray(bbox_targets, dtype=np.float32)
                  ),
                  1,
                  1,
                  sweep_end,
              ),
              self.bbiw_si: MinibatchData(
                  Value(
                      batch=np.asarray(
                          bbox_inside_weights, dtype=np.float32
                      )
                  ),
                  1,
                  1,
                  sweep_end,
              ),
          }
      else:
          result = {
              input_map[self.image_si]: MinibatchData(
                  Value(batch=np.asarray(img_data, dtype=np.float32)),
                  1,
                  1,
                  sweep_end,
              )
          }
          if self.roi_si in input_map:
              result[input_map[self.roi_si]] = MinibatchData(
                  Value(batch=np.asarray(roi_data, dtype=np.float32)),
                  1,
                  1,
                  sweep_end,
              )
          if self.dims_si in input_map:
              result[input_map[self.dims_si]] = MinibatchData(
                  Value(batch=np.asarray(img_dims, dtype=np.float32)),
                  1,
                  1,
                  sweep_end,
              )
          if self.proposals_si in input_map:
              result[input_map[self.proposals_si]] = MinibatchData(
                  Value(batch=np.asarray(proposals, dtype=np.float32)),
                  1,
                  1,
                  sweep_end,
              )
          if self.label_targets_si in input_map:
              result[input_map[self.label_targets_si]] = MinibatchData(
                  Value(
                      batch=np.asarray(label_targets, dtype=np.float32)
                  ),
                  1,
                  1,
                  sweep_end,
              )
          if self.bbox_targets_si in input_map:
              result[input_map[self.bbox_targets_si]] = MinibatchData(
                  Value(
                      batch=np.asarray(bbox_targets, dtype=np.float32)
                  ),
                  1,
                  1,
                  sweep_end,
              )
          if self.bbiw_si in input_map:
              result[input_map[self.bbiw_si]] = MinibatchData(
                  Value(
                      batch=np.asarray(
                          bbox_inside_weights, dtype=np.float32
                      )
                  ),
                  1,
                  1,
                  sweep_end,
              )
  
      return result
  
file_path: CNTK/Examples/Image/Detection/utils/od_mb_source.py
imports: from cntk.io import UserMinibatchSource, StreamInformation, MinibatchData
  from cntk.core import Value
  from utils.od_reader import ObjectDetectionReader
  import numpy
label_desc: Use image node_id 10 for calling the ObjectDetectionMinibatchSource obj's underlying member method code with example usage: obj.next_minibatch(num_samples, number_of_workers, worker_rank, device, input_map) and returns: result