supervision
supervision copied to clipboard
feat-Added Default color
Description
A default colour has been added to the figure drawn
Type of change
Please delete options that are not relevant.
- New feature (non-breaking change which adds functionality)
How has this change been tested, please provide a testcase or example of how you tested the change?
scene = draw_line(scene, start=start_point, end=end_point) # Uses default color The draw_line function is called in the above manner without the user specifying a color. The default color is used to display the line. The other draw functions can be called similarly
Preview
Preview 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
@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?
@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!
Which of those colours would you like me to use as the default colour?
The default color we prefer is Color.ROBOFLOW. I see you set the values for it, but that's in fact not necessary. You can simply replace Color(r, g, b) with Color.ROBOFLOW.
@onuralpszr @LinasKo Thank you for guidance. Please confirm if I need to make any further changes or if the issue has now been solved.
@onuralpszr @LinasKo Thank you for guidance. Please confirm if I need to make any further changes or if the issue has now been solved.
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.
@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
https://supervision.roboflow.com/latest/detection/tools/line_zone/#supervision.detection.line_zone.LineZoneAnnotator-functions
__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!
@onuralpszr , that makes sense! I did not notice that. Thank you for the guidance and PR resolution!
Pleasures π βΊοΈ