We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56e42e7 commit 29e1650Copy full SHA for 29e1650
mmdet/core/visualization/image.py
@@ -1,4 +1,6 @@
1
# Copyright (c) OpenMMLab. All rights reserved.
2
+import sys
3
+
4
import cv2
5
import matplotlib.pyplot as plt
6
import mmcv
@@ -350,6 +352,8 @@ def imshow_det_bboxes(img,
350
352
351
353
stream, _ = canvas.print_to_buffer()
354
buffer = np.frombuffer(stream, dtype='uint8')
355
+ if sys.platform == 'darwin':
356
+ width, height = canvas.get_width_height(physical=True)
357
img_rgba = buffer.reshape(height, width, 4)
358
rgb, alpha = np.split(img_rgba, [3], axis=2)
359
img = rgb.astype('uint8')
0 commit comments