facebookresearch/detectron2 · error · RuntimeError

model not present in the catalog: {}

Error message

model not present in the catalog: {}

What it means

ModelCatalog.get resolves well-known model names to URLs and only recognizes names starting with 'Caffe2Detectron/COCO' or 'ImageNetPretrained/'. Any other name reaches this RuntimeError because the catalog has no entry for it.

Source

Thrown at detectron2/checkpoint/catalog.py:63

        "36761737/e2e_faster_rcnn_X-101-32x8d-FPN_1x": "36761737/12_2017_baselines/e2e_faster_rcnn_X-101-32x8d-FPN_1x.yaml.06_31_39.5MIHi1fZ",  # noqa B950
        "35858791/e2e_mask_rcnn_R-50-C4_1x": "35858791/12_2017_baselines/e2e_mask_rcnn_R-50-C4_1x.yaml.01_45_57.ZgkA7hPB",  # noqa B950
        "35858933/e2e_mask_rcnn_R-50-FPN_1x": "35858933/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml.01_48_14.DzEQe4wC",  # noqa B950
        "35861795/e2e_mask_rcnn_R-101-FPN_1x": "35861795/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_1x.yaml.02_31_37.KqyEK4tT",  # noqa B950
        "36761843/e2e_mask_rcnn_X-101-32x8d-FPN_1x": "36761843/12_2017_baselines/e2e_mask_rcnn_X-101-32x8d-FPN_1x.yaml.06_35_59.RZotkLKI",  # noqa B950
        "48616381/e2e_mask_rcnn_R-50-FPN_2x_gn": "GN/48616381/04_2018_gn_baselines/e2e_mask_rcnn_R-50-FPN_2x_gn_0416.13_23_38.bTlTI97Q",  # noqa B950
        "37697547/e2e_keypoint_rcnn_R-50-FPN_1x": "37697547/12_2017_baselines/e2e_keypoint_rcnn_R-50-FPN_1x.yaml.08_42_54.kdzV35ao",  # noqa B950
        "35998355/rpn_R-50-C4_1x": "35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L",  # noqa B950
        "35998814/rpn_R-50-FPN_1x": "35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179",  # noqa B950
        "36225147/fast_R-50-FPN_1x": "36225147/12_2017_baselines/fast_rcnn_R-50-FPN_1x.yaml.08_39_09.L3obSdQ2",  # noqa B950
    }

    @staticmethod
    def get(name):
        if name.startswith("Caffe2Detectron/COCO"):
            return ModelCatalog._get_c2_detectron_baseline(name)
        if name.startswith("ImageNetPretrained/"):
            return ModelCatalog._get_c2_imagenet_pretrained(name)
        raise RuntimeError("model not present in the catalog: {}".format(name))

    @staticmethod
    def _get_c2_imagenet_pretrained(name):
        prefix = ModelCatalog.S3_C2_DETECTRON_PREFIX
        name = name[len("ImageNetPretrained/") :]
        name = ModelCatalog.C2_IMAGENET_MODELS[name]
        url = "/".join([prefix, name])
        return url

    @staticmethod
    def _get_c2_detectron_baseline(name):
        name = name[len("Caffe2Detectron/COCO/") :]
        url = ModelCatalog.C2_DETECTRON_MODELS[name]
        if "keypoint_rcnn" in name:
            dataset = ModelCatalog.C2_DATASET_COCO_KEYPOINTS
        else:
            dataset = ModelCatalog.C2_DATASET_COCO

View on GitHub (pinned to a2f4a8771a)

Solutions

  1. Pass a local file path or a full URL instead of a catalog name
  2. Use a supported prefix such as 'ImageNetPretrained/MSRA/R-50.pkl' or 'Caffe2Detectron/COCO/...'
  3. Check detectron2/checkpoint/catalog.py ModelCatalog constants for the exact recognized names in your version

Example fix

# before
DetectionCheckpointer(model).load("X-101-32x8d")
# after
DetectionCheckpointer(model).load("ImageNetPretrained/MSRA/X-101-32x8d.pkl")
Defensive patterns

Strategy: type-guard

Validate before calling

def is_catalog_name(name):
    return name.startswith("Caffe2Detectron/COCO") or name.startswith("ImageNetPretrained/")
if not os.path.isfile(name) and not name.startswith(("http", "s3", "gs")) and not is_catalog_name(name):
    raise FileNotFoundError(f"unknown model name {name}")

Type guard

def resolve_model_source(name: str) -> str:
    if os.path.isfile(name): return "file"
    if name.startswith(("http://","https://","s3://","gs://")): return "url"
    if name.startswith(("Caffe2Detectron/COCO","ImageNetPretrained/")): return "catalog"
    return "unknown"

Try / catch

try:
    DetectionCheckpointer(model).load(name)
except RuntimeError as e:
    if "not present in the catalog" in str(e):
        # fall back to explicit path/url
        DetectionCheckpointer(model).load("/path/to/weights.pkl")
    else:
        raise

Prevention

When it happens

Trigger: Calling DetectionCheckpointer.load('SomeModel/Name') or ModelCatalog.get('my-model') with a name that is not one of the two supported prefixes, e.g. 'Detectron2/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml' style names passed to the old catalog API.

Common situations: Copying model names from newer detectron2 model zoo docs but using the legacy Caffe2 catalog path; typos in pretrained model names; version changes that renamed catalog entries.


AI-assisted analysis of facebookresearch/detectron2@a2f4a8771a (2026-08-27). Data as JSON: /api/errors/14cf7d54ae19aa5b. Report an issue: GitHub.