Skip to content

Core

Position

Bases: Enum

Enum representing the position of an anchor point.

Source code in supervision/geometry/core.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class Position(Enum):
    """
    Enum representing the position of an anchor point.
    """

    CENTER = "CENTER"
    CENTER_LEFT = "CENTER_LEFT"
    CENTER_RIGHT = "CENTER_RIGHT"
    TOP_CENTER = "TOP_CENTER"
    TOP_LEFT = "TOP_LEFT"
    TOP_RIGHT = "TOP_RIGHT"
    BOTTOM_LEFT = "BOTTOM_LEFT"
    BOTTOM_CENTER = "BOTTOM_CENTER"
    BOTTOM_RIGHT = "BOTTOM_RIGHT"

    @classmethod
    def list(cls):
        return list(map(lambda c: c.value, cls))