Skip to content

Commit c3ed3df

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

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/model.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ def predict(self, image, request_id=0, show_bbox=False):
120120
self.exec_network.requests[request_id].outputs[output_name]
121121
)
122122
predict_end_time = float(time.time() - predict_start_time) * 1000
123-
bbox, _ = self.preprocess_output(
124-
pred_result, image, show_bbox=show_bbox
125-
)
123+
bbox, _ = self.preprocess_output(pred_result, image, show_bbox=show_bbox)
126124
return (predict_end_time, bbox)
127125

128126
@abstractmethod
@@ -337,8 +335,8 @@ def draw_output(coords, image):
337335
"""
338336
yaw, pitch, roll = coords.values()
339337

340-
pitch = pitch * np.pi / 180
341338
yaw = -(yaw * np.pi / 180)
339+
pitch = pitch * np.pi / 180
342340
roll = roll * np.pi / 180
343341

344342
height, width = image.shape[:2]
@@ -360,7 +358,7 @@ def draw_output(coords, image):
360358
# Y-Axis | drawn in green
361359
# v
362360
x2 = size * (-math.cos(yaw) * math.sin(roll)) + tdx
363-
y2 = (
361+
y2 = -(
364362
size
365363
* (
366364
math.cos(pitch) * math.cos(roll)

0 commit comments

Comments
 (0)