-
Notifications
You must be signed in to change notification settings - Fork 40
Asynchronous Grab - FrameStatus Incomplete after about 10 hours of running #174
Comments
hello, |
The camera is the Alvium U-319c USB camera. I verified it was using USB 3. Regarding the hardware -
Some additional notes -
|
Have you modified the script otherwise? Are you using a lot of deep copies or similar? What kind of processing are you doing on the frames? Edit: Regarding the call function, that is where the processing should happen, because the frame object needs to be put back into the queue. You can do a deep copy of the frame and pass that onto a different thread/queue/process(?), but you need to make sure that the frame object from the queue is always returned to the queue. If you notice the RAM increasing a lot as well, it might be good to let the garbage collector run after a while (meaning the automated gc doesn't run often enough). Last but not least, consider using either C or C++ API, for less CPU load. |
I don't see a noticeable change in RAM usage. I don't believe there's a leak of some sort that's causing this problem. The fraemstatus changes to incomplete when the CPU usage goes beyond 100% (single-core). Just for some clarity - the major steps in the call function are as follows -
Regarding the number of frames in the queue - How can I determine how many I'll need in the buffer? At this time, I will need to perform frame capture at 20+ FPS. |
The number of frames in the buffer is a matter of trial and error and decided by how fast your program is working through the frames and if it is always processing them at the same speed. If the program is sometimes a bit slower in processing the images, then the queue is necessary to buffer the frames before processing. |
Thanks, I have posted a ticket on the website and shared the code and all the details discussed here. I'll update if I find a solution soon. I'm also attempting a run with a buffer of 60 frames. Will update here if I find a solution that works. |
Hello,
I'm trying to write a script based off the asynchronous_grab_opencv.py example. I'm having to process the captured images (some minor image processing plus a DL model inference if certain conditions are met in the image processing portion) in the call() function of the script
Now, after I run the code for some time (about 10-11 hours), I'm getting back incomplete frames (FrameStatus.Incomplete). Until then, the code works as predicted. I've also run some profiling with htop and I've discovered that the single core CPU usage keeps increasing over time until the breaking point, where it crosses 100% CPU usage.
Any suggestions on how to fix this / what I may be doing wrong?
The text was updated successfully, but these errors were encountered: