code: def load_detection_model(yaml_file, yaml_ckpt):
      cfg.merge_from_file(yaml_file)
      cfg.freeze()
  
      model = build_detection_model(cfg)
      checkpoint = torch.load(
          yaml_ckpt, map_location=torch.device("cpu")
      )
  
      load_state_dict(model, checkpoint.pop("model"))
  
      model.to("cuda")
      model.eval()
      return model
  
file_path: mmf/projects/m4c/scripts/extract_ocr_frcn_feature.py
imports: import argparse
  import os
  import sys
  import cv2
  import numpy
  import torch
  import tqdm
  from maskrcnn_benchmark.config import cfg
  from maskrcnn_benchmark.layers import nms
  from maskrcnn_benchmark.modeling.detector import build_detection_model
  from maskrcnn_benchmark.structures.image_list import to_image_list
  from maskrcnn_benchmark.utils.model_serialization import load_state_dict
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: load_detection_model(yaml_file, yaml_ckpt) and returns: model