Skip to content

Error while saving the image #262

@poleteduenas0

Description

@poleteduenas0

Hi. The problem is while using segpredict.py. When running, after saving some errors i encounter the following one:

in plot_to_result
img_array = np.frombuffer(buf, dtype=np.uint8).reshape(rows, cols, 3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot reshape array of size 5308416 into shape (864,1536,3)

it does not matter what image do I select.

i have also changed a function on prompt.py, due to the following error:

AttributeError: 'FigureCanvasTkAgg' object has no attribute 'tostring_rgb'. Did you mean: 'tostring_argb'

Any thoughts on this one? additional info:

windows 11
python 3.11
Using CPU (problems with cuda version, as I have 12.7)

The inference is done correctly but the image cannot be saved:

576x1024 8 objects, 1138.6ms
Speed: 5.2ms preprocess, 1138.6ms inference, 16.4ms postprocess per image at shape (1, 3, 1024, 1024)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions