Hi,
I use VPI1.1 in python on my nano with live images from the HQ IMX477 camera.
When I use a simple example with resampling the image, the used RAM rises until 100% and from 80% onwards its getting very slow.
Is this a memory leak from VPI or I am doing something wrong? I’m new to VPI.
BR Erich
IMX477_VPI_test.py (4.2 KB)
Hi,
Thanks for reporting this.
This is a known issue and our internal team is working on this:
Hello. When I use a simple example like this:
import os
os.environ['OPENBLAS_CORETYPE'] = 'ARMV8'
import cv2
import sys
import vpi
import numpy as np
import time
from argparse import ArgumentParser
import gc
backend = vpi.Backend.CUDA
print('1')
inVideo = cv2.VideoCapture(1)
inVideo.set(cv2.CAP_PROP_FRAME_WIDTH, 480)
inVideo.set(cv2.CAP_PROP_FRAME_HEIGHT, 640)
inVideo.set(cv2.CAP_PROP_FPS, 30)
if int(cv2.__version__.split('.')[0]) >= 3:
extOutputVideo = '.mp4'
fourcc = cv2.VideoWrit…
Will update more information with you once we got any feedback.
Thanks.
Great!
Hope for a fast fix because after appr. 5s I cannot use VPI anymore so its useless at the moment for live images.
BR Erich
Hi,
While our internal is working on the solution, there is a WAR in the below comment:
Hi,
Thanks for your patience.
Our internal team is working on this issue.
Currently, you can use vpi.clear_cache() as a temporal solution to make sure the buffer is released.
For example:
while True:
ret, cvFrame = inVideo.read()
...
with vpi.Backend.CUDA:
frame = vpi.asimage(cvFrame)
...
vpi.clear_cache()
Thanks.
Thanks.
Hi,
the vpi.clear_cache() helps!
Thanks for the fast workaround.
BR Erich