avtensor 是一个基于 Rust 的库,提供 Python 绑定,通过 FFmpeg 直接将视频、音频和图像解码为 PyTorch 张量,专为机器学习数据加载流水线优化。

Stars

61

7 天增长

暂无数据

Fork 数

1

开放 Issue

0

开源协议

Apache-2.0

最近更新

2026-07-27

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它原生支持云存储输入(gs://、s3://、HTTP(S)),一次解码即可同时处理视频和音频,自动将 HDR 色调映射到 SDR,并且在解码时缩放速度比 torchcodec 快 1.7–6 倍。

适合谁使用

  • 使用 PyTorch 构建数据流水线的开发者
  • 处理视频/音频数据集的数据科学家
  • 需要高效媒体解码与 GPU 加速的机器学习工程师
  • 处理大规模多媒体集合的研究人员

典型使用场景

  • 为训练或推理解码视频帧和音频样本
  • 在解码时进行缩放、帧率重采样和响度归一化等预处理
  • 直接从云存储读取媒体,无需中间文件下载
  • 利用 NVDEC 进行 GPU 加速解码,降低 CPU 负载并提高吞吐量

项目优势

  • 原生支持云存储输入(gs://、s3://),无需额外依赖
  • 一次解码即可同时处理视频和音频流
  • 自动将 HDR 色调映射到 SDR,保持色彩准确
  • 基准测试中解码时缩放速度比 torchcodec 快 1.7–6 倍

使用前须知

  • 需要 FFmpeg >=7.1 共享库以及构建时依赖(Rust、libtorch)
  • NVDEC 硬件解码的并发引擎有限,且不支持 H.264 4:4:4 色度
  • GPU 驻留输出模式下无法进行帧率重采样和 HDR 色调映射

README 快速开始

Installation

项目描述

High-performance media decoding straight into PyTorch tensors

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

l0ng-ai
精选
l0ng-ai GitHub avatar

tty7

tty7 is a fast, GPU-accelerated terminal workbench with persistent sessions, built-in input tools, SSH support, and coding agent awareness.

开发者工具CLI 与终端
359
steelbrain
精选
steelbrain GitHub avatar

reims-vgpu

reims-vgpu is an experimental virtual GPU for macOS guests that uses QEMU to decode the guest's GPU command stream and execute it through Metal or Vulkan, leveraging the built-in AppleParavirtGPU driver without requiring custom kexts.

桌面应用
143
m-novotny
精选
m-novotny GitHub avatar

memguard-rs

A Rust library that provides secure memory handling primitives including zeroization on drop, memory locking, constant-time comparison, and compile-time guarded regions, with zero dependencies and no_std support.

嵌入式与物联网安全
131