This change is an educated guess based on the following:
When the Object Detection Pipeline crashes, there is a kernel paging request error on the console and dmesg.
Restarting PV doesn't work because the camera reports that it is in use even though lsof and fuser show nothing. The camera LED stays on
StackOverflow (and similar) discussions of the dmesg error usually involve device drivers improperly accessing kernel memory
So, if the camera get hosed when we pass its buffer to the Rknn detection, maybe creating a copy first will avoid the issue. After making this change, I could not reproduce the issue using the same method that previously caused the crash.
I also ran detection over a couple hours and did not observe memory growth in the process.
This change is an educated guess based on the following:
So, if the camera get hosed when we pass its buffer to the Rknn detection, maybe creating a copy first will avoid the issue. After making this change, I could not reproduce the issue using the same method that previously caused the crash.
I also ran detection over a couple hours and did not observe memory growth in the process.
Way too much discussion and detail in this thread on Discord.