Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while saving the image #262

Open
poleteduenas0 opened this issue Feb 24, 2025 · 0 comments
Open

Error while saving the image #262

poleteduenas0 opened this issue Feb 24, 2025 · 0 comments

Comments

@poleteduenas0
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant