{"full_name":"roboflow/supervision","owner":"roboflow","name":"supervision","url":"https://github.com/roboflow/supervision","description":"We write your reusable computer vision tools. 💜","homepage":"https://supervision.roboflow.com","topics":[],"language":"Python","license":"MIT","avatar":"https://avatars.githubusercontent.com/u/53104118?v=4","created_at":"2022-11-28T14:08:44Z","pushed_at":"2026-11-10T09:27:10Z","metrics":{"stars":51575,"forks":4938,"watchers":290,"issues":584,"prs":2029,"releases":55,"issues_open":null,"issues_closed":null,"prs_open":null,"prs_closed":null,"prs_merged":null,"discussions":272},"growth":{"day":{"stars":12,"forks":7,"base_day":"2026-11-09"},"week":{"stars":109,"forks":32,"base_day":"2026-11-03"},"month":{"stars":448,"forks":76,"base_day":"2026-10-11"}},"history":{"dates":["2026-09-06","2026-09-07","2026-09-08","2026-09-09","2026-09-10","2026-09-11","2026-09-12","2026-09-13","2026-09-14","2026-09-15","2026-09-16","2026-09-17","2026-09-18","2026-09-19","2026-09-20","2026-09-21","2026-09-22","2026-09-23","2026-09-24","2026-09-25","2026-09-26","2026-09-27","2026-09-28","2026-09-29","2026-09-30","2026-10-01","2026-10-02","2026-10-03","2026-10-04","2026-10-05","2026-10-06","2026-10-07","2026-10-08","2026-10-09","2026-10-10","2026-10-11","2026-10-12","2026-10-13","2026-10-14","2026-10-15","2026-10-16","2026-10-17","2026-10-18","2026-10-19","2026-10-20","2026-10-21","2026-10-22","2026-10-23","2026-10-24","2026-10-25","2026-10-26","2026-10-27","2026-10-28","2026-10-29","2026-10-30","2026-10-31","2026-11-01","2026-11-02","2026-11-03","2026-11-04","2026-11-09","2026-11-10"],"stars":[49708,49729,49743,49759,49767,49775,49791,49824,49848,49863,49882,49887,49910,49923,49935,49953,49964,49972,50004,50229,50522,50757,50918,50935,50979,50995,51014,51029,51042,51050,51068,51079,51103,51104,51114,51127,51139,51149,51154,51157,51168,51180,51192,51205,51213,51222,51231,51252,51254,51257,51261,51314,51342,51374,51388,51409,51420,51436,51466,51475,51563,51575],"forks":[4714,4718,4726,4728,4729,4731,4734,4747,4753,4754,4755,4758,4763,4765,4751,4754,4754,4754,4758,4789,4811,4826,4837,4842,4850,4854,4854,4858,4859,4859,4865,4865,4867,4858,4863,4862,4862,4863,4866,4867,4868,4873,4875,4877,4881,4883,4883,4889,4879,4845,4844,4859,4869,4885,4890,4898,4897,4898,4906,4909,4931,4938],"watchers":[306,306,306,306,306,306,307,310,310,310,310,311,312,312,307,308,308,308,309,311,313,314,314,315,315,314,313,313,313,313,313,313,313,313,313,312,311,311,311,311,311,311,312,312,311,311,312,312,305,300,297,297,292,292,290,290,289,289,290,290,290,290],"issues_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"prs_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},"boards":{},"same_owner":[{"full_name":"roboflow/notebooks","name":"notebooks","boards":{}},{"full_name":"roboflow/rf-detr","name":"rf-detr","boards":{}}],"issues":[{"number":1594,"title":"Why does traffic analysis output differ from the video in readme file?","comments":24,"created_at":"2024-10-13T21:43:18Z"},{"number":2194,"title":"[Feature]: EU AI Act compliance checks for computer vision pipelines","comments":4,"created_at":"2026-03-31T04:30:14Z"},{"number":781,"title":"[InferenceSlicer] - allow batch size inference","comments":22,"created_at":"2024-01-25T21:09:02Z"},{"number":1449,"title":"PolygonZone: estimate how much of the zone is occupied","comments":20,"created_at":"2024-08-14T14:58:04Z"},{"number":54,"title":"To get the count of objects (in/out) in the polygon area, like we have it for line_zone using the supervision library for yolo-v8","comments":19,"created_at":"2023-03-29T09:53:33Z"},{"number":319,"title":"Adjust text to diagonal and vertical lines","comments":18,"created_at":"2023-08-24T18:34:47Z"},{"number":2318,"title":"[Feature]: Geometry-aware dispatch to stop the recurring \"silent AABB\" bug class","comments":6,"created_at":"2026-06-14T01:15:00Z"},{"number":1929,"title":"Reimplement video utils","comments":15,"created_at":"2025-08-04T20:42:35Z"}],"discussions":[{"number":2884,"title":"YOLOVAL: inspecting saved game detections with sv.Detections (paid ONNX models)","comments":0,"category":"Built with supervision","created_at":"2026-11-04T17:33:17Z"},{"number":2731,"title":"trackers/","comments":0,"category":"Docs","created_at":"2026-10-14T16:50:44Z"},{"number":2522,"title":"Made complex Supervision workflows inspectable!","comments":0,"category":"Show and tell","created_at":"2026-09-01T12:37:26Z"},{"number":2510,"title":"Recommended integration patterns for D-FINE and DEIMv2 (Edge DETRs)","comments":4,"category":"Q&A","created_at":"2026-08-24T17:47:03Z"},{"number":2376,"title":"why do `Recall` / `F1Score` use a different matching algorithm than `ConfusionMatrix`","comments":2,"category":"Q&A","created_at":"2026-06-30T00:51:51Z"},{"number":2327,"title":"supervision-0.29.0","comments":0,"category":"Announcements","created_at":"2026-06-15T21:45:26Z"},{"number":2301,"title":"mr","comments":1,"category":"Q&A","created_at":"2026-06-08T01:45:35Z"},{"number":2287,"title":"sample/example MP4","comments":1,"category":"Q&A","created_at":"2026-06-03T06:30:34Z"}],"latest_release":{"name":"supervision-0.31.5","tag":"0.31.5","published_at":"2026-11-05T18:35:25Z","body":"# v0.31.5: Line counts through occlusion, the exact clipper for oriented boxes, and right-to-left labels\r\n\r\nRight-to-left labels, line counting that survives occlusion, and a batch of edge-case fixes across annotators, exports and the NumPy fallback.\r\n\r\n- **LineZone** counts objects that are hidden for a few frames while they cross the line.\r\n- Arabic and Hebrew labels render correctly with the new `rtl` extra.\r\n- Oriented-box IoU, NMS and metrics now use the exact clipper on OpenCV installs.\r\n- Annotating a Pillow image keeps its transparency and untouched pixels.\r\n- Heat maps and ellipse halos now work on grayscale scenes.\r\n\r\nIt's a drop-in upgrade, but check the Migration guide if you count line crossings, score-oriented boxes on OpenCV, or compare stored outputs.\r\n\r\n## ✨ Spotlights / highlights\r\n\r\n### Right-to-left labels with the new `rtl` extra\r\n\r\n`sv.RichLabelAnnotator` now draws Arabic and Hebrew labels correctly on RGB and RGBA images when the new `rtl` extra is installed. Pillow only joins Arabic letters and orders right-to-left text when it's built with Raqm, and most Windows installs and many containers lack it. There, `\"سيارة 0.92\"` came out as isolated letters in reverse order. Lines with Arabic or Hebrew are now shaped in the label's font, using fallback Arabic and Hebrew fonts from `khatt` for missing glyphs, and right-aligned in the background box. Other image modes fall back to Pillow, with a warning that suggests RGB or RGBA when Raqm is missing. Without the extra, a one-time warning names it. (#2864)\r\n\r\n```python\r\n# pip install \"supervision[rtl]\"\r\nimport supervision as sv\r\n\r\nlabel_annotator = sv.RichLabelAnnotator(font_path=\"NotoNaskhArabic-Regular.ttf\")\r\nannotated = label_annotator.annotate(\r\n    scene=image, detections=detections, labels=[\"سيارة 0.92\"]\r\n)\r\n```\r\n\r\n### `LineZone` counts objects occluded while crossing\r\n\r\nIf a tracker disappears for a few frames while crossing the line, it's still counted. By default, `sv.LineZone` drops a tracker's stored side after `max(30, minimum_crossing_threshold + 1)` consecutive absent frames. It used to drop it after `max(2, minimum_crossing_threshold + 1)`, which is 2 at the default threshold. The new `max_absent_frames` parameter sets this. Counts can rise against 0.31.4 on the same input. (#2873)\r\n\r\n```python\r\nimport numpy as np\r\nimport supervision as sv\r\n\r\nline = sv.LineZone(start=sv.Point(0, 50), end=sv.Point(100, 50))\r\n\r\n\r\ndef detection(y):\r\n    return sv.Detections(\r\n        xyxy=np.array([[40.0, y - 10, 60.0, y]]), tracker_id=np.array([1])\r\n    )\r\n\r\n\r\nline.trigger(detection(40))  # above the line\r\nfor _ in range(5):  # occluded for five frames\r\n    line.trigger(sv.Detections.empty())\r\nline.trigger(detection(80))  # reappears below the line\r\nline.in_count, line.out_count\r\n# (0, 1)  (0.31.4: (0, 0))\r\n\r\n# Restore the old retention:\r\nsv.LineZone(start=sv.Point(0, 50), end=sv.Point(100, 50), max_absent_frames=2)\r\n```\r\n\r\n### The exact clipper for oriented boxes on OpenCV installs\r\n\r\n`sv.oriented_box_iou_batch`, OBB NMS and OBB metrics now use the same convex clipper on OpenCV installs that the NumPy fallback uses. With OpenCV, rotated boxes with nearly collinear overlapping edges, and boxes with both sides far below one coordinate unit, could get an IoU of 0 or 1. The clipper is roughly 10x slower per candidate pair than the OpenCV call, so crowded scenes can take seconds. Oriented-box precision, recall, F1, and mean average recall also keep corner precision at large coordinate origins. (#2882, #2887)\r\n\r\n```python\r\nimport numpy as np\r\nimport supervision as sv\r\n\r\n\r\ndef rotated(width, height, degrees, center=(200.0, 200.0)):\r\n    t = np.deg2rad(degrees)\r\n    u = np.array([np.cos(t), np.sin(t)]) * width / 2\r\n    v = np.array([-np.sin(t), np.cos(t)]) * height / 2\r\n    c = np.array(center)\r\n    return np.array([[c - u - v, c + u - v, c + u + v, c - u + v]])\r\n\r\n\r\nt = np.deg2rad(10)\r\na = rotated(100, 40, 10)\r\nb = a + np.array([np.cos(t), np.sin(t)]) * 50  # true IoU is 0"},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-10T09:35:25Z","history_start":"2026-09-06"}