code: def train_object_detector(cfg):
      """
      Trains an object detector as specified in the configuration
      :param cfg: the configuration
      :return: the eval model of the trained detector
      """
  
      detector_name = _get_detector_name(cfg)
      eval_model = None
      print("training {}".format(detector_name))
      if detector_name == "FastRCNN":
          from FastRCNN.FastRCNN_train import prepare, train_fast_rcnn
  
          prepare(cfg, use_arg_parser=False)
          eval_model = train_fast_rcnn(cfg)
      elif detector_name == "FasterRCNN":
          from FasterRCNN.FasterRCNN_train import (
              prepare,
              train_faster_rcnn,
          )
  
          prepare(cfg, use_arg_parser=False)
          eval_model = train_faster_rcnn(cfg)
      else:
          print("Unknown detector: {}".format(detector_name))
  
      return eval_model
  
file_path: CNTK/Examples/Image/Detection/utils/od_utils.py
imports: import easydict
  from utils.nms_wrapper import apply_nms_to_single_image_results
label_desc: Use image node_id 1 for calling a global function with example usage: train_object_detector(cfg) and returns: eval_model