class_docstr: Same as :class:`Checkpointer`, but is able to:
  1. handle models in detectron & detectron2 model zoo, and apply conversions for legacy models.
  2. correctly load checkpoints that are only available on the master worker
class_docstr_tok: ["Same","as",":","class",":","`","Checkpointer","`",",","but","is","able","to",":","1.","handle","models","in","detectron","&","detectron2","model","zoo",",","and","apply","conversions","for","legacy","models",".","2.","correctly","load","checkpoints","that","are","only","available","on","the","master","worker"]
code: def _load_model(self, checkpoint):
      if checkpoint.get("matching_heuristics", False):
          self._convert_ndarray_to_tensor(checkpoint["model"])
          # convert weights by name-matching heuristics
          checkpoint["model"] = align_and_update_state_dicts(
              self.model.state_dict(),
              checkpoint["model"],
              c2_conversion=checkpoint.get("__author__", None)
              == "Caffe2",
          )
      # for non-caffe2 models, use standard ways to load it
      incompatible = super()._load_model(checkpoint)
  
      model_buffers = dict(self.model.named_buffers(recurse=False))
      for k in ["pixel_mean", "pixel_std"]:
          # Ignore missing key message about pixel_mean/std.
          # Though they may be missing in old checkpoints, they will be correctly
          # initialized from config anyway.
          if k in model_buffers:
              try:
                  incompatible.missing_keys.remove(k)
              except ValueError:
                  pass
      for k in incompatible.unexpected_keys[:]:
          # Ignore unexpected keys about cell anchors. They exist in old checkpoints
          # but now they are non-persistent buffers and will not be in new checkpoints.
          if "anchor_generator.cell_anchors" in k:
              incompatible.unexpected_keys.remove(k)
      return incompatible
  
file_path: detectron2/detectron2/checkpoint/detection_checkpoint.py
imports: import logging
  import os
  import pickle
  from urllib.parse import parse_qs, urlparse
  import torch
  from fvcore.common.checkpoint import Checkpointer
  from torch.nn.parallel import DistributedDataParallel
  import detectron2.utils.comm
  from detectron2.utils.file_io import PathManager
  from .c2_model_loading import align_and_update_state_dicts
label_desc: Use image node_id 5 for calling the DetectionCheckpointer obj's underlying member method code with example usage: obj._load_model(checkpoint) and returns: incompatible