Repository navigation
docs(cookbooks): add depth maps cookbook - #2736
Merged
Merged
Conversation
- Add depth-maps.ipynb: relative depth with Depth Anything V2 via sv.DepthMap.from_transformers, metric depth with YOLO26 via from_ultralytics, sv.DepthAnnotator colour maps and inverse vs metric scale, value_at, distance labels with measure_detections, sv.DepthCamera stereo disparity to metres, and a video coloured with one sv.DepthClipRange - Add the cookbook card to cookbooks.html --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The stereo example interprets disparity bounds as metre bounds, producing an incorrect advertised colour range.
2 open findings
What changed in this PR
Adds a cookbook demonstrating Supervision’s depth-map tools and makes it discoverable from the cookbook gallery.
Changes:
- Demonstrates relative and metric depth, annotations, detection measurements, stereo conversion, and consistent video colouring.
- Adds a gallery card tagged for depth, annotators, and detections.
| File | Description |
|---|---|
| docs/theme/cookbooks.html | Links to the new depth cookbook. |
| docs/notebooks/depth-maps.ipynb | Provides depth-processing examples and explanations. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2736 +/- ##
========================================
Coverage 94% 94%
========================================
Files 83 83
Lines 13127 13452 +325
========================================
+ Hits 12320 12635 +315
- Misses 807 817 +10 🚀 New features to boost your workflow:
|
- Save executed outputs of depth-maps.ipynb, including its 8 images - Narrow the metric colour range to display_range=(2.0, 10.0) and the nearby filter to depth_m < 5.0 to fit the scene's measured depths - Describe the sample image as a plaza seen from above --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
- Remove the plain sample image plot, keeping the printed image size - Replace the boxes-only nearby plot with a printed list of depths within 5 m, sorted nearest first - Re-run the notebook to save the updated outputs --- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Changes: - Update the depth map notebook to describe a box median as an estimate that may include valid background pixels. - Recommend segmentation masks when measurements must be restricted to the person. Impact: - Readers won't assume box-based measurements exclude surrounding background; the person-restricted measurement guidance is explicit. Verification: - Canonical source-bound pytest: 5,589 passed, 79 skipped, 39 warnings. - git diff --check and the pinned pretty-format-json hook passed. Residual limits: - (-0.10) Independent specialist review remains unavailable; the admitted review used a parent-substituted source wave. - (-0.00) Notebook examples were not re-executed cell-by-cell. --- Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This pull request adds a new entry to the Supervision Cookbooks documentation, making the "Depth Maps: See and Measure Distance" resource more discoverable for users.
Documentation update:
notebooks/depth-maps/resource indocs/theme/cookbooks.html, with labels "DEPTH,ANNOTATORS,DETECTIONS" and version "v0.31.0".