feat: 🚀 Add default color to PolygonZoneAnnotator, drawing functions#1591
feat: 🚀 Add default color to PolygonZoneAnnotator, drawing functions#1591onuralpszr merged 6 commits intoroboflow:developfrom
Conversation
PreviewPreview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com. If commits are added to the pull request, synchronize your local branch:git pull origin develop
|
supervision/draw/utils.py
Outdated
|
|
||
| def draw_line( | ||
| scene: np.ndarray, start: Point, end: Point, color: Color, thickness: int = 2 | ||
| scene: np.ndarray, start: Point, end: Point, color: Color=Color(163, 81, 251), thickness: int = 2 |
There was a problem hiding this comment.
Please use our color scheme in like "sv.Color.WHITE" for all them. You can find them in here
supervision/supervision/draw/color.py
Line 231 in 337b0e4
|
@DivyaVijay1234 please accept CLA and please check my review and after that we can move on thank you. |
|
@onuralpszr Which of those colours would you like me to use as the default colour? |
Change all of "your" changes to default color like "white" I wrote in comment |
|
Hi @DivyaVijay1234 👋 Thank you for the contribution!
The default color we prefer is |
|
@onuralpszr @LinasKo |
push code please :) |
|
Please check if the changes I made are now visible. Thank you. |
|
@DivyaVijay1234 I made some small documentation additions and also add white color to other annotator you missed with documentations, thank you for your contribution I am merging in this and close the issue as complete as well. cc @LinasKo |
|
I made some fixes on PR title and comment part to be more descriptive so that everyone else can understand what is going on in here as well. |
|
@onuralpszr Thank you! |
|
@onuralpszr , the documentation updates are helpful, but I'm confused why PolygonAnnotator got white as the default color. Does this also pick it for text boxes? Otherwise, the line should be roboflow-colored. |
The reason I used white because I wanted to follow LineZoneAnnotator also using white lines __init__(thickness=2, color=Color.WHITE, text_thickness=2, text_color=Color.BLACK, text_scale=0.5, text_offset=1.5, text_padding=10, custom_in_text=None, custom_out_text=None, display_in_count=True, display_out_count=True, display_text_box=True, text_orient_to_line=False, text_centered=True) |
|
@onuralpszr , that makes sense! I did not notice that. Thank you for the guidance and PR resolution! |
Pleasures 🙏 |
Description
Default Colors Added: Default colors were added to utility functions such as drawLine, drawRectangle, drawPolygon, and PolygonZoneAnnotator.
Documentation: Documentation was added to explain the changes and usage of the new default colors.
Fix: #1587
Type of change