jozee commited on
Commit
82f8cf0
·
verified ·
1 Parent(s): 9e38775

Update app.py

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