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

[bug] numpy 2.0.0 breaks ImgFrame #1041

Open
bherbruck opened this issue Jun 21, 2024 · 2 comments
Open

[bug] numpy 2.0.0 breaks ImgFrame #1041

bherbruck opened this issue Jun 21, 2024 · 2 comments

Comments

@bherbruck
Copy link
Contributor

bherbruck commented Jun 21, 2024

The latest version of numpy (v2.0.0) seems to break dai.ImgFrame. It is auto-installed when installing the depthai package.

Specifically, it causes frames to be a single grayscale color.

I recommend hard-coding the version into the build-tools or updating the library to work with it, could be an opencv thing.
This could break all past versions that don't have a pinned version of numpy (or maybe opencv) in requirements.txt.
I had this issue on opencv-python==4.10.0.84 and every depthai>=2.0.0.0.

A workaround is to do this in your requirements.txt

numpy<2.0.0  # this is necessary to ensure proper functionality
opencv-python==<any-version>
depthai==<any-version>
@moratom
Copy link
Collaborator

moratom commented Jun 21, 2024

@bherbruck thanks for the report!

We've updated the requirements on main and are working on a release with support for the new numpy.

Unfortunately we didn't have this as requirement on previous versions, we'll do our best to put a warning in our documentation for the older versions.
CC: @jakaskerl

@moratom
Copy link
Collaborator

moratom commented Jun 21, 2024

Linking the PR as well #1039

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

2 participants