cvat/cvat-sdk/cvat_sdk/pytorch/common.py

26 lines
589 B
Python
Raw Normal View History

2025-09-16 01:19:40 +00:00
# Copyright (C) CVAT.ai Corporation
#
# SPDX-License-Identifier: MIT
from collections.abc import Mapping
import attrs
from cvat_sdk.datasets.common import FrameAnnotations
@attrs.frozen
class Target:
"""
Non-image data for a dataset sample.
"""
annotations: FrameAnnotations
"""Annotations for the frame corresponding to the sample."""
label_id_to_index: Mapping[int, int]
"""
A mapping from label_id values in `LabeledImage` and `LabeledShape` objects
to an integer index. This mapping is consistent across all samples for a given task.
"""