{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "roboflow-supervision--measure-dwell-time-in-zones-from-video",
 "repo": "roboflow/supervision",
 "repo_url": "https://github.com/roboflow/supervision",
 "repo_slug": "roboflow-supervision",
 "title": "Measure how long people or vehicles stay in a zone",
 "page_title": "How to measure how long people or vehicles stay in a zone with Supervision",
 "summary": "Combine detection, tracking and zones to time how long objects spend in an area of a video stream.",
 "who": "An operations or retail analyst who wants queue wait times or traffic dwell times from existing cameras.",
 "problem": "Manually watching footage to estimate wait times is slow and inaccurate.",
 "outcome": "Per-object time spent in each zone you draw, from recorded or live video.",
 "steps": [
  "Install with `pip install supervision` plus the detector you will use",
  "Follow the Dwell Time Analysis with Computer Vision tutorial linked in the README",
  "Detect objects per frame, track them across frames and filter detections to the classes you care about",
  "Define the zones on the frame and calculate time spent in designated zones for each tracked object",
  "Use annotators to draw zones, tracks and timers so you can check the results by eye"
 ],
 "agent_prompt": "Using roboflow/supervision, build a script that reads <video file>, detects and tracks people, counts how long each one stays inside a zone I define by coordinates, and writes an annotated video plus a CSV of track id and seconds in zone. Follow the README's dwell time tutorial approach.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Advanced",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "The full walkthrough lives in the linked tutorial rather than the README itself, and tracking people on camera can fall under privacy law, so check local rules first.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.10 or later",
  "A detection or segmentation model; the quickstart uses RF-DETR via `pip install pillow rfdetr`",
  "A Roboflow API key only if you use Inference or download datasets from Roboflow"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/roboflow-supervision/measure-dwell-time-in-zones-from-video/",
 "md": "https://dedupedai.com/use-cases/roboflow-supervision/measure-dwell-time-in-zones-from-video/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/roboflow-supervision--measure-dwell-time-in-zones-from-video.json",
 "api_version": "v1"
}
