Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openvinotoolkit
mmaction2
提交
a4e100e1
M
mmaction2
项目概览
openvinotoolkit
/
mmaction2
9 个月 前同步成功
通知
2
Star
5
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mmaction2
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
a4e100e1
编写于
8月 09, 2020
作者:
J
Jintao Lin
提交者:
GitHub
8月 09, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use `RawFrameDecode` to replace `FrameSelector` (#91)
上级
e55dc234
变更
52
隐藏空白更改
内联
并排
Showing
52 changed file
with
179 addition
and
161 deletion
+179
-161
configs/recognition/i3d/i3d_nl_r50_32x2x1_100e_kinetics400_rgb.py
...recognition/i3d/i3d_nl_r50_32x2x1_100e_kinetics400_rgb.py
+3
-3
configs/recognition/i3d/i3d_r50_32x2x1_100e_kinetics400_rgb.py
...gs/recognition/i3d/i3d_r50_32x2x1_100e_kinetics400_rgb.py
+3
-3
configs/recognition/i3d/i3d_r50_dense_32x2x1_100e_kinetics400_rgb.py
...ognition/i3d/i3d_r50_dense_32x2x1_100e_kinetics400_rgb.py
+3
-3
configs/recognition/i3d/i3d_r50_fast_32x2x1_100e_kinetics400_rgb.py
...cognition/i3d/i3d_r50_fast_32x2x1_100e_kinetics400_rgb.py
+3
-3
configs/recognition/i3d/i3d_r50_heavy_8x8x1_100e_kinetics400_rgb.py
...cognition/i3d/i3d_r50_heavy_8x8x1_100e_kinetics400_rgb.py
+3
-3
configs/recognition/r2plus1d/r2plus1d_r34_32x2x1_180e_kinetics400_rgb.py
...tion/r2plus1d/r2plus1d_r34_32x2x1_180e_kinetics400_rgb.py
+3
-3
configs/recognition/r2plus1d/r2plus1d_r34_8x8x1_180e_kinetics400_rgb.py
...ition/r2plus1d/r2plus1d_r34_8x8x1_180e_kinetics400_rgb.py
+3
-3
configs/recognition/slowfast/slowfast_r50_4x16x1_256e_kinetics400_rgb.py
...tion/slowfast/slowfast_r50_4x16x1_256e_kinetics400_rgb.py
+3
-3
configs/recognition/slowfast/slowfast_r50_8x8x1_256e_kinetics400_rgb.py
...ition/slowfast/slowfast_r50_8x8x1_256e_kinetics400_rgb.py
+3
-3
configs/recognition/slowonly/data_benchmark/slowonly_r50_randomresizedcrop_320p_4x16x1_256e_kinetics400_rgb.py
...r50_randomresizedcrop_320p_4x16x1_256e_kinetics400_rgb.py
+3
-3
configs/recognition/slowonly/data_benchmark/slowonly_r50_randomresizedcrop_340x256_4x16x1_256e_kinetics400_rgb.py
..._randomresizedcrop_340x256_4x16x1_256e_kinetics400_rgb.py
+3
-3
configs/recognition/slowonly/slowonly_r50_4x16x1_256e_kinetics400_flow.py
...ion/slowonly/slowonly_r50_4x16x1_256e_kinetics400_flow.py
+3
-3
configs/recognition/slowonly/slowonly_r50_4x16x1_256e_kinetics400_rgb.py
...tion/slowonly/slowonly_r50_4x16x1_256e_kinetics400_rgb.py
+3
-3
configs/recognition/slowonly/slowonly_r50_8x8x1_256e_kinetics400_flow.py
...tion/slowonly/slowonly_r50_8x8x1_256e_kinetics400_flow.py
+3
-3
configs/recognition/slowonly/slowonly_r50_8x8x1_256e_kinetics400_rgb.py
...ition/slowonly/slowonly_r50_8x8x1_256e_kinetics400_rgb.py
+3
-3
configs/recognition/tsm/tsm_nl_r50_1x1x8_50e_kinetics400_rgb.py
...s/recognition/tsm/tsm_nl_r50_1x1x8_50e_kinetics400_rgb.py
+3
-3
configs/recognition/tsm/tsm_r101_1x1x8_50e_sthv2_rgb.py
configs/recognition/tsm/tsm_r101_1x1x8_50e_sthv2_rgb.py
+3
-3
configs/recognition/tsm/tsm_r50_1x1x16_50e_kinetics400_rgb.py
...igs/recognition/tsm/tsm_r50_1x1x16_50e_kinetics400_rgb.py
+3
-3
configs/recognition/tsm/tsm_r50_1x1x16_50e_sthv2_rgb.py
configs/recognition/tsm/tsm_r50_1x1x16_50e_sthv2_rgb.py
+3
-3
configs/recognition/tsm/tsm_r50_1x1x8_50e_kinetics400_rgb.py
configs/recognition/tsm/tsm_r50_1x1x8_50e_kinetics400_rgb.py
+3
-3
configs/recognition/tsm/tsm_r50_1x1x8_50e_sthv1_rgb.py
configs/recognition/tsm/tsm_r50_1x1x8_50e_sthv1_rgb.py
+3
-3
configs/recognition/tsm/tsm_r50_dense_1x1x8_100e_kinetics400_rgb.py
...cognition/tsm/tsm_r50_dense_1x1x8_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsm/tsm_temporal_pool_r50_1x1x8_50e_kinetics400_rgb.py
...on/tsm/tsm_temporal_pool_r50_1x1x8_50e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/data_benchmark/tsn_r50_multiscalecrop_320p_1x1x3_100e_kinetics400_rgb.py
...tsn_r50_multiscalecrop_320p_1x1x3_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/data_benchmark/tsn_r50_multiscalecrop_340x256_1x1x3_100e_kinetics400_rgb.py
..._r50_multiscalecrop_340x256_1x1x3_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/data_benchmark/tsn_r50_randomresizedcrop_320p_1x1x3_100e_kinetics400_rgb.py
..._r50_randomresizedcrop_320p_1x1x3_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/data_benchmark/tsn_r50_randomresizedcrop_340x256_1x1x3_100e_kinetics400_rgb.py
...0_randomresizedcrop_340x256_1x1x3_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/data_benchmark/tsn_r50_test_320p_1x1x25_10crop_100e_kinetics400_rgb.py
...k/tsn_r50_test_320p_1x1x25_10crop_100e_kinetics400_rgb.py
+1
-1
configs/recognition/tsn/data_benchmark/tsn_r50_test_320p_1x1x25_3crop_100e_kinetics400_rgb.py
...rk/tsn_r50_test_320p_1x1x25_3crop_100e_kinetics400_rgb.py
+1
-1
configs/recognition/tsn/data_benchmark/tsn_r50_test_340x256_1x1x25_10crop_100e_kinetics400_rgb.py
...sn_r50_test_340x256_1x1x25_10crop_100e_kinetics400_rgb.py
+1
-1
configs/recognition/tsn/data_benchmark/tsn_r50_test_340x256_1x1x25_3crop_100e_kinetics400_rgb.py
...tsn_r50_test_340x256_1x1x25_3crop_100e_kinetics400_rgb.py
+1
-1
configs/recognition/tsn/tsn_r101_1x1x5_50e_mmit_rgb.py
configs/recognition/tsn/tsn_r101_1x1x5_50e_mmit_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_1x1x16_50e_sthv1_rgb.py
configs/recognition/tsn/tsn_r50_1x1x16_50e_sthv1_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_1x1x16_50e_sthv2_rgb.py
configs/recognition/tsn/tsn_r50_1x1x16_50e_sthv2_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_1x1x3_100e_kinetics400_rgb.py
...igs/recognition/tsn/tsn_r50_1x1x3_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_1x1x3_80e_ucf101_rgb.py
configs/recognition/tsn/tsn_r50_1x1x3_80e_ucf101_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_1x1x6_100e_mit_rgb.py
configs/recognition/tsn/tsn_r50_1x1x6_100e_mit_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_1x1x8_50e_sthv1_rgb.py
configs/recognition/tsn/tsn_r50_1x1x8_50e_sthv1_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_1x1x8_50e_sthv2_rgb.py
configs/recognition/tsn/tsn_r50_1x1x8_50e_sthv2_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_320p_1x1x3_100e_kinetics400_rgb.py
...ecognition/tsn/tsn_r50_320p_1x1x3_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_320p_1x1x3_110e_kinetics400_flow.py
...cognition/tsn/tsn_r50_320p_1x1x3_110e_kinetics400_flow.py
+3
-3
configs/recognition/tsn/tsn_r50_320p_1x1x8_100e_kinetics400_rgb.py
...ecognition/tsn/tsn_r50_320p_1x1x8_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_320p_1x1x8_110e_kinetics400_flow.py
...cognition/tsn/tsn_r50_320p_1x1x8_110e_kinetics400_flow.py
+3
-3
configs/recognition/tsn/tsn_r50_dense_1x1x5_100e_kinetics400_rgb.py
...cognition/tsn/tsn_r50_dense_1x1x5_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_dense_1x1x8_100e_kinetics400_rgb.py
...cognition/tsn/tsn_r50_dense_1x1x8_100e_kinetics400_rgb.py
+3
-3
configs/recognition/tsn/tsn_r50_inference_1x1x3_100e_kinetics400_rgb.py
...ition/tsn/tsn_r50_inference_1x1x3_100e_kinetics400_rgb.py
+1
-1
docs/config.md
docs/config.md
+9
-9
docs/tutorials/data_pipeline.md
docs/tutorials/data_pipeline.md
+5
-5
mmaction/datasets/pipelines/__init__.py
mmaction/datasets/pipelines/__init__.py
+4
-3
mmaction/datasets/pipelines/loading.py
mmaction/datasets/pipelines/loading.py
+14
-3
tests/test_data/test_dataset.py
tests/test_data/test_dataset.py
+1
-1
tests/test_data/test_loading.py
tests/test_data/test_loading.py
+18
-12
未找到文件。
configs/recognition/i3d/i3d_nl_r50_32x2x1_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -37,7 +37,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -59,7 +59,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -75,7 +75,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/i3d/i3d_r50_32x2x1_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -31,7 +31,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -53,7 +53,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -69,7 +69,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/i3d/i3d_r50_dense_32x2x1_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -31,7 +31,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'DenseSampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -53,7 +53,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -69,7 +69,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/i3d/i3d_r50_fast_32x2x1_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
,
decoding_backend
=
'turbojpeg'
),
dict
(
type
=
'
RawFrameDecode
'
,
decoding_backend
=
'turbojpeg'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
),
lazy
=
True
),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -54,7 +54,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
,
decoding_backend
=
'turbojpeg'
),
dict
(
type
=
'
RawFrameDecode
'
,
decoding_backend
=
'turbojpeg'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
),
lazy
=
True
),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
,
lazy
=
True
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
,
lazy
=
True
),
...
...
@@ -71,7 +71,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
,
decoding_backend
=
'turbojpeg'
),
dict
(
type
=
'
RawFrameDecode
'
,
decoding_backend
=
'turbojpeg'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/i3d/i3d_r50_heavy_8x8x1_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -34,7 +34,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
8
,
frame_interval
=
8
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -56,7 +56,7 @@ val_pipeline = [
frame_interval
=
8
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -72,7 +72,7 @@ test_pipeline = [
frame_interval
=
8
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/r2plus1d/r2plus1d_r34_32x2x1_180e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -37,7 +37,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -54,7 +54,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -70,7 +70,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/r2plus1d/r2plus1d_r34_8x8x1_180e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -37,7 +37,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
8
,
frame_interval
=
8
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -54,7 +54,7 @@ val_pipeline = [
frame_interval
=
8
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -70,7 +70,7 @@ test_pipeline = [
frame_interval
=
8
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowfast/slowfast_r50_4x16x1_256e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -45,7 +45,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -62,7 +62,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -78,7 +78,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowfast/slowfast_r50_8x8x1_256e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -46,7 +46,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -63,7 +63,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -79,7 +79,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowonly/data_benchmark/slowonly_r50_randomresizedcrop_320p_4x16x1_256e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
4
,
frame_interval
=
16
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
16
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
16
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowonly/data_benchmark/slowonly_r50_randomresizedcrop_340x256_4x16x1_256e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
4
,
frame_interval
=
16
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
16
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
16
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowonly/slowonly_r50_4x16x1_256e_kinetics400_flow.py
浏览文件 @
a4e100e1
...
...
@@ -29,7 +29,7 @@ ann_file_test = 'data/kinetics400/kinetics_flow_val_list.txt'
img_norm_cfg
=
dict
(
mean
=
[
128
,
128
],
std
=
[
128
,
128
])
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
4
,
frame_interval
=
16
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -46,7 +46,7 @@ val_pipeline = [
frame_interval
=
16
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -62,7 +62,7 @@ test_pipeline = [
frame_interval
=
16
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowonly/slowonly_r50_4x16x1_256e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
4
,
frame_interval
=
16
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
16
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
16
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowonly/slowonly_r50_8x8x1_256e_kinetics400_flow.py
浏览文件 @
a4e100e1
...
...
@@ -29,7 +29,7 @@ ann_file_test = 'data/kinetics400/kinetics_flow_val_list.txt'
img_norm_cfg
=
dict
(
mean
=
[
128
,
128
],
std
=
[
128
,
128
])
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
8
,
frame_interval
=
8
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -46,7 +46,7 @@ val_pipeline = [
frame_interval
=
8
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -62,7 +62,7 @@ test_pipeline = [
frame_interval
=
8
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/slowonly/slowonly_r50_8x8x1_256e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
8
,
frame_interval
=
8
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
8
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
8
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsm/tsm_nl_r50_1x1x8_50e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -36,7 +36,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -59,7 +59,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -75,7 +75,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsm/tsm_r101_1x1x8_50e_sthv2_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -52,7 +52,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
@@ -67,7 +67,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
configs/recognition/tsm/tsm_r50_1x1x16_50e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
16
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -53,7 +53,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
16
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -69,7 +69,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
16
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsm/tsm_r50_1x1x16_50e_sthv2_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
16
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -52,7 +52,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
16
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
@@ -67,7 +67,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
16
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
configs/recognition/tsm/tsm_r50_1x1x8_50e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -53,7 +53,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -69,7 +69,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsm/tsm_r50_1x1x8_50e_sthv1_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -52,7 +52,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
@@ -67,7 +67,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
configs/recognition/tsm/tsm_r50_dense_1x1x8_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'DenseSampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -53,7 +53,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -69,7 +69,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsm/tsm_temporal_pool_r50_1x1x8_50e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -32,7 +32,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -55,7 +55,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -71,7 +71,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_multiscalecrop_320p_1x1x3_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -50,7 +50,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -66,7 +66,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_multiscalecrop_340x256_1x1x3_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -50,7 +50,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -66,7 +66,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_randomresizedcrop_320p_1x1x3_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_randomresizedcrop_340x256_1x1x3_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_test_320p_1x1x25_10crop_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -34,7 +34,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_test_320p_1x1x25_3crop_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -34,7 +34,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_test_340x256_1x1x25_10crop_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -34,7 +34,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/data_benchmark/tsn_r50_test_340x256_1x1x25_3crop_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -30,7 +30,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r101_1x1x5_50e_mmit_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -31,7 +31,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
5
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -53,7 +53,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
5
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -69,7 +69,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
5
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiGroupCrop'
,
crop_size
=
256
,
groups
=
1
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_1x1x16_50e_sthv1_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -29,7 +29,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
16
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -52,7 +52,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
@@ -67,7 +67,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
configs/recognition/tsn/tsn_r50_1x1x16_50e_sthv2_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
16
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -45,7 +45,7 @@ train_pipeline = [
]
val_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
16
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
@@ -55,7 +55,7 @@ val_pipeline = [
]
test_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
16
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Normalize'
,
**
img_norm_cfg
),
...
...
configs/recognition/tsn/tsn_r50_1x1x3_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -50,7 +50,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -66,7 +66,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_1x1x3_80e_ucf101_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -27,7 +27,7 @@ ann_file_test = 'data/ucf101/ucf101_val_split_{1,2,3}_rawframes.txt'
img_norm_cfg
=
dict
(
mean
=
[
104
,
117
,
128
],
std
=
[
1
,
1
,
1
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -49,7 +49,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -65,7 +65,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_1x1x6_100e_mit_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
6
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -50,7 +50,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
6
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -66,7 +66,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
6
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_1x1x8_50e_sthv1_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -29,7 +29,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -51,7 +51,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -67,7 +67,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_1x1x8_50e_sthv2_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -44,7 +44,7 @@ train_pipeline = [
]
val_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -54,7 +54,7 @@ val_pipeline = [
]
test_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_320p_1x1x3_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_320p_1x1x3_110e_kinetics400_flow.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
5
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_320p_1x1x8_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_320p_1x1x8_110e_kinetics400_flow.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
5
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'RandomResizedCrop'
),
dict
(
type
=
'Resize'
,
scale
=
(
224
,
224
),
keep_ratio
=
False
),
...
...
@@ -45,7 +45,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -61,7 +61,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_dense_1x1x5_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'DenseSampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
5
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -51,7 +51,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -67,7 +67,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_dense_1x1x8_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -28,7 +28,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'DenseSampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
8
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -51,7 +51,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -67,7 +67,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
8
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
configs/recognition/tsn/tsn_r50_inference_1x1x3_100e_kinetics400_rgb.py
浏览文件 @
a4e100e1
...
...
@@ -27,7 +27,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
docs/config.md
浏览文件 @
a4e100e1
...
...
@@ -236,8 +236,8 @@ train_pipeline = [ # List of training pipeline steps
clip_len
=
1
,
# Frames of each sampled output clip
frame_interval
=
1
,
# Temporal interval of adjacent sampled frames
num_clips
=
3
),
# Number of clips to be sampled
dict
(
# Config of
FrameSelector
type
=
'
FrameSelector'
),
# Frame selector pipeline, select
ing raw frames with given indices
dict
(
# Config of
RawFrameDecode
type
=
'
RawFrameDecode'
),
# Load and decode Frames pipeline, pick
ing raw frames with given indices
dict
(
# Config of Resize
type
=
'Resize'
,
# Resize pipeline
scale
=
(
-
1
,
256
)),
# The scale to resize images
...
...
@@ -275,8 +275,8 @@ val_pipeline = [ # List of validation pipeline steps
frame_interval
=
1
,
# Temporal interval of adjacent sampled frames
num_clips
=
3
,
# Number of clips to be sampled
test_mode
=
True
),
# Whether to set test mode in sampling
dict
(
# Config of
FrameSelector
type
=
'
FrameSelector'
),
# Frame selector pipeline, select
ing raw frames with given indices
dict
(
# Config of
RawFrameDecode
type
=
'
RawFrameDecode'
),
# Load and decode Frames pipeline, pick
ing raw frames with given indices
dict
(
# Config of Resize
type
=
'Resize'
,
# Resize pipeline
scale
=
(
-
1
,
256
)),
# The scale to resize images
...
...
@@ -307,8 +307,8 @@ test_pipeline = [ # List of testing pipeline steps
frame_interval
=
1
,
# Temporal interval of adjacent sampled frames
num_clips
=
25
,
# Number of clips to be sampled
test_mode
=
True
),
# Whether to set test mode in sampling
dict
(
# Config of
FrameSelector
type
=
'
FrameSelector'
),
# Frame selector pipeline, select
ing raw frames with given indices
dict
(
# Config of
RawFrameDecode
type
=
'
RawFrameDecode'
),
# Load and decode Frames pipeline, pick
ing raw frames with given indices
dict
(
# Config of Resize
type
=
'Resize'
,
# Resize pipeline
scale
=
(
-
1
,
256
)),
# The scale to resize images
...
...
@@ -420,7 +420,7 @@ img_norm_cfg = dict(
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -442,7 +442,7 @@ val_pipeline = [
frame_interval
=
2
,
num_clips
=
1
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -458,7 +458,7 @@ test_pipeline = [
frame_interval
=
2
,
num_clips
=
10
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
),
dict
(
type
=
'
RawFrameDecode
'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'ThreeCrop'
,
crop_size
=
256
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
docs/tutorials/data_pipeline.md
浏览文件 @
a4e100e1
...
...
@@ -25,7 +25,7 @@ img_norm_cfg = dict(
mean
=
[
123.675
,
116.28
,
103.53
],
std
=
[
58.395
,
57.12
,
57.375
],
to_bgr
=
False
)
train_pipeline
=
[
dict
(
type
=
'SampleFrames'
,
clip_len
=
1
,
frame_interval
=
1
,
num_clips
=
3
),
dict
(
type
=
'
FrameSelector
'
,
io_backend
=
'disk'
),
dict
(
type
=
'
RawFrameDecode
'
,
io_backend
=
'disk'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'MultiScaleCrop'
,
...
...
@@ -47,7 +47,7 @@ val_pipeline = [
frame_interval
=
1
,
num_clips
=
3
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
,
io_backend
=
'disk'
),
dict
(
type
=
'
RawFrameDecode
'
,
io_backend
=
'disk'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'CenterCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -63,7 +63,7 @@ test_pipeline = [
frame_interval
=
1
,
num_clips
=
25
,
test_mode
=
True
),
dict
(
type
=
'
FrameSelector
'
,
io_backend
=
'disk'
),
dict
(
type
=
'
RawFrameDecode
'
,
io_backend
=
'disk'
),
dict
(
type
=
'Resize'
,
scale
=
(
-
1
,
256
)),
dict
(
type
=
'TenCrop'
,
crop_size
=
224
),
dict
(
type
=
'Flip'
,
flip_ratio
=
0
),
...
...
@@ -96,7 +96,7 @@ For each operation, we list the related dict fields that are added/updated/remov
-
add: imgs, original_shape
-
update:
*
frame_inds
`
FrameSelector
`
`
RawFrameDecode
`
-
add: imgs, original_shape
-
update:
*
frame_inds
...
...
@@ -191,7 +191,7 @@ It is **noteworthy** that the first key, commonly `imgs`, will be used as the ma
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='DenseSampleFrames', clip_len=8, frame_interval=8, num_clips=1),
dict(type='
FrameSelector
', io_backend='disk'),
dict(type='
RawFrameDecode
', io_backend='disk'),
dict(type='MyTransform'), # use a custom pipeline
dict(type='Normalize', **img_norm_cfg),
dict(type='FormatShape', input_format='NCTHW'),
...
...
mmaction/datasets/pipelines/__init__.py
浏览文件 @
a4e100e1
...
...
@@ -7,8 +7,8 @@ from .formating import (Collect, FormatShape, ImageToTensor, ToDataContainer,
from
.loading
import
(
DecordDecode
,
DecordInit
,
DenseSampleFrames
,
FrameSelector
,
GenerateLocalizationLabels
,
LoadLocalizationFeature
,
LoadProposals
,
OpenCVDecode
,
OpenCVInit
,
PyAVDecode
,
PyAVInit
,
SampleFrames
,
SampleProposalFrames
)
OpenCVInit
,
PyAVDecode
,
PyAVInit
,
RawFrameDecode
,
Sample
Frames
,
Sample
ProposalFrames
)
__all__
=
[
'SampleFrames'
,
'PyAVDecode'
,
'DecordDecode'
,
'DenseSampleFrames'
,
...
...
@@ -17,5 +17,6 @@ __all__ = [
'ThreeCrop'
,
'CenterCrop'
,
'TenCrop'
,
'ImageToTensor'
,
'Transpose'
,
'Collect'
,
'FormatShape'
,
'Compose'
,
'ToTensor'
,
'ToDataContainer'
,
'GenerateLocalizationLabels'
,
'LoadLocalizationFeature'
,
'LoadProposals'
,
'DecordInit'
,
'OpenCVInit'
,
'PyAVInit'
,
'SampleProposalFrames'
'DecordInit'
,
'OpenCVInit'
,
'PyAVInit'
,
'SampleProposalFrames'
,
'RawFrameDecode'
]
mmaction/datasets/pipelines/loading.py
浏览文件 @
a4e100e1
...
...
@@ -2,6 +2,7 @@ import io
import
os
import
os.path
as
osp
import
shutil
import
warnings
import
mmcv
import
numpy
as
np
...
...
@@ -793,8 +794,8 @@ class OpenCVDecode(object):
@
PIPELINES
.
register_module
()
class
FrameSelector
(
object
):
"""
Select raw
frames with given indices.
class
RawFrameDecode
(
object
):
"""
Load and decode
frames with given indices.
Required keys are "frame_dir", "filename_tmpl" and "frame_inds",
added or modified keys are "imgs", "img_shape" and "original_shape".
...
...
@@ -813,7 +814,7 @@ class FrameSelector(object):
self
.
file_client
=
None
def
__call__
(
self
,
results
):
"""Perform the
FrameSelector selecting
given indices.
"""Perform the
``RawFrameDecode`` to pick frames
given indices.
Args:
results (dict): The resulting dict to be modified and passed
...
...
@@ -863,6 +864,16 @@ class FrameSelector(object):
return
results
@
PIPELINES
.
register_module
()
class
FrameSelector
(
RawFrameDecode
):
"""Deprecated class for ``RawFrameDecode``."""
def
__init__
(
self
,
*
args
,
**
kwargs
):
warnings
.
warn
(
'"FrameSelector" is deprecated, please switch to'
'"RawFrameDecode"'
)
super
().
__init__
(
*
args
,
**
kwargs
)
@
PIPELINES
.
register_module
()
class
LoadLocalizationFeature
(
object
):
"""Load Video features for localizer with given video_name list.
...
...
tests/test_data/test_dataset.py
浏览文件 @
a4e100e1
...
...
@@ -37,7 +37,7 @@ class TestDataset(object):
clip_len
=
32
,
frame_interval
=
2
,
num_clips
=
1
),
dict
(
type
=
'
FrameSelector
'
,
io_backend
=
'disk'
)
dict
(
type
=
'
RawFrameDecode
'
,
io_backend
=
'disk'
)
]
cls
.
video_pipeline
=
[
dict
(
type
=
'OpenCVInit'
),
...
...
tests/test_data/test_loading.py
浏览文件 @
a4e100e1
...
...
@@ -12,7 +12,8 @@ from mmaction.datasets.pipelines import (DecordDecode, DecordInit,
LoadLocalizationFeature
,
LoadProposals
,
OpenCVDecode
,
OpenCVInit
,
PyAVDecode
,
PyAVInit
,
SampleFrames
,
SampleProposalFrames
)
RawFrameDecode
,
SampleFrames
,
SampleProposalFrames
)
class
ExampleSSNInstance
(
object
):
...
...
@@ -830,7 +831,12 @@ class TestLoading(object):
assert
np
.
shape
(
opencv_decode_result
[
'imgs'
])
==
(
len
(
video_result
[
'frame_inds'
]),
256
,
340
,
3
)
def
test_frame_selector
(
self
):
def
test_rawframe_selector
(
self
):
with
pytest
.
warns
(
UserWarning
):
FrameSelector
(
io_backend
=
'disk'
)
def
test_rawframe_decode
(
self
):
target_keys
=
[
'frame_inds'
,
'imgs'
,
'original_shape'
,
'modality'
]
# test frame selector with 2 dim input when start_index = 0
...
...
@@ -840,7 +846,7 @@ class TestLoading(object):
# since the test images start with index 1, we plus 1 to frame_inds
# in order to pass the CI
inputs
[
'frame_inds'
]
=
inputs
[
'frame_inds'
]
+
1
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
]),
240
,
...
...
@@ -851,7 +857,7 @@ class TestLoading(object):
inputs
=
copy
.
deepcopy
(
self
.
frame_results
)
inputs
[
'frame_inds'
]
=
np
.
arange
(
1
,
self
.
total_frames
,
2
)[:,
np
.
newaxis
]
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
]),
240
,
...
...
@@ -864,7 +870,7 @@ class TestLoading(object):
# since the test images start with index 1, we plus 1 to frame_inds
# in order to pass the CI
inputs
[
'frame_inds'
]
=
inputs
[
'frame_inds'
]
+
1
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
]),
240
,
...
...
@@ -874,7 +880,7 @@ class TestLoading(object):
# test frame selector with 1 dim input
inputs
=
copy
.
deepcopy
(
self
.
frame_results
)
inputs
[
'frame_inds'
]
=
np
.
arange
(
1
,
self
.
total_frames
,
5
)
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
]),
240
,
...
...
@@ -887,7 +893,7 @@ class TestLoading(object):
# since the test images start with index 1, we plus 1 to frame_inds
# in order to pass the CI
inputs
[
'frame_inds'
]
=
inputs
[
'frame_inds'
]
+
1
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
]),
240
,
...
...
@@ -897,7 +903,7 @@ class TestLoading(object):
# test frame selector with 1 dim input
inputs
=
copy
.
deepcopy
(
self
.
frame_results
)
inputs
[
'frame_inds'
]
=
np
.
arange
(
1
,
self
.
total_frames
,
2
)
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
]),
240
,
...
...
@@ -911,7 +917,7 @@ class TestLoading(object):
# since the test images start with index 1, we plus 1 to frame_inds
# in order to pass the CI
inputs
[
'frame_inds'
]
=
inputs
[
'frame_inds'
]
+
1
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
])
*
2
,
...
...
@@ -921,7 +927,7 @@ class TestLoading(object):
# test frame selector with 1 dim input for flow images
inputs
=
copy
.
deepcopy
(
self
.
flow_frame_results
)
inputs
[
'frame_inds'
]
=
np
.
arange
(
1
,
self
.
total_frames
,
2
)
frame_selector
=
FrameSelector
(
io_backend
=
'disk'
)
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
assert
np
.
shape
(
results
[
'imgs'
])
==
(
len
(
inputs
[
'frame_inds'
])
*
2
,
...
...
@@ -935,7 +941,7 @@ class TestLoading(object):
# since the test images start with index 1, we plus 1 to frame_inds
# in order to pass the CI
inputs
[
'frame_inds'
]
=
inputs
[
'frame_inds'
]
+
1
frame_selector
=
FrameSelector
(
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
,
decoding_backend
=
'turbojpeg'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
...
...
@@ -946,7 +952,7 @@ class TestLoading(object):
# test frame selector in turbojpeg decording backend
inputs
=
copy
.
deepcopy
(
self
.
frame_results
)
inputs
[
'frame_inds'
]
=
np
.
arange
(
1
,
self
.
total_frames
,
5
)
frame_selector
=
FrameSelector
(
frame_selector
=
RawFrameDecode
(
io_backend
=
'disk'
,
decoding_backend
=
'turbojpeg'
)
results
=
frame_selector
(
inputs
)
assert
self
.
check_keys_contain
(
results
.
keys
(),
target_keys
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录