1adrianb / 1adrianb/face-alignment

CPU Bottleneck caused by python ? 10% cuda usage

Offen
#199 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
7.5k
Forks
1.4k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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 ?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, pytorch
Bereich
performance
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.