https://github.com/bencevans/pycococt
COCO-CameraTrap Indexer. An extension to pycocotools including location and sequence indexing.
https://github.com/bencevans/pycococt
camera-traps cameratrap coco-dataset machine-learning
Last synced: 11 months ago
JSON representation
COCO-CameraTrap Indexer. An extension to pycocotools including location and sequence indexing.
- Host: GitHub
- URL: https://github.com/bencevans/pycococt
- Owner: bencevans
- License: mit
- Created: 2020-05-07T13:59:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-24T13:45:11.000Z (over 4 years ago)
- Last Synced: 2025-01-12T04:29:13.843Z (about 1 year ago)
- Topics: camera-traps, cameratrap, coco-dataset, machine-learning
- Language: Python
- Homepage: https://pypi.org/project/pycococt/
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pycococt
> [COCO-CameraTrap](https://github.com/microsoft/CameraTraps/blob/9384e69564a0c425b9ecdef3b050ab75a14e4413/data_management/README.md) Indexer. An extension to pycocotools including location and sequence indexing.
## Features
- Extends / Backwards compatable with [pycocotools](https://github.com/cocodataset/cocoapi/tree/master/PythonAPI/pycocotools)
- Indexing for Locations and Sequences
## Install
```sh
pip install pycococt
```
## Usage
```python
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: [
# ...
# ]
# ...
# }
```
## Related
* Collection of COCO-CameraTrap datasets available at https://lila.science/category/camera-traps/
* COCO-CameraTrap [format definition](https://github.com/Microsoft/CameraTraps/blob/master/data_management/README.md#coco-cameratraps-format)
## License
MIT