1adrianb / 1adrianb/face-alignment

CPU Bottleneck caused by python ? 10% cuda usage

未关闭
#199 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
7.5k
派生
1.4k
PR 合并指标
30 天内没有已合并 PR

描述

Hello,

I'm using face-alignement in [first-order-model](https://github.com/AliaksandrSiarohin/first-order-model) repo, especially the [crop-video.py](https://github.com/AliaksandrSiarohin/first-order-model/blob/master/crop-video.py) script.

While working on a 1080p video with CUDA, i get this performance :

>32it [00:08, **4.43it/s**]

CPU is used a 54%, CUDA @ 10%
![](https://i.imgur.com/xql0dWL.png)

When using CPU mode it's 4 times slower (no surprise here, it seems that CUDA mode is enabled correctly)

>48it [00:44, **1.13it/s**]

Is it a bug from the task manager that doesn't report the correct GPU usage ? Or is it related to python's terrible performances ?

贡献指南

这个仓库没有索引到贡献指南

调研方向

The issue mentions crop-video.py script from first-order-model repo using this library. Start by profiling the script to identify CPU bottlenecks, possibly in data loading or preprocessing. Check CUDA utilization with nvidia-smi and PyTorch profiling tools. Look at the face-alignment library's inference code for potential inefficiencies in GPU-CPU data transfers.

由索引模型根据 Issue 内容生成。

评估

技术栈
python, pytorch
领域
performance
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。