Open ibmua opened 4 years ago
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
When I use
face_alignment.FaceAlignment(face_alignment.LandmarksType._3D, device='cuda')
orface_alignment.FaceAlignment(face_alignment.LandmarksType._3D, face_detector='dlib')
everything's fine. However, when I useface_alignment.FaceAlignment(face_alignment.LandmarksType._3D, device='cpu')
some garbage accumulates in memory and with every use the process that runsget_landmarks_from_image
starts consuming more and more memory.