-
Notifications
You must be signed in to change notification settings - Fork 365
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
File "Object_detection_picamera.py", line 137, in <module> error #30
Comments
It looks like several people have been getting this error. I'm not sure why it happens to some people but not to others. It may be an issue with having different versions of the Picamera or numpy library. For now, it can be solved by adding the following code directly after line 136.
However, this is a fairly large computational step that will slightly decrease the FPS, so I'd prefer not to add it. Can anyone help me figure out the root cause of this "ValueError: cannot set WRITEABLE flag to True of this array"? Why is it occurring on some people's devices but not on others? |
For now, I have changed line 136 in Object_detection_picamera.py from
to
|
The proposed change worked. Thanks! To help understand the problem here is the version I am using: If you let me know which version you have used I can test with a different version to see if the problem goes away. |
This error might be permissions related. The error only occurs if i run the script under the regular user. If i run as root it works. |
will try later with sudo... |
The fix Evan (EdjeElectronics) implemented works, just re-download the Object_detection_picamera.py As for your question ... If you have monitor on the pi sudo should work if it complains about X11 connection rejected because of wrong authentication. Then you may need to issue and xhost + to allow root access to your users display. |
Tried root as suggested by adding sudo ... but still same error without the fix. As regular user using fix it works but as was noted framerate is around 0.6. |
works for me on rpi3b+, framerate is 1.1 - 1.4 fps, ave is 1.25. |
fps dropped to 0.8 - 1.0 when I increased the screen resolution to 1600 x 1080. |
Bro, you save my project, I love you!!!!!!! :DDDDDDD |
Bumping this for the Pi 4B, running as root still getting this ValueError. The np.copy() function takes up a fair chunk of real-time processing so I'd really like to set writable. I've tested all the way back from 1.13 to 1.06 and this issue is present for all versions that had PiRGBAnalysis. Looking into the other flags that are set it appears that the OWNMEMORY flag isn't set, not sure if this means that the frame data is in GPU memory or some onboard camera memory? Should I be using something other than PiRGBAnalysis for performing JIT edits? I'd assume something like a custom write format would have performed any copy to main memory at a lower level and would be faster than a np.copy()? |
The text was updated successfully, but these errors were encountered: