Memory issues

So we had done the detection for images and videos it works.But when we use it for real time the memory gets full,even we have swap The memory as u can see in the image below,as soon it’s full ,we get the error as process killed.
Kindly Advise.
Thank you.