{"record":{"id":"14cf7d54ae19aa5b","repo":"facebookresearch/detectron2","slug":"model-not-present-in-the-catalog","errorCode":null,"errorMessage":"model not present in the catalog: {}","messagePattern":"model not present in the catalog: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"detectron2/checkpoint/catalog.py","lineNumber":63,"sourceCode":"        \"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\n        \"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\n        \"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\n        \"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\n        \"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\n        \"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\n        \"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\n        \"35998355/rpn_R-50-C4_1x\": \"35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L\",  # noqa B950\n        \"35998814/rpn_R-50-FPN_1x\": \"35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179\",  # noqa B950\n        \"36225147/fast_R-50-FPN_1x\": \"36225147/12_2017_baselines/fast_rcnn_R-50-FPN_1x.yaml.08_39_09.L3obSdQ2\",  # noqa B950\n    }\n\n    @staticmethod\n    def get(name):\n        if name.startswith(\"Caffe2Detectron/COCO\"):\n            return ModelCatalog._get_c2_detectron_baseline(name)\n        if name.startswith(\"ImageNetPretrained/\"):\n            return ModelCatalog._get_c2_imagenet_pretrained(name)\n        raise RuntimeError(\"model not present in the catalog: {}\".format(name))\n\n    @staticmethod\n    def _get_c2_imagenet_pretrained(name):\n        prefix = ModelCatalog.S3_C2_DETECTRON_PREFIX\n        name = name[len(\"ImageNetPretrained/\") :]\n        name = ModelCatalog.C2_IMAGENET_MODELS[name]\n        url = \"/\".join([prefix, name])\n        return url\n\n    @staticmethod\n    def _get_c2_detectron_baseline(name):\n        name = name[len(\"Caffe2Detectron/COCO/\") :]\n        url = ModelCatalog.C2_DETECTRON_MODELS[name]\n        if \"keypoint_rcnn\" in name:\n            dataset = ModelCatalog.C2_DATASET_COCO_KEYPOINTS\n        else:\n            dataset = ModelCatalog.C2_DATASET_COCO\n","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/facebookresearch/detectron2/blob/a2f4a8771ab77e8411c26b27f24f9489a28a2453/detectron2/checkpoint/catalog.py#L45-L81","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pass a local file path or a full URL instead of a catalog name","Use a supported prefix such as 'ImageNetPretrained/MSRA/R-50.pkl' or 'Caffe2Detectron/COCO/...'","Check detectron2/checkpoint/catalog.py ModelCatalog constants for the exact recognized names in your version"],"exampleFix":"# before\nDetectionCheckpointer(model).load(\"X-101-32x8d\")\n# after\nDetectionCheckpointer(model).load(\"ImageNetPretrained/MSRA/X-101-32x8d.pkl\")","handlingStrategy":"type-guard","validationCode":"def is_catalog_name(name):\n    return name.startswith(\"Caffe2Detectron/COCO\") or name.startswith(\"ImageNetPretrained/\")\nif not os.path.isfile(name) and not name.startswith((\"http\", \"s3\", \"gs\")) and not is_catalog_name(name):\n    raise FileNotFoundError(f\"unknown model name {name}\")","typeGuard":"def resolve_model_source(name: str) -> str:\n    if os.path.isfile(name): return \"file\"\n    if name.startswith((\"http://\",\"https://\",\"s3://\",\"gs://\")): return \"url\"\n    if name.startswith((\"Caffe2Detectron/COCO\",\"ImageNetPretrained/\")): return \"catalog\"\n    return \"unknown\"","tryCatchPattern":"try:\n    DetectionCheckpointer(model).load(name)\nexcept RuntimeError as e:\n    if \"not present in the catalog\" in str(e):\n        # fall back to explicit path/url\n        DetectionCheckpointer(model).load(\"/path/to/weights.pkl\")\n    else:\n        raise","preventionTips":["Prefer local paths or full URLs over catalog names in scripts","Pin catalog-supported names by checking catalog.py constants","Add a smoke test that resolves every model name used in configs"],"tags":["model-zoo","catalog","pretrained-weights"],"backgroundTag":"model-name-not-found","analyzedSha":"a2f4a8771ab77e8411c26b27f24f9489a28a2453","analyzedAt":"2026-08-27T12:08:21.260Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}