Skip to content

Commit 239710c

Browse files
author
chenxinfeng
committed
polish to CUDA feature
1 parent b0768f4 commit 239710c

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,15 @@ cap = ffmpegcv.VideoCaptureCAM("Integrated Camera")
7575

7676
Deeplearning pipeline.
7777
```python
78-
# video -> crop -> resize -> RGB -> CUDA:CHW float32 -> model
78+
"""
79+
—————————— NVIDIA GPU accelerating ⤴⤴ ———————
80+
| |
81+
V V
82+
video -> decode -> crop -> resize -> RGB -> CUDA:CHW float32 -> model
83+
"""
7984
cap = ffmpegcv.toCUDA(
8085
ffmpegcv.VideoCaptureNV(file, pix_fmt='nv12', resize=(W,H)),
81-
tensor_format='CHW')
86+
tensor_format='chw')
8287

8388
for frame_CHW_cuda in cap:
8489
frame_CHW_cuda = (frame_CHW_cuda - mean) / std

README_CN.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ cap = ffmpegcv.VideoCaptureCAM("Integrated Camera")
7272

7373
深度学习流水线
7474
```python
75-
# video -> crop -> resize -> RGB -> CUDA:CHW float32 -> model
75+
"""
76+
—————————— NVIDIA GPU 加速 ⤴⤴ ———————
77+
| |
78+
V V
79+
视频 -> 解码器 -> 裁剪 -> 缩放 -> RGB -> CUDA:CHW float32 -> 模型
80+
"""
7681
cap = ffmpegcv.toCUDA(
7782
ffmpegcv.VideoCaptureNV(file, pix_fmt='nv12', resize=(W,H)),
78-
tensor_format='CHW')
83+
tensor_format='chw')
7984

8085
for frame_CHW_cuda in cap:
8186
frame_CHW_cuda = (frame_CHW_cuda - mean) / std

ffmpegcv/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__='0.3.13a'
1+
__version__='0.3.14'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name='ffmpegcv', # 应用名
9-
version='0.3.13a', # 版本号
9+
version='0.3.14', # 版本号
1010
packages=find_packages(include=['ffmpegcv*']), # 包括在安装包内的 Python 包
1111
author='chenxf',
1212
author_email='cxf529125853@163.com',

0 commit comments

Comments
 (0)