# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. """Collecting some commonly used type hint in mmdetection.""" from typing import List, Optional, Sequence, Tuple, Union from mmengine.config import ConfigDict from mmengine.structures import InstanceData, PixelData # TODO: Need to avoid circular import with assigner and sampler # Type hint of config data ConfigType = Union[ConfigDict, dict] OptConfigType = Optional[ConfigType] # Type hint of one or more config data MultiConfig = Union[ConfigType, List[ConfigType]] OptMultiConfig = Optional[MultiConfig] InstanceList = List[InstanceData] OptInstanceList = Optional[InstanceList] PixelList = List[PixelData] OptPixelList = Optional[PixelList] RangeType = Sequence[Tuple[int, int]]