kwcoco.coco_image
¶
Module Contents¶
Classes¶
An object-oriented representation of a coco image. |
- class kwcoco.coco_image.CocoImage(img, dset=None)[source]¶
Bases:
ubelt.NiceRepr
An object-oriented representation of a coco image.
It provides helper methods that are specific to a single image.
This operates directly on a single coco image dictionary, but it can optionally be connected to a parent dataset, which allows it to use CocoDataset methods to query about relationships and resolve pointers.
This is different than the Images class in coco_object1d, which is just a vectorized interface to multiple objects.
Example
>>> import kwcoco >>> dset = kwcoco.CocoDataset.demo('shapes8') >>> self = dset._coco_image(1)
>>> dset = kwcoco.CocoDataset.demo('vidshapes8-multispectral') >>> self = dset._coco_image(1)