1adrianb / 1adrianb/face-alignment

Memory not cleansed on CPU

Đang mở
#185 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
7.5k
Fork
1.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, pytorch
Lĩnh vực
performance
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.