Skip to content

pytorchcocotools: Unofficial APIs for the MS-COCO dataset using PyTorch

Welcome to pytorchcocotools's documentation!

Build Documentation Docs with MkDocs Poetry linting: ruff pre-commit Checked with pyright security: bandit Semantic Versions Copier License

Unofficial APIs for the MS-COCO dataset using PyTorch

The file format is explained in the official documentation and nicely summarized here.

Features

  • Strongly typed COCO data format represetation
  • Drop-in compatible COCO and COCOeval classes
  • (Almost) drop-in compatible mask methods
  • Pure torch implementation
  • torchvision data set using the latest transformation API
  • fully unit tested and documented

Installation

With pip:

python -m pip install pytorchcocotools

With poetry:

poetry add pytorchcocotools

Usage

import pytorchcocotools

...

See a more complete example in the notebooks folder.

API

Check the API reference for more details.