Add custom text for the in & out tags - #44
Conversation
| text_scale: float = 0.5, | ||
| text_offset: float = 1.5, | ||
| text_padding: int = 10, | ||
| custom_in_text: str = '', |
There was a problem hiding this comment.
Could we make those arguments Optional[str] = None?
There was a problem hiding this comment.
Sure! It's great to learn that python allows this type of value 馃. Today I learned something new about python
|
|
||
| in_text = f"in: {line_counter.in_count}" | ||
| out_text = f"out: {line_counter.out_count}" | ||
| in_text = f"in: {line_counter.in_count}" if len(self.custom_in_text) == 0 else f"{self.custom_in_text}: {line_counter.in_count}" |
There was a problem hiding this comment.
Then here we would have if self.custom_in_text is not None. Same for other text.
There was a problem hiding this comment.
I like the idea. I left two comments. ;)
There was a problem hiding this comment.
Thanks, I applied your comments, lmk if you see something that can be improved too. 馃憢馃徑
540c314 to
7dfdd2f
Compare
| from supervision.detection.core import Detections | ||
| from supervision.draw.color import Color | ||
| from supervision.geometry.core import Point, Rect, Vector | ||
| from dataclasses import dataclass |
There was a problem hiding this comment.
I'd drop dataclass here. But add Optional to from typing import Dict
|
Hi @iPoe 馃憢馃徎! I just left one more comment. All in all:
|
7dfdd2f to
a8c335d
Compare
|
Changes added @SkalskiP! 馃憣 |
|
@SkalskiP I'm gonna search why the build is failing with my coworkers, I'll let you know if I find something |
|
@iPoe I am going on a short vacation - I will return on Tuesday. If you can't find anything by then, I will try to help you when I return. |
630a777 to
dea8761
Compare
|
@SkalskiP Just needed to update this branch with your |
dea8761 to
ac61598
Compare
|
Hey @SkalskiP I just rebased with main but the jobs failed so I'm gonna hold the merge for the moment and try to find out why is not building successfully 馃. Regards, |
|
Merged :) It will be released along with version |
|
Hi @FoxieK 馃憢馃徎, unfortunately, not yet. But I'd love to add this feature in upcoming releases. Would you be interested in contributing? |
|
Hello @SkalskiP, i'd love to! But for time being i'm focusing on my project and writing my thesis which both have a deadline馃槗. After that why not, let's keep in touch. Have a good day! |

Description
This PR adds 2 new parameters for the class
LineZoneAnnotatorin order to add a custom label instead of only using in/out labels. This idea occurred to us on a project where we needed to show the real time obj detection with a context of what in & out means for example: in means numbers of runs completed for a machine.Type of change