# Copyright (c) 2023, NVIDIA CORPORATION.  All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""A datastructure holding individual detections after clustering."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from collections import namedtuple

Detection = namedtuple('Detection', [
    'class_name',      # String, e.g. 'car'.

    'bbox',            # Float (x1, y1, x2, y2).

    'confidence',      # Float.

    'bbox_variance',   # Float. Variance of the bboxes used for this Detection.

    'num_raw_bboxes',  # Float. Number of bboxes used for this Detection.

    'cov',             # Float. Average coverage of the object. Optional.

    'depth',           # Float. Predicted distance of the object. Optional.

    'orientation',     # Float. Predicted orientation of the object. Optional.

    'urgency',         # Float. Predicted urgency of the object. Optional.

])
num_optionals = 4
# Default optional fields to None.
Detection.__new__.__defaults__ = (None,) * num_optionals
