{"full_name":"roboflow/supervision","owner":"roboflow","name":"supervision","shard":"1","url":"https://github.com/roboflow/supervision","description":"We write your reusable computer vision tools. 💜","homepage":"https://supervision.roboflow.com","topics":["computer-vision","image-processing","python","yolo","instance-segmentation","object-detection","tracking","video-processing","coco","pascal-voc","deep-learning","metrics","machine-learning","pytorch","tensorflow"],"tag_pages":["computer-vision","deep-learning","image-processing","instance-segmentation","machine-learning","metrics","object-detection","python","pytorch","tensorflow","tracking","video-processing","yolo"],"language":"Python","license":"MIT","avatar":"https://avatars.githubusercontent.com/u/53104118?v=4","created_at":"2022-11-28T14:08:44Z","pushed_at":"2026-11-13T23:13:03Z","metrics":{"stars":51633,"forks":4958,"watchers":289,"issues":595,"prs":2092,"releases":57,"issues_open":46,"issues_closed":549,"prs_open":56,"prs_closed":271,"prs_merged":1765,"discussions":272},"growth":{"day":{"stars":8,"forks":4,"base_day":"2026-11-15"},"week":{"stars":70,"forks":27,"base_day":"2026-11-09"},"month":{"stars":453,"forks":85,"base_day":"2026-10-17"}},"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","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"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,51592,51598,51602,51610,51625,51633],"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,4946,4950,4953,4953,4954,4958],"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,290,290,290,289,289,289],"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,41,41,42,46,46,46],"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,45,37,45,50,52,56]},"boards":{},"same_owner":[{"full_name":"roboflow/notebooks","name":"notebooks","shard":"1","boards":{}},{"full_name":"roboflow/rf-detr","name":"rf-detr","shard":"1","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.7","tag":"0.31.7","published_at":"2026-11-11T18:57:37Z","body":"# v0.31.7: pycocotools-matching mAP, stricter key point and CSV inputs, and edge-case fixes for zones and dataset exports\r\n\r\nA fixes-only patch: mAP now matches pycocotools more closely, and several zone, key point and export edge cases stop failing.\r\n\r\n- **MeanAveragePrecision** uses pycocotools size buckets and the COCO crowd IoU for oriented-box crowd targets.\r\n- **PolygonZone** keeps its full mask when polygon coordinates reach their integer limit.\r\n- Key point selection and **CSVSink** now raise on inputs they used to silently misread.\r\n- **DetectionDataset** exports keep box area for empty COCO masks and, with simplification on, bridge more mask holes.\r\n- The OpenCV-free `contourArea` and `convertScaleAbs` fallbacks agree with OpenCV in more cases.\r\n\r\nDrop-in upgrade, but check the Migration guide if you compare mAP values, pass extra CSV fields or select key points with boolean masks.\r\n\r\n## ✨ Spotlights / highlights\r\n\r\n### `MeanAveragePrecision` matches `pycocotools` more closely\r\n\r\n`sv.metrics.MeanAveragePrecision` now puts objects in the small, medium and large buckets that `pycocotools` gives them: a prediction's own geometry (box, mask or oriented-box polygon) decides, and its `data[\"area\"]` is ignored. Target `data[\"area\"]` is read as float64, so an area such as `9216.0004` is no longer scored as both medium and large. With `MetricTarget.ORIENTED_BOUNDING_BOXES`, targets with `data[\"iscrowd\"]` set use the COCO crowd IoU, so a prediction inside a crowd region is ignored instead of counted as a false positive. (#2939, #2941)\r\n\r\n```python\r\nimport numpy as np\r\nimport supervision as sv\r\nfrom supervision.metrics import MeanAveragePrecision, MetricTarget\r\n\r\n# A small target with a perfect prediction, plus a higher-scored medium false positive\r\n# whose area metadata claims it is small.\r\nmasks = np.zeros((2, 128, 128), dtype=bool)\r\nmasks[0, 0:20, 0:20] = True\r\nmasks[1, 60:100, 60:100] = True\r\npredictions = sv.Detections(\r\n    xyxy=np.array([[0, 0, 20, 20], [60, 60, 100, 100]], dtype=float),\r\n    mask=masks,\r\n    class_id=np.array([0, 0]),\r\n    confidence=np.array([0.5, 0.9]),\r\n    data={\"area\": np.array([400.0, 300.0])},\r\n)\r\ntargets = sv.Detections(\r\n    xyxy=np.array([[0, 0, 20, 20]], dtype=float),\r\n    mask=masks[:1],\r\n    class_id=np.array([0]),\r\n)\r\nresult = (\r\n    MeanAveragePrecision(metric_target=MetricTarget.MASKS)\r\n    .update(predictions, targets)\r\n    .compute()\r\n)\r\nresult.small_objects.map50_95  # 1.0: the medium false positive no longer counts as small\r\n```\r\n\r\n### Misread inputs raise, and scalar key point indexing works\r\n\r\n`sv.CSVSink` raises `ValueError` when additional data uses a built-in column name such as `confidence` or `x_min`, instead of writing a duplicate column that shadows the detection value. `sv.KeyPoints` selection rejects a nonempty one-dimensional boolean mask whose length does not match the number of skeletons or keypoints, instead of silently selecting a subset, and a zero-dimensional NumPy integer row index combined with a keypoint list or mask now works. (#2934, #2943, #2930)\r\n\r\n```python\r\nimport numpy as np\r\nimport supervision as sv\r\n\r\ndetections = sv.Detections(\r\n    xyxy=np.array([[0.0, 0.0, 10.0, 10.0]]), confidence=np.array([0.9])\r\n)\r\nwith sv.CSVSink(\"detections.csv\") as sink:\r\n    sink.append(\r\n        detections, {\"confidence\": 0.1}\r\n    )  # ValueError: Additional data uses reserved CSV column names confidence.\r\n```\r\n\r\n### `PolygonZone` survives integer coordinate limits\r\n\r\n`sv.PolygonZone` computes its mask bounds as Python integers, so a polygon whose coordinates reach their dtype limit, for example `uint8` 255, keeps its full mask instead of overflowing, raising an error or silently creating a smaller zone. (#2945)\r\n\r\n```python\r\nimport numpy as np\r\nimport supervision as sv\r\n\r\npolygon = np.array([[0, 0], [255, 0], [255, 3], [0, 3]], dtype=np.uint8)\r\nsv.PolygonZone(polygon).mask.shape  # (5, 257)\r\n```\r\n\r\n### The OpenCV-free fallbacks agree with OpenCV in more cases\r\n\r\nThe `contour","is_prerelease":false},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}