Skip to content

Conversation

RizwanMunawar
Copy link
Member

@RizwanMunawar RizwanMunawar commented Jan 28, 2024

Key Points

  • Update guides/index.md with a hyperlink to the object segmentation documentation page.
  • Add millimeters distance display in solutions/distance_calculation.py.
  • Refactor the plotting code for improved clarity in solutions/distance_calculation.py.
  • Include visuals in object-cropping.md.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancements to Ultralytics documentation and distance calculation functionality.

📊 Key Changes

  • Documentation Update: Links and visuals are added for better clarity.
    • Instance Segmentation guide now contains a hyperlink to the segmentation task page.
    • Object Cropping guide includes an example image to illustrate the feature.
  • Code Refactoring:
    • Distance calculation now also returns the value in millimeters (mm).
    • Plotting distance and line code migrated from distance_calculation.py to plotting.py.

🎯 Purpose & Impact

  • Improved Clarity: Documentation updates ensure users have better guidance and visual examples for using features. 📖
  • Enhanced Usability: Showing distance in both meters and millimeters in the updated code offers more detail and flexibility for different use cases. 📏
  • Better Structuring: Refactoring promotes separation of concerns, with the plotting logic now residing in a designated plotting utility file. This makes the codebase more maintainable and readable. 🔍

Copy link

sentry-io bot commented Jan 28, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: ultralytics/utils/plotting.py

Function Unhandled Issue
plot_images TypeError: polygon() got an unexpected keyword argument 'width' ultralytics.utils.plotti...
Event Count: 8
plot_images AttributeError: 'str' object has no attribute 'get' ultralytics.utils.plotting in plot_ima...
Event Count: 1
__call__ TypeError: int() argument must be a string, a bytes-like object or a number, not 'list' ...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

Copy link

codecov bot commented Jan 28, 2024

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (6183b59) 76.84% compared to head (5e9bb61) 76.83%.
Report is 1 commits behind head on main.

❗ Current head 5e9bb61 differs from pull request most recent head d2c1d11. Consider uploading reports for the commit d2c1d11 to get more accurate results

Files Patch % Lines
ultralytics/utils/plotting.py 10.00% 9 Missing ⚠️
ultralytics/solutions/distance_calculation.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7860      +/-   ##
==========================================
- Coverage   76.84%   76.83%   -0.02%     
==========================================
  Files         117      117              
  Lines       14442    14446       +4     
==========================================
+ Hits        11098    11099       +1     
- Misses       3344     3347       +3     
Flag Coverage Δ
Benchmarks 36.42% <7.69%> (-0.01%) ⬇️
GPU 39.35% <7.69%> (+<0.01%) ⬆️
Tests 71.85% <7.69%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RizwanMunawar this is good, but make sure that there is always a full space before Args and Results etc. and that each line is a complete sentence with Capital letter stat and at the end a period.
@glenn-jocher glenn-jocher merged commit 492f397 into ultralytics:main Jan 28, 2024
@glenn-jocher
Copy link
Member

@RizwanMunawar looks good! Just a bit of docstring cleanup I did in 5938639

Merged!

@RizwanMunawar RizwanMunawar deleted the solutions branch January 29, 2024 08:21
gkinman pushed a commit to Octasic/ultralytics that referenced this pull request May 30, 2024
…ing.md` visuals (ultralytics#7860)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
puzhiyuan pushed a commit to puzhiyuan/ultralytics that referenced this pull request Oct 18, 2024
…ing.md` visuals (ultralytics#7860)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants