1adrianb / 1adrianb/face-alignment

CUDA error on getting landmarks

オープン
#300 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
7.5k
フォーク
1.4k
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello, I'm getting an error on getting facial landmarks

---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_21192/3125532886.py in
----> 1 get_facial_landmarks(sample_img, fa)

~\AppData\Local\Temp/ipykernel_21192/3797573127.py in get_facial_landmarks(image, fa)
4 returns 128 feature vector. 0 to 500
5 '''
----> 6 preds = fa.get_landmarks(image)
7
8 return preds

~\.conda\envs\sort-cv\lib\site-packages\face_alignment\api.py in get_landmarks(self, image_or_path, detected_faces, return_bboxes)
107 return_bboxes {boolean} -- If True, return the face bounding boxes in addition to the keypoints.
108 """
--> 109 return self.get_landmarks_from_image(image_or_path, detected_faces, return_bboxes)
110
111 @torch.no_grad()

~\.conda\envs\sort-cv\lib\site-packages\torch\autograd\grad_mode.py in decorate_context(*args, **kwargs)
26 def decorate_context(*args, **kwargs):
27 with self.__class__():
---> 28 return func(*args, **kwargs)
29 return cast(F, decorate_context)
30

~\.conda\envs\sort-cv\lib\site-packages\face_alignment\api.py in get_landmarks_from_image(self, image_or_path, detected_faces, return_bboxes)
166
167 heatmaps = heatmaps.to(self.device)
--> 168 depth_pred = self.depth_prediciton_net(
169 torch.cat((inp, heatmaps), 1)).data.cpu().view(68, 1)
170 pts_img = torch.cat(

~\.conda\envs\sort-cv\lib\site-packages\torch\nn\modules\module.py in _call_impl(self, *input, **kwargs)
1100 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1101 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1102 return forward_call(*input, **kwargs)
1103 # Do not call functions when jit is used
1104 full_backward_hooks, non_full_backward_hooks = [], []

RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
File "", line 3, in forward

def addmm(self: Tensor, mat1: Tensor, mat2: Tensor, beta: number = 1.0, alpha: number = 1.0):
return self + mat1.mm(mat2)
~~~~~~~ <--- HERE

def batch_norm(input : Tensor, running_mean : Optional[Tensor], running_var : Optional[Tensor], training : bool, momentum : float, eps : float) -> Tensor:
RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`

Face alignment version: 1.3.4
Python: 3.8.12

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

The error occurs in face_alignment/api.py during depth prediction network forward pass, specifically a CUDA memory allocation failure in cublasCreate. Check CUDA memory usage, ensure PyTorch/CUDA versions are compatible, and look at the device handling in the API. The issue is likely environment-specific, requiring debugging of GPU memory or driver issues.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, pytorch
領域
computer-vision, machine-learning
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。