未找到 Detectron2 检查点
Detectron2 Checkpoint not found
从昨晚开始我就一直收到这样的错误。我训练了5个模型,没有问题。然后就出现了这样的问题。如果你能帮上忙,我会很高兴。
AssertionError Traceback (most recent call last)
<ipython-input-9-08522bc16525> in <module>()
34 os.makedirs(cfg.OUTPUT_DIR, exist_ok=True)
35 trainer = CocoTrainer(cfg)
---> 36 trainer.resume_or_load(resume=False)
37 trainer.train()
2 frames
/usr/local/lib/python3.6/dist-packages/fvcore/common/checkpoint.py in load(self, path, checkpointables)
118 if not os.path.isfile(path):
119 path = self.path_manager.get_local_path(path)
--> 120 assert os.path.isfile(path), "Checkpoint {} not found!".format(path)
121
122 checkpoint = self._load_file(path)
AssertionError: Checkpoint https://dl.fbaipublicfiles.com/detectron2/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x/139173657/model_final_68b088.pkl not found!
目前,我找到了手动解决方案。我从 link 下载模型并将其保存到我的驱动器配置文件中。然后我将模型从驱动配置文件复制到输出文件并对下面的代码进行了更改。
cfg.MODEL.WEIGHTS = "/content/output/model_final_68b088.pkl"
也许有更好的解决方案,但我不知道。我认为访问 link.
中的模型文件有问题
只需将 pickle 文件从 google 驱动器装载到您的应用程序。
cfg.MODEL.WEIGHTS = "/content/drive/MyDrive/file_model_weight/model_final_68b088.pkl" # Let training initialize from model zoo
它无法从 model zoo 访问模型 pickle 文件,因此我们必须在本地提供它,或者我们可以直接从 google 驱动器安装它。
从模型动物园下载模型后,
正在添加
MODEL.WEIGHTS path/to/model
在命令行中。
无需更改代码或配置文件。
从昨晚开始我就一直收到这样的错误。我训练了5个模型,没有问题。然后就出现了这样的问题。如果你能帮上忙,我会很高兴。
AssertionError Traceback (most recent call last)
<ipython-input-9-08522bc16525> in <module>()
34 os.makedirs(cfg.OUTPUT_DIR, exist_ok=True)
35 trainer = CocoTrainer(cfg)
---> 36 trainer.resume_or_load(resume=False)
37 trainer.train()
2 frames
/usr/local/lib/python3.6/dist-packages/fvcore/common/checkpoint.py in load(self, path, checkpointables)
118 if not os.path.isfile(path):
119 path = self.path_manager.get_local_path(path)
--> 120 assert os.path.isfile(path), "Checkpoint {} not found!".format(path)
121
122 checkpoint = self._load_file(path)
AssertionError: Checkpoint https://dl.fbaipublicfiles.com/detectron2/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x/139173657/model_final_68b088.pkl not found!
目前,我找到了手动解决方案。我从 link 下载模型并将其保存到我的驱动器配置文件中。然后我将模型从驱动配置文件复制到输出文件并对下面的代码进行了更改。
cfg.MODEL.WEIGHTS = "/content/output/model_final_68b088.pkl"
也许有更好的解决方案,但我不知道。我认为访问 link.
中的模型文件有问题只需将 pickle 文件从 google 驱动器装载到您的应用程序。
cfg.MODEL.WEIGHTS = "/content/drive/MyDrive/file_model_weight/model_final_68b088.pkl" # Let training initialize from model zoo
它无法从 model zoo 访问模型 pickle 文件,因此我们必须在本地提供它,或者我们可以直接从 google 驱动器安装它。
从模型动物园下载模型后,
正在添加
MODEL.WEIGHTS path/to/model
在命令行中。
无需更改代码或配置文件。