Search code examples
pythonpytorchpytorch-lightninghuggingface-datasets

Where can one get the coco utils modules? (unable to find them in hf datasets)


I have been following this tutorial which is a walk-through of fine-tuning a pre-trained Detr model

While trying to evaluate the model, I should be using from datasets import get_coco_api_from_dataset. However, I am getting an ImportError while doing that:

ImportError: cannot import name 'get_coco_api_from_dataset'

I don't seem to find the coco_eval module too. So, this line fails: from datasets.coco_eval import CocoEvaluator. Were the coco-related modules shifted somewhere, or do I need to import them from a different package?

Can someone please help me understand how can I import this module?


Solution

  • So it seems it gets cloned in the step before in that notebook. See https://github.com/facebookresearch/detr/tree/main/datasets.