HW accelerated video reading for ML Inference (CUDA version).
Project description
CeLux
CeLux is a high-performance Python library for video processing, leveraging the power of FFmpeg. It delivers some of the fastest decode times for full HD videos globally, enabling efficient and seamless video decoding directly into PyTorch tensors.
The name CeLux is derived from the Latin words celer (speed) and lux (light), reflecting its commitment to speed and efficiency.
📚 Documentation
🚀 Features
- ⚡ Ultra-Fast Video Decoding: Achieve lightning-fast decode times for full HD videos using hardware acceleration.
- 🔗 Direct Decoding to Tensors: Decode video frames directly into PyTorch tensors for immediate processing.
- 🖥️ Hardware Acceleration Support: Utilize CUDA for GPU-accelerated decoding, significantly improving performance.
- 🔄 Easy Integration: Seamlessly integrates with existing Python workflows, making it easy to incorporate into your projects.
⚡ Quick Start
pip install celux # cpu only version
pip install celux-cuda # cuda+cpu
from celux import VideoReader, Scale
#import celux as cx
filters = [Scale(width = 1920, height = 1080)]
reader = VideoReader("/path/to/video.ext",
#num_threads: int = os.cpu_count(),
device = "cuda",
filters = filters
)
for frame in reader:
# do something
📊 Benchmark Summary
| Library | Device | Frames per Second (FPS) |
|---|---|---|
| Celux | CPU | 1520.75 |
| Celux | CUDA | 1710.85 |
| PyAV | CPU | 350.58 |
| OpenCV | CPU | 454.44 |
For more details, see Benchmarks.
📄 License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
🙏 Acknowledgments
- FFmpeg: The backbone of video processing in CeLux.
- PyTorch: For tensor operations and CUDA support.
- Vcpkg: Simplifies cross-platform dependency management.
- @NevermindNilas: For assistance with testing, API suggestions, and more.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file celux_cuda-0.5.1.1-py3-none-any.whl.
File metadata
- Download URL: celux_cuda-0.5.1.1-py3-none-any.whl
- Upload date:
- Size: 13.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2227a22fe44efcec58381772e492df1346248fd2aa75bbbb4dcde08497a4d587
|
|
| MD5 |
33f8ad890fe4744399e9bf6759bf3638
|
|
| BLAKE2b-256 |
70c453ddc185c6e0dff66ad43965d46f9b91b86c2c5ad4058d69933321cb1c08
|