Memory keeps increasing
Hi, during the inference of each model, the memory continuously increases with each image (only for single image inference). I have tried this on CPU as well as on GPU. Is there any way to solve this?
Give code to reproduce the error
def read_image(img_path):
img = cv2.imread(img_path)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
return img
detector = face_detection.build_detector("DSFDDetector", confidence_threshold=.5, nms_iou_threshold=.3)
image_paths = ['img1.jpg', 'img2.png', ...] # list of image paths
predictions = detector.detect(read_image(str(image_paths[0])))
predictions = detector.detect(read_image(str(image_paths[1])))
predictions = detector.detect(read_image(str(image_paths[2])))
My RAM keeps on increasing as I do inference for more and more images. RAM is not getting freed.
Hi, I don't have access to a GPU currently as I'm on vacation. Will be able to inspect the issue when I'm back. If anyone finds the issue, please submit a pull request and I should be able to review it.
I also have this issue. On GPU it works fine, CPU inference loads the memory