Skip to content

Commit

Permalink
bgr2rgb after mmcv.color_val
Browse files Browse the repository at this point in the history
  • Loading branch information
Indigo6 committed Aug 4, 2023
1 parent 6149d5a commit 725c1a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mmpose/visualization/opencv_backend_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def draw_circles(self,
**kwargs)
elif self.backend == 'opencv':
if isinstance(face_colors, str):
face_colors = mmcv.color_val(face_colors)
face_colors = mmcv.color_val(face_colors)[::-1]

if alpha == 1.0:
self._image = cv2.circle(self._image,
Expand Down Expand Up @@ -247,7 +247,7 @@ def draw_texts(
if bboxes is not None:
bbox_color = bboxes[0]['facecolor']
if isinstance(bbox_color, str):
bbox_color = mmcv.color_val(bbox_color)
bbox_color = mmcv.color_val(bbox_color)[::-1]

y = y - text_baseline // 2
self._image = cv2.rectangle(
Expand Down Expand Up @@ -359,7 +359,7 @@ def draw_lines(self,

elif self.backend == 'opencv':
if isinstance(colors, str):
colors = mmcv.color_val(colors)
colors = mmcv.color_val(colors)[::-1]
self._image = cv2.line(
self._image, (x_datas[0], y_datas[0]),
(x_datas[1], y_datas[1]),
Expand Down

0 comments on commit 725c1a1

Please sign in to comment.