overstep is a lightweight, high-performance Python library for boundary violation detection, spatial video analytics, crowd density monitoring, person Re-ID, multi-tripwire perimeter defense, Markov zone transitions, Kalman uncertainty confidence ellipses, GIS GeoJSON integration, multi-camera mapping, collision forecasting, heatmap generation, trajectory clustering, and object tracking.
-
Computational Geometry Suite:
-
Vectorized Batch PIP:
batch_point_in_polygonfor high-speed$O(M \times N)$ array evaluation checking$M$ query points against an$N$ -vertex polygon in a single array operation. -
Ramer-Douglas-Peucker (RDP) Simplification:
simplify_polygoncurve simplification. -
Convex & Concave Hulls:
convex_hullandconcave_hull. -
Oriented Bounding Box (OBB):
oriented_bounding_box.
-
Vectorized Batch PIP:
-
Kalbee Kalman State Estimation & Uncertainty Ellipses:
- 7D SORT Kalman Filter powered by
kalbee(KalmanBoxTracker) with Chi-Square outlier rejection (gated_update). - Position covariance uncertainty confidence ellipses calculated via
get_uncertainty_ellipse.
- 7D SORT Kalman Filter powered by
-
Markov Zone Transition Graph:
-
ZoneTransitionGraphmodels transition probability matrices$P(Z_j \mid Z_i)$ and computes anomaly scores for unexpected inter-zone movements.
-
-
Async Non-Blocking Event Engine:
-
AsyncEventEnginesupports non-blocking stream processing with event listener callbacks (on_enter,on_exit,on_cross,on_dwell).
-
-
Crowd Density & Social Distance Analysis:
-
CrowdDensityAnalyzerandSocialDistanceAnalyzer.
-
-
Track Re-Identification (Re-ID):
-
ReIDFeatureMatchermatches visual feature embeddings usingcosine_similarity.
-
-
Multi-Line Virtual Tripwire System:
-
MultiTripwireManagerdetects sequential perimeter breaches.
-
-
Automated Analytics Reports & GeoJSON:
-
AnalyticsReportGeneratorand RFC 7946 GeoJSON importer/exporter (polygon_to_geojson,events_to_geojson_feature_collection).
-
-
Multi-Camera Aggregation & Collision Forecasting:
-
MultiCameraAggregatorandCollisionPredictor.
-
Using uv:
uv pip install -e .import overstep as ov
# 1. Vectorized PIP check for 10,000 points
query_points = np.random.uniform(0, 1000, (10000, 2))
polygon = np.array([[100, 100], [500, 100], [500, 400], [100, 400]])
inside_mask = ov.batch_point_in_polygon(query_points, polygon)
# 2. Setup tracker & async event engine
poly_zone = ov.PolygonZone(polygon=polygon)
sync_engine = ov.EventEngine(poly_zone)
async_engine = ov.AsyncEventEngine(sync_engine)
async_engine.register_callback("enter", lambda ev: print(f"Alert: Track #{ev.track_id} entered!"))Run full test suite with uv:
uv run pytest