BhumikaMak commited on
Commit
a4de2b4
·
verified ·
1 Parent(s): 00c75f1

debug: resolve no attribute 'renderer'

Browse files
Files changed (1) hide show
  1. yolov8.py +2 -2
yolov8.py CHANGED
@@ -205,8 +205,8 @@ def dff_nmf(image, target_lyr, n_components):
205
  # ax.add_patch(rect)
206
  # ax.text(x1, y1, f"Class {cls}, Prob {prob:.2f}", color='r', fontsize=12, verticalalignment='top')
207
 
208
- # plt.subplots_adjust(left=0, right=1, top=1, bottom=0)
209
- #fig.canvas.draw()
210
  image_array = np.array(fig.canvas.renderer.buffer_rgba())
211
  image_resized = cv2.resize(image_array, (640, 640))
212
  rgba_channels = cv2.split(image_resized)
 
205
  # ax.add_patch(rect)
206
  # ax.text(x1, y1, f"Class {cls}, Prob {prob:.2f}", color='r', fontsize=12, verticalalignment='top')
207
 
208
+ plt.subplots_adjust(left=0, right=1, top=1, bottom=0)
209
+ fig.canvas.draw()
210
  image_array = np.array(fig.canvas.renderer.buffer_rgba())
211
  image_resized = cv2.resize(image_array, (640, 640))
212
  rgba_channels = cv2.split(image_resized)