anonymous
anonymous

Reputation: 39

module 'coco' has no attribute 'cocoConfig'

import coco
# from samples.coco import coco
config = coco.cocoConfig()



COCO_DIR = "/Users/anusha/Desktop/MLANusha/coco/val2017"

AttributeError Traceback (most recent call last) in 1 import coco 2 # from samples.coco import coco ----> 3 config = coco.cocoConfig() 4 COCO_DIR = "/Users/anusha/Desktop/MLANusha/coco/val2017"

AttributeError: module 'coco' has no attribute 'cocoConfig'

Upvotes: 0

Views: 2321

Answers (1)

jitvimol
jitvimol

Reputation: 72

Follow these steps:
(Copied from github: https://github.com/matterport/Mask_RCNN/issues/1595)

Install Visual studio build tools from this link https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017

Then clone the cocoapi repository from github git clone https://github.com/cocodataset/cocoapi.git

After cloning, go to the PythonAPI sub-directory in the same folder and run, python setup.py install

If all these steps went well then you are good to go.

Or simply you can try: !pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

And then try to import from pycocotools.coco import COCO

Upvotes: 0

Related Questions