cdahms
cdahms

Reputation: 3760

how to import coco_utils and coco_eval?

To get a PyTorch script to work, I need to be able to do:

import coco_utils
import coco_eval

I'm using Ubuntu 18.04 with Python 3.

Based on this post:

How to install COCO PythonAPI in python3

I've done the following so far:

cd ~

git clone https://github.com/cocodataset/cocoapi.git

cd cocoapi/PythonAPI

# open Makefile in gedit, change the two instances of "python" to "python3"

python3 setup.py build_ext --inplace

sudo python3 setup.py install

now this works:

import pycocotools

but these still don't:

import coco_utils
import coco_eval

How can I import coco_utils and coco_eval ??

Upvotes: 3

Views: 4889

Answers (1)

Harshit Kumar
Harshit Kumar

Reputation: 12837

coco_utils.py and coco_eval.py must be the name of the files that should be in the repository you're trying to use.

Possibly you're looking for the object detection reference training scripts provided in the detection (vision/references/detection/) module of torchvision.

Upvotes: 4

Related Questions