8000 GitHub - ville-k/gradient-mechanics: Gradient Mechanics provides utilities for GPU accelerated loading and preprocessing of images and videos. It combines NVIDIA's NVImageCodec, PyNvVideoCodec and CV-CUDA libraries so that decoding and transforms happen directly on the GPU.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Gradient Mechanics provides utilities for GPU accelerated loading and preprocessing of images and videos. It combines NVIDIA's NVImageCodec, PyNvVideoCodec and CV-CUDA libraries so that decoding and transforms happen directly on the GPU.

License

Notifications You must be signed in to change notification settings

ville-k/gradient-mechanics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradient Mechanics

Gradient Mechanics provides utilities for GPU accelerated loading and preprocessing of images and videos. It combines NVIDIA's NVImageCodec, PyNvVideoCodec and CV-CUDA libraries so that decoding and transforms happen directly on the GPU. See the documentation in the docs/ directory for more details on how the project is structured and how to get started.

Quickstart

Create and sync the development environment using uv:

uv venv
source .venv/bin/activate
uv sync

Run the tests to make sure everything is set up correctly:

pytest

Benchmarks

HuggingFace Image Dataset

uv run python src/tests/benchmark_huggingface_images.py

Video Dataset

uv run python src/tests/benchmark_video_dataset.py data/humming_bird_1s.mp4

Transcoding

Keyframes Only

ffmpeg -i data/humming_bird_1s.mp4 -c:v libx264 -x264-params keyint=1:scenecut=0 -crf 18 data/humming_bird_1s_keyframes_only.mp4

Inspect Encoding

ffprobe -loglevel error -select_streams v:0 -show_entries frame=pict_type -of default=noprint_wrappers=1 data/humming_bird_1s_keyframes_only.mp4

Terminology:

  • I-frame is a key frame. Decoding a keyframe is not dependent on other frames.
  • P-frame is a predicted frame. It is dependent on an preceding frame.
  • B-frame is a bi-directional predicted frame. It depends on a preceding and a succeeding frame.

About

Gradient Mechanics provides utilities for GPU accelerated loading and preprocessing of images and videos. It combines NVIDIA's NVImageCodec, PyNvVideoCodec and CV-CUDA libraries so that decoding and transforms happen directly on the GPU.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0