Skip to content

Commit 10bbb06

Browse files
Add docstring
Signed-off-by: Ashwin Vaidya <[email protected]>
1 parent 2775720 commit 10bbb06

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

model_api/python/model_api/visualizer/primitive.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,20 @@ def compute(self, image: Image) -> Image:
2121

2222

2323
class BoundingBox(Primitive):
24-
"""Bounding box primitive."""
24+
"""Bounding box primitive.
25+
26+
Args:
27+
x1 (int): x-coordinate of the top-left corner of the bounding box.
28+
y1 (int): y-coordinate of the top-left corner of the bounding box.
29+
x2 (int): x-coordinate of the bottom-right corner of the bounding box.
30+
y2 (int): y-coordinate of the bottom-right corner of the bounding box.
31+
label (str | None): Label of the bounding box.
32+
color (str | tuple[int, int, int]): Color of the bounding box.
33+
34+
Example:
35+
>>> bounding_box = BoundingBox(x1=10, y1=10, x2=100, y2=100, label="Label Name")
36+
>>> bounding_box.compute(image)
37+
"""
2538

2639
def __init__(
2740
self,

0 commit comments

Comments
 (0)