code: def __init__(self, checkpoint_path: str = None):
      self.checkpoint = checkpoint_path
      assert self.checkpoint is not None
      (
          self.processor,
          self.feature_extractor,
          self.model,
      ) = self._build_model()
  
file_path: mmf/mmf/utils/inference.py
imports: import numpy
  import requests
  import torch
  from mmf.common.report import Report
  from mmf.common.sample import Sample, SampleList
  from mmf.utils.build import build_encoder, build_model, build_processors
  from mmf.utils.checkpoint import load_pretrained_model
  from mmf.utils.general import get_current_device
  from omegaconf import OmegaConf
  from PIL import Image
label_desc: Use image node_id 1 to create a new Inference object  with example: obj = Inference(checkpoint_path)