NVIDIA / NVIDIA/DALI

Question about video loading speed in two different pipelines

Open
#4,624 3 comments 0 reactions 1 assignee View on GitHub

@mzient is already working on this.

Since Jan 31, 2023.

help wanted Video
Dominant language
C++
Stars
5.8k
Forks
678
Avg merge
3d 1h
Merged PRs (30d)
27

Description

Hi @JanuszL and the team, hope you're doing well (CC'd @themattinthehatt)

We are using two different video reading pipelines in our lightning-pose repository.

  1. The first scans a video and has sequence_length=64 and step=64 -- and is working very fast.

  2. The second was tailored to our temporal context network, which takes in five video frames at a time and predicts just the third (middle) frame. it uses sequence_length=5, step=1 and batch_size=16.

Both are running on device="gpu". Changing the num_threads=4 argument doesn't make any difference, we do not see any meaningful cpu utilization with or without it (why? not sure, see top -i). Pipeline 1 does use 6%-8% GPU, Pipeline 2 uses approximately 0% GPU (as seen in watch -n 0.5 nvidia-smi.

I prepared a notebook and demo video for you. To reproduce

Installation

git clone https://github.com/danbider/lightning-pose.git
cd lightning-pose
python -m pip install -r requirements.txt
git checkout loss-landscapes

The reproducible notebook is here.

Question -- should CPU usage be low in general? Why is GPU usage low for pipeline 2? How could I accelerate it?

Your help is appreciated, as always

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.