face-alignment
face-alignment copied to clipboard
Memory not cleansed on CPU
When I use
face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, device='cuda')
or
face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, face_detector='dlib')
everything's fine.
However, when I use
face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, device='cpu')
some garbage accumulates in memory and with every use the process that runs get_landmarks_from_image
starts consuming more and more memory.
you can put detector in separate file and run as python detector.py input.jpg output.npy garbage collector will do the job to free memory notice it would require additional file write/read, but no other solution seems to be easy