Skip to content

Commit

Permalink
postprocessor.py: fix NumPy array issue when using latest opencv release
Browse files Browse the repository at this point in the history
Signed-off-by: Longyin Hu <[email protected]>
  • Loading branch information
Hulongyin committed Jan 12, 2024
1 parent b0f2657 commit 59f993e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cnap/core/processors/postprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def postprocess(self, frame: np.ndarray, outputs: dict) -> np.ndarray:
Postprocess the output by drawing boxes and labels on the input frame for
object detection.
"""
frame = frame.copy()
try:
if self._drawing.get('draw_boxes'):
boxes = outputs['detection_boxes']
Expand Down Expand Up @@ -121,6 +122,7 @@ def postprocess(self, frame: np.ndarray, outputs: dict) -> np.ndarray:
Postprocess the output by drawing boxes and labels on the input frame for
object detection.
"""
frame = frame.copy()
try:
if self._drawing.get('draw_landmarks'):
facial_landmarks = outputs['facial_landmarks']
Expand Down

0 comments on commit 59f993e

Please sign in to comment.