Skip to content

Commit a2728fb

Browse files
committed
Updated src/model.py
Signed-off-by: Mpho Mphego <mpho112@gmail.com>
1 parent 948eecc commit a2728fb

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/model.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def preprocess_output(self, inference_results, image, show_bbox=False):
108108

109109
@staticmethod
110110
@abc.abstractmethod
111-
def draw_output(image, ):
111+
def draw_output(image,):
112112
pass
113113

114114
def add_text(self, text, frame, position, font_size=0.75, color=(255, 255, 255)):
@@ -150,13 +150,19 @@ def preprocess_output(self, inference_results, image, show_bbox=False):
150150
return coords, image
151151

152152
@staticmethod
153-
def draw_output(image, xmin, ymin, xmax, ymax):
154-
label = "Person's Face"
155-
bbox_color = (0, 255, 0)
156-
padding_size = (0.05, 0.25)
157-
text_color = (255, 255, 255)
158-
text_scale = 1.5
159-
text_thickness = 1
153+
def draw_output(
154+
image,
155+
xmin,
156+
ymin,
157+
xmax,
158+
ymax,
159+
label="Person's Face",
160+
bbox_color=(0, 255, 0),
161+
padding_size=(0.05, 0.25),
162+
text_color=(255, 255, 255),
163+
text_scale=2,
164+
text_thickness=2,
165+
):
160166

161167
cv2.rectangle(
162168
image, (xmin, ymin), (xmax, ymax,), color=bbox_color, thickness=2,

0 commit comments

Comments
 (0)