You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add image = np.copy(image) after the infringing line
Longer story:
I am running the nanoowl using Jetson Containers. In Nov 2024 the nanoowl dustynv/nanoowl:r36.4.0 container has OpenCV 4.10.0 and numpy 1.26.4
In OpenCV 4.9 release, functions that change the output image are observing the readonly flag from numpy arrays: opencv/opencv-python#859 As a result, if the array is readonly, this error will surface: opencv/opencv#24522 .
Tl;Dr:
OpenCV obey the readonly tag in Numpy. As a result, this line:
nanoowl/nanoowl/owl_drawing.py
Line 39 in cfef75a
Workaround:
Add
image = np.copy(image)
after the infringing lineLonger story:
I am running the nanoowl using Jetson Containers. In Nov 2024 the nanoowl dustynv/nanoowl:r36.4.0 container has OpenCV 4.10.0 and numpy 1.26.4
In OpenCV 4.9 release, functions that change the output image are observing the readonly flag from numpy arrays: opencv/opencv-python#859 As a result, if the array is readonly, this error will surface: opencv/opencv#24522 .
Numpy version is important because there is a
copy
parameter toasarray
but only in ver 2+ https://numpy.org/doc/stable/reference/generated/numpy.asarray.htmlQuestion:
To make a more "permanent" fix:
image = np.asarray(image).copy()
or other suggested method to return a r/w arrayThe text was updated successfully, but these errors were encountered: