Counting people via USB camera, using Jetson Nano, program interrupts

Hello! I started using Jetson Nano 2GB to count people via USB camera. I’m starting yolov5 custom model with python script using Python 3.6.9.
However, the system is working well and counting people only for several minutes, then I receive string “Terminated”, program interrupts and go back to shell input. dmesg output and system log does not show any problems.
I’m using 5v-4A charger, and cooling fan so I guess that overheating and current is not the problem.
Does anyone have ideas where to look for the problem?
Thanks in advance!

Share the code?

One thing I would wonder about is the “Out of Memory” killer (OOM killer). This triggers when physical RAM requests are too high. Note that the GPU’s use of memory for such operations demands actual physical RAM, and that virtual memory (swap) cannot be used for that. So it is a possibility it is just using too much RAM.

If you know the PID of your program, you can find the “oom_score” in “/proc/<pid>/oom_score”. For example:
egrep '[0-9]+' $(find /proc -maxdepth 2 -type f -name 'oom_score')
(the egrep is to echo the name of the PID file)

PID changes each time you start the app, so experimenting might require launching your program with a shell script which captures the PID and begins monitor of the oom_score. Or, you could simply monitor that PID with something like “ps” and watch the memory used. Simpler yet, run an application such as htop and see if the “Mem” starts increasing and approaches 100% before the application dies.

Then again, if it doesn’t say something about the OOM in dmesg, perhaps it is unrelated.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.