Skip to main content

sightloom_core/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2//! Portable, allocation-conscious primitives for `SightLoom` vision pipelines.
3//!
4//! This crate is the compact foundation: geometry, detections, overlap, NMS,
5//! and basic zone events. Rich observations, masks, tracking, smoothing, and
6//! memory live in higher crates.
7
8#[cfg(feature = "alloc")]
9extern crate alloc;
10
11mod detection;
12mod envelope;
13mod error;
14mod event;
15mod geometry;
16mod ids;
17mod line;
18mod nms;
19mod orientation;
20mod overlap;
21#[cfg(feature = "alloc")]
22mod owned;
23mod polygon;
24mod stamp;
25mod zone;
26
27pub use detection::{Detection, DetectionBatch};
28pub use envelope::{EventEnvelope, EventKind, EventPayload};
29pub use error::{CoreError, GeometryError};
30pub use event::{Direction, VisionEvent};
31pub use geometry::{Point, Rect};
32pub use ids::{
33    AnomalyId, AppearanceId, ClassId, EmbeddingRef, EventId, EvidenceRef, KeypointSetRef,
34    LocalTrackId, MaskRef, ObservationId, PatternId, RedactionIntervalId, SourceId, SubjectId,
35    TrackId, TrackKey, TrackUid, VisitId, ZoneId,
36};
37pub use line::{LineSegment, LineSide, crosses_segment, line_side};
38pub use nms::{NmsConfig, NmsMode, OverlapMetric, nms_in_place};
39pub use overlap::{intersection_area, ios, iou};
40#[cfg(feature = "alloc")]
41pub use owned::OwnedDetectionBatch;
42pub use polygon::Polygon;
43pub use stamp::{FrameStamp, MediaTime};
44pub use zone::{LineZoneMonitor, PolygonZoneMonitor};