1adrianb / 1adrianb/face-alignment
Memory not cleansed on CPU
- Langage dominant
- Python
- Étoiles
- 7.5k
- Forks
- 1.4k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
The issue is a memory leak when using the CPU device. Start by examining the FaceAlignment class initialization and the get_landmarks_from_image method in the face_alignment module. Look for any unmanaged resources, caching, or state that accumulates on CPU but not on CUDA. Run a simple script that repeatedly calls get_landmarks_from_image on CPU and monitor memory usage with tools like memory_profiler. Check if the leak is in the underlying PyTorch operations or the face detection backend.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, pytorch
- Domaine
- performance
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100