Skip to main content

Python interface to the COCO-CameraTrap datasets.

Project description

pycococt

COCO-CameraTrap Indexer. An extension to pycocotools including location and sequence indexing.

Features

  • Extends / Backwards compatable with pycocotools
  • Indexing for Locations and Sequences

Install

pip install pycococt

Usage

from pycococt.cococt import COCOCT

ds = COCOCT('path to COCO-CameraTrap')

# all the core indexes and helpers in pycocotools
ds.imgs
ds.anns
ds.cats
ds.catToImgs
ds.imgToAnns

# with aditional camera trap indexes
ds.locs      # = [
             #   'Location1',
             #   'Location2',
             #   'Location3',
             #   ...
             # ]

ds.locToImgs # = { 'Location1': {
             #        'imageid': {
             #           'id': 'imageid',
             #           'location': 'Location1',
             #           'height': ...
             #         }
             #      },
             #      ...
             #    }

ds.locToSeqs # = {
             #     'Location1': [
             #         'seq id 1_1',
             #         'seq id 1_2',
             #         ...
             #     ],
             #     'Location2': [
             #         'seq id 2_1',
             #         'seq id 2_2',
             #         ...
             #     ]
             #     ...
             # }

ds.seqToImgs # = { 'sequence 1 id': [
             #       {
             #           'id': 'image id',
             #           ...
             #        },
             #        {
             #           'id': 'image id',
             #           ...
             #        },
             #        ...
             #     ],
             #     'sequence 2 id: [
             #       ...
             #     ]
             #       ...
             #    }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycococt-0.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

pycococt-0.1-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page