jozee commited on
Commit
5408e4b
·
verified ·
1 Parent(s): 9e53fde

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -74,7 +74,7 @@ def show_mask_on_image(raw_image, mask, return_image=False):
74
  fig = plt.gcf()
75
  fig.canvas.draw()
76
  # Convert plot to image
77
- img = np.frombuffer(fig.canvas.tostring_rgb(), dtype=np.uint8)
78
  img = img.reshape(fig.canvas.get_width_height()[::-1] + (3,))
79
  img = Image.fromarray(img)
80
  plt.close(fig)
 
74
  fig = plt.gcf()
75
  fig.canvas.draw()
76
  # Convert plot to image
77
+ img = np.frombuffer(fig.canvas.tostring_argb(), dtype=np.uint8)
78
  img = img.reshape(fig.canvas.get_width_height()[::-1] + (3,))
79
  img = Image.fromarray(img)
80
  plt.close(fig)