Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.

Commit cde4839

Browse files
authored
postprocessor.py: fix NumPy array issue when using latest opencv release (#179)
Signed-off-by: Longyin Hu <longyin.hu@intel.com>
1 parent dbd0d40 commit cde4839

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cnap/core/processors/postprocessor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def postprocess(self, frame: np.ndarray, outputs: dict) -> np.ndarray:
7474
Postprocess the output by drawing boxes and labels on the input frame for
7575
object detection.
7676
"""
77+
frame = frame.copy()
7778
try:
7879
if self._drawing.get('draw_boxes'):
7980
boxes = outputs['detection_boxes']
@@ -121,6 +122,7 @@ def postprocess(self, frame: np.ndarray, outputs: dict) -> np.ndarray:
121122
Postprocess the output by drawing boxes and labels on the input frame for
122123
object detection.
123124
"""
125+
frame = frame.copy()
124126
try:
125127
if self._drawing.get('draw_landmarks'):
126128
facial_landmarks = outputs['facial_landmarks']

0 commit comments

Comments
 (0)