1adrianb / 1adrianb/face-alignment

Memory not cleansed on CPU

Aperta
#185 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
7.5k
Fork
1.4k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, pytorch
Ambito
performance
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.