python123-ops/mbmot/analytics does not have a README file

    AnalyticsError

    pub(all) suberror AnalyticsError {
    InvalidPoint
    InvalidBoundingBox
    InvalidLine(String)
    InvalidRegion(String)
    InvalidConfig(String)
    InvalidClassFilter(String)
    DuplicateRuleId(kind~ : String, id~ : Int)
    NonIncreasingFrame(previous~ : Int, received~ : Int)
    InvalidTrackId(Int)
    InvalidClassId(Int)
    DuplicateTrackId(Int)
    ConflictingTrackId(Int)
    ChangedClassId(track_id~ : Int, previous~ : Int, received~ : Int)
    UnknownLifecycleId(Int)
    ReusedRemovedId(Int)
    } derive(Eq,
    Debug
    )

    Errors raised when spatial rules or one analytics frame violate their contract.

    AnalyticsError::equal

    AnalyticsError::message

    fn AnalyticsError::message(self : AnalyticsError) -> String

    Returns a stable description suitable for command-line error reporting.

    AnalyticsError::not_equal

    fn AnalyticsError::not_equal(x : AnalyticsError, y : AnalyticsError) -> Bool

    AnalyticsConfig

    type AnalyticsConfig derive(Eq,
    Debug
    )

    Boundary-stability settings shared by all line and region rules.

    AnalyticsConfig::anchor

    fn AnalyticsConfig::anchor(self : AnalyticsConfig) -> Anchor

    AnalyticsConfig::default

    Uses the bottom-center of each box and requires two stable observations.

    AnalyticsConfig::equal

    AnalyticsConfig::new

    fn AnalyticsConfig::new(anchor~ : Anchor, stable_frames~ : Int) -> AnalyticsConfig raise AnalyticsError

    AnalyticsConfig::not_equal

    fn AnalyticsConfig::not_equal(x : AnalyticsConfig, y : AnalyticsConfig) -> Bool

    AnalyticsConfig::stable_frames

    fn AnalyticsConfig::stable_frames(self : AnalyticsConfig) -> Int

    AnalyticsEvent

    pub(all) enum AnalyticsEvent {
    LineCrossed(line_id~ : Int, track_id~ : Int, direction~ : CrossingDirection)
    RegionEntered(region_id~ : Int, track_id~ : Int, initial~ : Bool)
    RegionExited(region_id~ : Int, track_id~ : Int, dwell_frames~ : Int)
    } derive(Eq,
    Debug
    )

    A spatial state transition confirmed in the current frame.

    AnalyticsEvent::equal

    AnalyticsEvent::not_equal

    fn AnalyticsEvent::not_equal(x : AnalyticsEvent, y : AnalyticsEvent) -> Bool

    AnalyticsFrame

    type AnalyticsFrame derive(Eq,
    Debug
    )

    Events and deterministic cumulative snapshots returned for one frame.

    AnalyticsFrame::equal

    AnalyticsFrame::events

    AnalyticsFrame::frame_id

    fn AnalyticsFrame::frame_id(self : AnalyticsFrame) -> Int

    AnalyticsFrame::line_class_counts

    fn AnalyticsFrame::line_class_counts(self : AnalyticsFrame) -> Array[LineClassCount]

    AnalyticsFrame::line_counts

    fn AnalyticsFrame::line_counts(self : AnalyticsFrame) -> Array[LineCount]

    AnalyticsFrame::not_equal

    fn AnalyticsFrame::not_equal(x : AnalyticsFrame, y : AnalyticsFrame) -> Bool

    AnalyticsFrame::occupants

    AnalyticsFrame::region_class_counts

    fn AnalyticsFrame::region_class_counts(self : AnalyticsFrame) -> Array[RegionClassCount]

    AnalyticsFrame::region_counts

    fn AnalyticsFrame::region_counts(self : AnalyticsFrame) -> Array[RegionCount]

    AnalyticsFrame::transition_counts

    fn AnalyticsFrame::transition_counts(self : AnalyticsFrame) -> Array[RegionTransitionCount]

    Anchor

    pub(all) enum Anchor {
    Center
    BottomCenter
    } derive(Eq,
    Debug
    )

    Selects the representative point extracted from each tracked box.

    Anchor::equal

    fn Anchor::equal(Anchor, Anchor) -> Bool

    Anchor::not_equal

    fn Anchor::not_equal(x : Anchor, y : Anchor) -> Bool

    Anchor::to_repr

    CrossingDirection

    pub(all) enum CrossingDirection {
    LeftToRight
    RightToLeft
    } derive(Eq,
    Debug
    )

    Direction of a confirmed transition across a directed line.

    CrossingDirection::equal

    CrossingDirection::not_equal

    fn CrossingDirection::not_equal(x : CrossingDirection, y : CrossingDirection) -> Bool

    DirectedLine

    type DirectedLine derive(Eq,
    Debug
    )

    A counting line whose direction runs from start to end.

    DirectedLine::class_ids

    fn DirectedLine::class_ids(self : DirectedLine) -> Array[Int]?

    Returns None when the rule accepts every class.

    DirectedLine::end

    fn DirectedLine::end(self : DirectedLine) -> Point

    DirectedLine::equal

    DirectedLine::for_classes

    fn DirectedLine::for_classes(id : Int, start : Point, end : Point, class_ids : Array[Int]) -> DirectedLine raise AnalyticsError

    Creates a directed line that observes only the listed classes.

    DirectedLine::id

    fn DirectedLine::id(self : DirectedLine) -> Int

    DirectedLine::new

    fn DirectedLine::new(id : Int, start : Point, end : Point) -> DirectedLine raise AnalyticsError

    Creates a non-degenerate directed line with a non-negative rule identifier.

    DirectedLine::not_equal

    fn DirectedLine::not_equal(x : DirectedLine, y : DirectedLine) -> Bool

    DirectedLine::start

    fn DirectedLine::start(self : DirectedLine) -> Point

    LineClassCount

    type LineClassCount derive(Eq,
    Debug
    )

    Cumulative crossings for one class on one directed line.

    LineClassCount::class_id

    fn LineClassCount::class_id(self : LineClassCount) -> Int

    LineClassCount::equal

    LineClassCount::left_to_right

    fn LineClassCount::left_to_right(self : LineClassCount) -> Int

    LineClassCount::line_id

    fn LineClassCount::line_id(self : LineClassCount) -> Int

    LineClassCount::not_equal

    fn LineClassCount::not_equal(x : LineClassCount, y : LineClassCount) -> Bool

    LineClassCount::right_to_left

    fn LineClassCount::right_to_left(self : LineClassCount) -> Int

    LineClassCount::unique_left_to_right

    fn LineClassCount::unique_left_to_right(self : LineClassCount) -> Int

    LineClassCount::unique_right_to_left

    fn LineClassCount::unique_right_to_left(self : LineClassCount) -> Int

    LineCount

    type LineCount derive(Eq,
    Debug
    )

    Cumulative crossings for one directed line.

    LineCount::equal

    fn LineCount::equal(LineCount, LineCount) -> Bool

    LineCount::left_to_right

    fn LineCount::left_to_right(self : LineCount) -> Int

    LineCount::line_id

    fn LineCount::line_id(self : LineCount) -> Int

    LineCount::not_equal

    fn LineCount::not_equal(x : LineCount, y : LineCount) -> Bool

    LineCount::right_to_left

    fn LineCount::right_to_left(self : LineCount) -> Int

    LineCount::unique_left_to_right

    fn LineCount::unique_left_to_right(self : LineCount) -> Int

    LineCount::unique_right_to_left

    fn LineCount::unique_right_to_left(self : LineCount) -> Int

    Point

    A finite two-dimensional coordinate.

    Point::equal

    fn Point::equal(Point, Point) -> Bool

    Point::new

    fn Point::new(x : Double, y : Double) -> Point raise AnalyticsError

    Creates a point after rejecting NaN and infinite coordinates.

    Point::not_equal

    fn Point::not_equal(x : Point, y : Point) -> Bool

    Point::to_repr

    Point::x

    fn Point::x(self : Point) -> Double

    Point::y

    fn Point::y(self : Point) -> Double

    PolygonRegion

    type PolygonRegion derive(Eq,
    Debug
    )

    A simple polygon used as an occupancy region.

    PolygonRegion::class_ids

    fn PolygonRegion::class_ids(self : PolygonRegion) -> Array[Int]?

    Returns None when the rule accepts every class.

    PolygonRegion::equal

    PolygonRegion::for_classes

    fn PolygonRegion::for_classes(id : Int, vertices : Array[Point], class_ids : Array[Int]) -> PolygonRegion raise AnalyticsError

    Creates a polygon region that observes only the listed classes.

    PolygonRegion::id

    fn PolygonRegion::id(self : PolygonRegion) -> Int

    PolygonRegion::new

    fn PolygonRegion::new(id : Int, vertices : Array[Point]) -> PolygonRegion raise AnalyticsError

    Creates a clockwise or counter-clockwise simple polygon.

    PolygonRegion::not_equal

    fn PolygonRegion::not_equal(x : PolygonRegion, y : PolygonRegion) -> Bool

    PolygonRegion::vertices

    fn PolygonRegion::vertices(self : PolygonRegion) -> Array[Point]

    RegionClassCount

    type RegionClassCount derive(Eq,
    Debug
    )

    Cumulative entries, exits and current occupancy for one class in one region.

    RegionClassCount::class_id

    fn RegionClassCount::class_id(self : RegionClassCount) -> Int

    RegionClassCount::completed_dwell_frames

    fn RegionClassCount::completed_dwell_frames(self : RegionClassCount) -> Int

    RegionClassCount::current_occupancy

    fn RegionClassCount::current_occupancy(self : RegionClassCount) -> Int

    RegionClassCount::entries

    fn RegionClassCount::entries(self : RegionClassCount) -> Int

    RegionClassCount::equal

    RegionClassCount::exits

    fn RegionClassCount::exits(self : RegionClassCount) -> Int

    RegionClassCount::not_equal

    fn RegionClassCount::not_equal(x : RegionClassCount, y : RegionClassCount) -> Bool

    RegionClassCount::peak_occupancy

    fn RegionClassCount::peak_occupancy(self : RegionClassCount) -> Int

    RegionClassCount::region_id

    fn RegionClassCount::region_id(self : RegionClassCount) -> Int

    RegionClassCount::unique_tracks

    fn RegionClassCount::unique_tracks(self : RegionClassCount) -> Int

    RegionCount

    type RegionCount derive(Eq,
    Debug
    )

    Cumulative entries, exits and unique identities for one region.

    RegionCount::completed_dwell_frames

    fn RegionCount::completed_dwell_frames(self : RegionCount) -> Int

    RegionCount::current_occupancy

    fn RegionCount::current_occupancy(self : RegionCount) -> Int

    RegionCount::entries

    fn RegionCount::entries(self : RegionCount) -> Int

    RegionCount::equal

    fn RegionCount::equal(RegionCount, RegionCount) -> Bool

    RegionCount::exits

    fn RegionCount::exits(self : RegionCount) -> Int

    RegionCount::not_equal

    fn RegionCount::not_equal(x : RegionCount, y : RegionCount) -> Bool

    RegionCount::peak_occupancy

    fn RegionCount::peak_occupancy(self : RegionCount) -> Int

    RegionCount::region_id

    fn RegionCount::region_id(self : RegionCount) -> Int

    RegionCount::unique_tracks

    fn RegionCount::unique_tracks(self : RegionCount) -> Int

    RegionOccupant

    type RegionOccupant derive(Eq,
    Debug
    )

    One visible identity currently confirmed inside a region.

    RegionOccupant::class_id

    fn RegionOccupant::class_id(self : RegionOccupant) -> Int

    RegionOccupant::dwell_frames

    fn RegionOccupant::dwell_frames(self : RegionOccupant) -> Int

    RegionOccupant::equal

    RegionOccupant::not_equal

    fn RegionOccupant::not_equal(x : RegionOccupant, y : RegionOccupant) -> Bool

    RegionOccupant::region_id

    fn RegionOccupant::region_id(self : RegionOccupant) -> Int

    RegionOccupant::track_id

    fn RegionOccupant::track_id(self : RegionOccupant) -> Int

    RegionTransitionCount

    type RegionTransitionCount derive(Eq,
    Debug
    )

    A confirmed exit from one region followed by entry into another.

    RegionTransitionCount::class_id

    fn RegionTransitionCount::class_id(self : RegionTransitionCount) -> Int

    RegionTransitionCount::count

    RegionTransitionCount::equal

    RegionTransitionCount::from_region_id

    fn RegionTransitionCount::from_region_id(self : RegionTransitionCount) -> Int

    RegionTransitionCount::not_equal

    RegionTransitionCount::to_region_id

    fn RegionTransitionCount::to_region_id(self : RegionTransitionCount) -> Int

    SpatialAnalyzer

    type SpatialAnalyzer

    Stateful conversion from visible track samples to spatial events and counts.

    SpatialAnalyzer::new

    Creates an analyzer and fixes a deterministic rule order by rule identifier.

    SpatialAnalyzer::reset

    fn SpatialAnalyzer::reset(self : SpatialAnalyzer) -> Unit

    Clears identities, counters, dwell state and the frame clock.

    SpatialAnalyzer::update

    fn SpatialAnalyzer::update(self : SpatialAnalyzer, frame_id : Int, samples : Array[TrackSample], lost : Array[Int], removed : Array[Int]) -> AnalyticsFrame raise AnalyticsError

    Advances one frame atomically. Coordinates and rules must share one scale.

    SpatialAnalyzer::update_mbmot

    fn SpatialAnalyzer::update_mbmot(self : SpatialAnalyzer, frame_id : Int, frame_tracks :
    FrameTracks
    ) -> AnalyticsFrame raise AnalyticsError

    Accepts the visible and lifecycle output of an MBMOT tracker directly.

    TrackSample

    type TrackSample derive(Eq,
    Debug
    )

    The minimum tracker-independent input required by spatial analytics.

    TrackSample::class_id

    fn TrackSample::class_id(self : TrackSample) -> Int

    TrackSample::equal

    fn TrackSample::equal(TrackSample, TrackSample) -> Bool

    TrackSample::from_track

    Converts one visible MBMOT track without exposing tracker internals.

    TrackSample::new

    fn TrackSample::new(track_id : Int, bbox :
    BoundingBox
    , class_id : Int) -> TrackSample raise AnalyticsError

    TrackSample::not_equal

    fn TrackSample::not_equal(x : TrackSample, y : TrackSample) -> Bool

    TrackSample::track_id

    fn TrackSample::track_id(self : TrackSample) -> Int