Skip to content

Commit 090ccfa

Browse files
committed
Bug fixed: mismatched channels.
1 parent e9ffcc9 commit 090ccfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

leads_jarvis/network/detection/prototype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from cv2 import rectangle as _rectangle, putText as _put_text, FONT_HERSHEY_COMPLEX_SMALL as _FONT
55
from numpy import ndarray as _ndarray
66

7-
from leads_jarvis.utils import to_opencv
7+
from leads_jarvis.utils import to_opencv, from_opencv
88

99

1010
class Detection(object, metaclass=_ABCMeta):
@@ -28,4 +28,4 @@ def mark(self, image: _ndarray, data: list[dict[str, _Any]] | None = None,
2828
x1, y1, x2, y2 = round(box["x1"]), round(box["y1"]), round(box["x2"]), round(box["y2"])
2929
image = _rectangle(image, (x1, y1), (x2, y2), (255, 255, 255))
3030
image = _put_text(image, name, (x1, y1 - 4), _FONT, 1, (255, 255, 255))
31-
return image
31+
return from_opencv(image)

0 commit comments

Comments
 (0)