Skip to content

docs(cookbooks): add depth maps cookbook - #2736

Merged
Borda merged 4 commits into
developfrom
docs/depth-maps-cookbook
Oct 16, 2026
Merged

Borda merged 4 commits into
developfrom
docs/depth-maps-cookbook

Conversation

@Borda

@Borda Borda commented Oct 15, 2026

Copy link
Copy Markdown
Member

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:

  • Added a card linking to the notebooks/depth-maps/ resource in docs/theme/cookbooks.html, with labels "DEPTH,ANNOTATORS,DETECTIONS" and version "v0.31.0".

  • 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

- 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>
@Borda
Borda requested a balanced review from Copilot October 15, 2026 16:17
@Borda Borda added the documentation Improvements or additions to documentation label Oct 15, 2026
@Borda
Borda requested a review from SkalskiP as a code owner October 15, 2026 16:17
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread docs/notebooks/depth-maps.ipynb
Comment thread docs/notebooks/depth-maps.ipynb Outdated
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94%. Comparing base (02ce5f8) to head (01bc4d8).
⚠️ Report is 7 commits behind head on develop.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Borda and others added 3 commits October 15, 2026 18:28
- 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>
@Borda
Borda merged commit a773f93 into develop Oct 16, 2026
39 checks passed
@Borda
Borda deleted the docs/depth-maps-cookbook branch October 16, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants