0

I want to create a JSON file to use for training my machine learning model to create boundary boxes and it appears to be out of date. This is the error I am getting:

The 'drawtype' parameter of __init__() was deprecated in Matplotlib 3.5 and will be removed two minor releases later. If any parameter follows 'drawtype', they should be passed as keyword, not positionally.
  spancoords='pixels', interactive=True

This is the block of code that I assume is failing:

for file_name in file_names:
if file_name[0] != '.':
    name_class, sep, tail = file_name.partition('_')
    dir_file = image_folder + '/' + file_name

    fig, ax = plt.subplots(1)
    image = cv2.imread(dir_file)
    image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
    ax.imshow(image)

    toggle_selector.RS = RectangleSelector(
        ax, line_select_callback,
        draw11type='box', useblit=True,
        button=[1], minspanx=5, minspany=5,
        spancoords='pixels', interactive=True
    )

    bbox = plt.connect('key_press_event', toggle_selector)
    key = plt.connect('key_press_event', onkeypress)
    plt.show()
vvvvv
  • 25,404
  • 19
  • 49
  • 81

0 Answers0