1

我正在处理 MASK RCNN 存储库并运行了 demo.ipynb 文件,但是当我想从该存储库运行其他 notbook 文件时,例如“inspect_model.ipynb”或“inspect_data.ipynb”,我在“加载数据集”中遇到此错误“ 部分: **

NameError Traceback (most recent call last)
in ()
4 elif config.NAME == "coco":
5 dataset = coco.CocoDataset()
----> 6 dataset.load_coco(COCO_DIR, "train")
7
8 # Must call before using the dataset

/content/gdrive/My Drive/Colab Notebooks/MASK RCNN/samples/coco/coco.py in load_coco(self, dataset_dir, subset, year, class_ids, class_map, return_coco, auto_download)
109 self.auto_download(dataset_dir, subset, year)
110
--> 111 coco = COCO("{}/annotations/instances_{}{}.json".format(dataset_dir, subset, year))
112 if subset == "minival" or subset == "valminusminival":
113 subset = "val"

NameError: name 'COCO' is not defined**

有关信息,我正在 Google COLAB 上运行此代码。我将不胜感激任何帮助。

4

0 回答 0