Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
b0a84e61
M
models
项目概览
PaddlePaddle
/
models
1 年多 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b0a84e61
编写于
1月 31, 2019
作者:
S
SunGaofeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove redundant codes and comments
上级
b0888e63
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
2 addition
and
15 deletion
+2
-15
fluid/PaddleCV/video/datareader/nonlocal_reader.py
fluid/PaddleCV/video/datareader/nonlocal_reader.py
+1
-5
fluid/PaddleCV/video/models/attention_cluster/attention_cluster.py
...dleCV/video/models/attention_cluster/attention_cluster.py
+1
-1
fluid/PaddleCV/video/processdata/kinetics/video2pkl.py
fluid/PaddleCV/video/processdata/kinetics/video2pkl.py
+0
-4
fluid/PaddleCV/video/processdata/youtube8m/tf2pkl.py
fluid/PaddleCV/video/processdata/youtube8m/tf2pkl.py
+0
-5
未找到文件。
fluid/PaddleCV/video/datareader/nonlocal_reader.py
浏览文件 @
b0a84e61
...
...
@@ -89,7 +89,7 @@ class NonlocalReader(DataReader):
**
dataset_args
)
else
:
logger
.
info
(
'Not implemented'
)
raise
raise
NotImplementedError
def
video_fast_get_frame
(
video_path
,
...
...
@@ -104,7 +104,6 @@ def video_fast_get_frame(video_path,
sampledFrames
=
[]
# n_frame < sample area
video_output
=
np
.
ndarray
(
shape
=
[
length
,
height
,
width
,
3
],
dtype
=
np
.
uint8
)
use_start_frm
=
start_frm
...
...
@@ -220,7 +219,6 @@ def make_reader(filelist, batch_size, sample_times, is_training, shuffle,
start_frm
=
-
1
spatial_pos
=
-
1
in_sample_times
=
1
# print('label = ', label)
label
=
np
.
array
([
label
]).
astype
(
np
.
int64
)
# 1, get rgb data for fixed length of frames
try
:
...
...
@@ -246,8 +244,6 @@ def make_reader(filelist, batch_size, sample_times, is_training, shuffle,
spatial_pos
=
spatial_pos
)
batch_out
.
append
((
rgbdata
,
label
))
#elapsed_time = time.time() - start_time
#print('read item time ', elapsed_time)
if
len
(
batch_out
)
==
batch_size
:
yield
batch_out
batch_out
=
[]
...
...
fluid/PaddleCV/video/models/attention_cluster/attention_cluster.py
浏览文件 @
b0a84e61
...
...
@@ -34,7 +34,7 @@ class AttentionCluster(ModelBase):
self
.
feature_dims
=
self
.
cfg
.
MODEL
.
feature_dims
self
.
cluster_nums
=
self
.
cfg
.
MODEL
.
cluster_nums
self
.
seg_num
=
self
.
cfg
.
MODEL
.
seg_num
self
.
class_num
=
self
.
cfg
.
MODEL
.
num_classes
#self.cfg.MODEL.class_num
self
.
class_num
=
self
.
cfg
.
MODEL
.
num_classes
self
.
drop_rate
=
self
.
cfg
.
MODEL
.
drop_rate
if
self
.
mode
==
'train'
:
...
...
fluid/PaddleCV/video/processdata/kinetics/video2pkl.py
浏览文件 @
b0a84e61
...
...
@@ -46,11 +46,7 @@ f.close()
def
generate_pkl
(
entry
):
mode
=
entry
[
4
]
category
=
entry
[
0
].
strip
(
'"'
)
#if ' ' in category:
# category_dir = category.replace(' ', '_')
#else:
category_dir
=
category
#video_path = os.path.join(entry[0], entry[1] + "_%06d"%int(entry[2]) + "_%06d"%int(entry[3]) + ".mp4")
video_path
=
os
.
path
.
join
(
'./'
,
entry
[
1
]
+
"_%06d"
%
int
(
entry
[
2
])
+
"_%06d"
%
int
(
entry
[
3
])
+
".mp4"
)
...
...
fluid/PaddleCV/video/processdata/youtube8m/tf2pkl.py
浏览文件 @
b0a84e61
...
...
@@ -142,11 +142,6 @@ class YT8MFrameFeatureReader(BaseReader):
num_frames
=
tf
.
minimum
(
tf
.
shape
(
decoded_features
)[
0
],
max_frames
)
#feature_matrix = Dequantize(decoded_features,
# max_quantized_value,
# min_quantized_value)
#feature_matrix = resize_axis(feature_matrix, 0, max_frames)
feature_matrix
=
decoded_features
return
feature_matrix
,
num_frames
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录