geococo.coco_models =================== .. py:module:: geococo.coco_models Classes ------- .. autoapisummary:: geococo.coco_models.CocoDataset geococo.coco_models.Info geococo.coco_models.Image geococo.coco_models.Annotation geococo.coco_models.Category geococo.coco_models.RleDict geococo.coco_models.Source Module Contents --------------- .. py:class:: CocoDataset Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: info :type: Info .. py:attribute:: images :type: List[Image] :value: [] .. py:attribute:: annotations :type: List[Annotation] :value: [] .. py:attribute:: categories :type: List[Category] :value: [] .. py:attribute:: sources :type: List[Source] :value: [] .. py:attribute:: next_image_id :type: int .. py:attribute:: next_annotation_id :type: int .. py:attribute:: next_source_id :type: int .. py:method:: _set_ids(values) .. py:method:: add_annotation(annotation) .. py:method:: add_image(image) .. py:method:: add_source(source_path, date_captured) .. py:method:: add_categories(category_ids, category_names, super_names) .. py:method:: bump_version(bump_method) .. py:method:: verify_used_dir(images_dir) .. py:class:: Info Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: version :type: str :value: '' .. py:attribute:: year :type: Optional[int] :value: None .. py:attribute:: description :type: Optional[str] :value: None .. py:attribute:: contributor :type: Optional[str] :value: None .. py:attribute:: date_created :type: Optional[datetime.datetime] :value: None .. py:class:: Image Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: id :type: int .. py:attribute:: width :type: int .. py:attribute:: height :type: int .. py:attribute:: file_name :type: pathlib.Path .. py:attribute:: source_id :type: int .. py:attribute:: date_captured :type: datetime.datetime .. py:class:: Annotation Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: id :type: int .. py:attribute:: image_id :type: int .. py:attribute:: category_id :type: int .. py:attribute:: segmentation :type: RleDict .. py:attribute:: area :type: float .. py:attribute:: bbox :type: List[int] .. py:attribute:: iscrowd :type: int .. py:class:: Category Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: id :type: int .. py:attribute:: name :type: str .. py:attribute:: supercategory :type: str .. py:class:: RleDict Bases: :py:obj:`typing_extensions.TypedDict` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:attribute:: size :type: List[int] .. py:attribute:: counts :type: bytes .. py:class:: Source Bases: :py:obj:`pydantic.BaseModel` .. py:attribute:: id :type: int .. py:attribute:: file_name :type: pathlib.Path .. py:attribute:: date_captured :type: datetime.datetime