Skip to main content

新包装

项目描述

https://img.shields.io/badge/docs-stable-yellow.svg https://img.shields.io/badge/docs-v1.0.1-orange.svg https://gitlab.idiap.ch/bob/bob.io.stream/badges/v1.0.1/build.svg https://gitlab.idiap.ch/bob/bob.io.stream/badges/v1.0.1/coverage.svg https://img.shields.io/badge/gitlab-project-0000c0.svg https://img.shields.io/pypi/v/bob.io.stream.svg

鲍勃 IO 流

该软件包是信号处理和机器学习工具箱Bob的一部分。

动机

该软件包提供了一种基于“流”概念定义高效处理管道的方法,以加载、处理或保存存储在 hdf5 文件中的视频数据。流抽象允许使用简单的语法定义处理步骤的管道,并提供一种使用“类似 numpy”的 api 访问已处理数据的方法。它旨在通过仅加载必要的数据并缓冲视频帧和处理过的数据来最小化计算和磁盘访问。

安装

完成 bob 的安装说明。然后,要安装这个包,运行:

$ conda install bob.io.stream

例子

这是一个示例,说明如何使用该包加载使用 3 个不同相机记录的数据,构建处理管道并最终加载数据。

# Import Stream and StreamFile classes
# Processing filters are available through the Stream class
from bob.io.stream import StreamFile, Stream

# Open a Streamfile to a hdf5 file containing video data.
f = StreamFile("input_example.h5", face_streams.json")

# Define processing pipeline by chaining streams:
# First define the streams to load the data from the file (color, left and right), and add some processing
color = Stream("color", f)
nir_left = Stream("nir_left_stereo", f).adjust(color).normalize()
nir_right = Stream("nir_right_stereo", f).adjust(color).normalize()
all_swir = nir_left.stack(nir_right)

# Now that the pipeline is defined, the processed data can be accessed as if indexing in a numpy array:
all_streams[0]  # Loads data and apply processing to provide the first frame of the reprojected stream.
all_streams[2:10] # Loads several frames, etc...

接触

有关此软件包的问题或报告问题,请联系我们的开发邮件列表

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

bob.io.stream-1.0.1.zip (36.0 MB 查看哈希

已上传 source