:py:mod:`kwcoco.coco_image` =========================== .. py:module:: kwcoco.coco_image Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: kwcoco.coco_image.CocoImage .. py:class:: CocoImage(img, dset=None) Bases: :py:obj:`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. .. rubric:: Example >>> import kwcoco >>> dset = kwcoco.CocoDataset.demo('shapes8') >>> self = dset._coco_image(1) >>> dset = kwcoco.CocoDataset.demo('vidshapes8-multispectral') >>> self = dset._coco_image(1) .. py:method:: __nice__(self) .. py:method:: __getitem__(self, key) .. py:method:: get(self, key, default=ub.NoParam) Duck type some of the dict interface .. py:method:: dsize(self) :property: .. py:method:: _iter_asset_objs(self) Iterate through base + auxiliary dicts that have file paths