supervision icon indicating copy to clipboard operation
supervision copied to clipboard

feat-Added Default color

Open DivyaVijay1234 opened this issue 1 year ago β€’ 9 comments

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

DivyaVijay1234 avatar Oct 11 '24 11:10 DivyaVijay1234

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 11 '24 11:10 CLAassistant

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

github-actions[bot] avatar Oct 11 '24 11:10 github-actions[bot]

@DivyaVijay1234 please accept CLA and please check my review and after that we can move on thank you.

onuralpszr avatar Oct 11 '24 11:10 onuralpszr

@onuralpszr Which of those colours would you like me to use as the default colour?

DivyaVijay1234 avatar Oct 11 '24 11:10 DivyaVijay1234

@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

onuralpszr avatar Oct 11 '24 11:10 onuralpszr

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.

LinasKo avatar Oct 11 '24 13:10 LinasKo

@onuralpszr @LinasKo Thank you for guidance. Please confirm if I need to make any further changes or if the issue has now been solved.

DivyaVijay1234 avatar Oct 11 '24 14:10 DivyaVijay1234

@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 :)

onuralpszr avatar Oct 11 '24 14:10 onuralpszr

Please check if the changes I made are now visible. Thank you.

DivyaVijay1234 avatar Oct 11 '24 14:10 DivyaVijay1234

@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

onuralpszr avatar Oct 12 '24 16:10 onuralpszr

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 avatar Oct 12 '24 16:10 onuralpszr

@onuralpszr Thank you!

DivyaVijay1234 avatar Oct 12 '24 16:10 DivyaVijay1234

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

LinasKo avatar Oct 12 '24 18:10 LinasKo

@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 avatar Oct 12 '24 18:10 onuralpszr

@onuralpszr , that makes sense! I did not notice that. Thank you for the guidance and PR resolution!

LinasKo avatar Oct 13 '24 21:10 LinasKo

@onuralpszr , that makes sense! I did not notice that. Thank you for the guidance and PR resolution!

Pleasures πŸ™ ☺️

onuralpszr avatar Oct 13 '24 22:10 onuralpszr