"Out of Memory" prompt when detecting in real time

i have 3.3G available and i’m detecting in real time, i keep getting a “Low memory” warning after detecting for about 20 minutes. What could the issue be?
I have confirmed that it runs on the gpu.
I have a jetson orin nano.

PS: I intend to detect in real time for hours.

Which JetPack SW?
Any log?
You may need to provide more details of how you’re detecting in real time on GPU, then we can have some suggestions.

import ultralytics
from ultralytics import YOLO

model = YOLO("yolov8n.pt")

Dependencies:
* torch==2.1.0a0+41361538.nv23.6
* ultralytics==8.2.38

Now, the code works perfectly well, it makes detection in real time but afyer about 20 minutes of real time detection, i get a "Low memory" prompt

After raising a discussion on the official ultralytics repo,i was asked to export to this format(.engine), although when i do so with the code below:


model.export(format = "engine", workspace = 2, int8 = True)

Error Message after running this:
[06/26/2024-12:24:43] [TRT] [W] Tactic Device request: 150MB Available: 149MB. Device memory is insufficient to use tactic.
[06/26/2024-12:24:43] [TRT] [W] Skipping tactic 2 due to insufficient memory on requested size of 150 detected for tactic 0x000000000000001e.

Thank You.`Preformatted text`

Jetpack version is 5.1.3

Forgot to add this earlier

Hi,

Could you run the tegrastats concurrently and check the memory usage?
If the memory keeps going up during the detection, the app might have some memory leakage.

In such a case, please double-check the implementation.
Maybe you can try valgrind to help you catch the leakage.

Thanks.

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