to resolve this issue, you can move the configs folder from detectron2/configs to detectron2/detectron2/model_zoo/. Then, use the following line to load the configuration :cfg.merge_from_file(model_zoo.get_config_file("COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml")) .it will work