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()
2
  • should draw11type be drawtype ? per the docs i dont see a keyword for draw11type, only drawtype Commented Dec 10, 2021 at 3:25
  • 1
    'box' is the default, so just don't pass drawtype to avoid the message Commented Dec 10, 2021 at 9:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.