Inspiration
A bounding box is not an event.
In real-world video analytics, detecting a person in a frame is only the beginning. Determining whether that person actually crossed a virtual boundary, in which direction, and whether the event should be counted requires temporal reasoning and reliable evidence.
Simple line-crossing systems can produce duplicate alerts, miss brief events, or incorrectly count people moving close to a boundary. These problems become especially challenging when tracking is unstable or people are partially occluded.
We created PathWatch to explore a more transparent approach to video event detection: one that combines computer vision, temporal consistency, structured verification, and event-level auditing.
Our goal is not merely to generate alerts, but to make those alerts explainable, measurable, and reproducible.
What it does
PathWatch is an auditable video analytics system for bidirectional line-crossing detection.
The system analyzes video footage, evaluates movement relative to a configurable virtual boundary, and distinguishes crossings in both directions.
Its core capabilities include:
- Bidirectional detection: Recognizes movement across a boundary in both A-to-B and B-to-A directions.
- Temporal event filtering: Uses stateful filtering and hysteresis to reduce unstable event triggering.
- SideLatch logic: Maintains temporal state to avoid repeatedly counting the same crossing.
- Optional agent-assisted verification: Re-examines selected candidate events through a separate verification pathway.
- Event-level auditing: Records and reconciles detection outcomes against annotated reference events.
- Reproducible evaluation: Supports comparison between different configurations using consistent evaluation criteria.
Instead of hiding imperfect results, PathWatch makes detection errors part of the engineering process.
How we built it
PathWatch was developed around a Python-based computer vision pipeline using OpenCV for video processing and geometric event analysis.
The system combines several complementary mechanisms.
1. Visual detection and movement analysis
Video frames are processed to extract the visual information needed to assess movement across a defined boundary.
2. Geometric crossing logic
Candidate crossings are evaluated using the relationship between tracked positions, boundary geometry, and movement direction.
3. Temporal stabilization
Reference-point selection, distance hysteresis, temporal smoothing, and SideLatch state management help distinguish a genuine crossing from temporary fluctuations near the line.
4. Optional verification
A separate agent-assisted verification configuration examines selected candidates that may have been missed or rejected by the primary event pipeline.
5. Reproducible testing and auditing
We developed regression tests, structured event reconciliation, configuration comparisons, and documented limitations so that reported results can be independently examined.
The engineering process emphasized repeatability, controlled experiments, explicit failure reporting, and traceable changes rather than unsupported accuracy claims.
Challenges we ran into
Recovering missed events without creating false positives
One of the most important lessons came from our agent-assisted verification experiments.
Recovering additional event candidates did not automatically improve precision.
In our event-level reconciliation, three recovered candidates produced only one additional true positive and two false positives.
This finding changed how we evaluated the verification module. Rather than treating every recovered event as an improvement, we required each candidate to be checked against the ground-truth annotations.
Accuracy versus processing cost
Our evaluated configurations demonstrated a trade-off between faster execution and improved recall.
| Evaluation metric | Fast configuration | Verification configuration |
|---|---|---|
| True positives | 5 | 6 |
| False positives | 11 | 12 |
| False negatives | 3 | 2 |
| Recall | 0.625 | 0.750 |
| F1 score | 0.417 | 0.462 |
These results come from a small local evaluation set and should not be interpreted as production-scale performance estimates.
The more advanced configuration improved recall and F1 on this particular evaluation, but also introduced an additional false positive and greater processing overhead.
Generalization and deployment
Boundary ambiguity, occlusion, unstable tracking, and limited annotated evaluation data remain important challenges.
AWS deployment also requires separate runtime verification. A local implementation or deployment script alone is not proof of a successful cloud deployment.
Accomplishments that we're proud of
Our most meaningful achievement is building a video-event analysis prototype in which errors can be investigated rather than simply ignored.
The Cycle 9 release includes:
- A complete engineering delivery archive containing 187 registered files.
- A regression suite reported as passing 86 out of 86 checks.
- A configurable temporal line-crossing detection pipeline.
- An optional agent-assisted verification pathway.
- Event-level reconciliation of true positives, false positives, and false negatives.
- Documented performance trade-offs and known limitations.
- Reproducibility, testing, and delivery documentation.
We are particularly proud of identifying and correcting an evaluation interpretation that could have overstated the effectiveness of the verification module.
For us, a system that accurately reports its limitations is more valuable than one that presents an impressive but misleading score.
What we learned
This project reinforced three important lessons.
Temporal reasoning matters. Reliable video events cannot always be determined from isolated frames. Their interpretation depends on movement history and state.
More detections do not necessarily mean better detections. Improving recall without understanding false positives can lead to misleading conclusions.
Reproducibility is part of the product. Versioned configurations, regression testing, and event-level audit trails make computer vision systems easier to improve, evaluate, and trust.
What's next for PathWatch
Our next engineering priorities are:
- Expand evaluation across larger, independently annotated video datasets and more diverse environments.
- Improve verification policies to reduce false-positive recovery events.
- Optimize processing performance while preserving temporal consistency.
- Validate the complete OpenCV 5 runtime and AWS deployment pathway.
- Develop more accessible visualizations for reviewing detections, missed events, and verification decisions.
- Evaluate robustness under occlusion, lighting changes, crowded scenes, and camera motion.
PathWatch is a research-oriented prototype, not a production-validated safety or surveillance system. Its purpose is to make video event detection more transparent, testable, and technically accountable.
We believe trustworthy computer vision begins not with perfect-looking results, but with the ability to explain what happened, verify why it happened, and improve the system using evidence.
Log in or sign up for Devpost to join the conversation.