Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
25d00614
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看板
提交
25d00614
编写于
1月 16, 2023
作者:
L
liuTINA0907
提交者:
GitHub
1月 16, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "fix PP-HumanV2 PP-TinyPose PP-Vehicle video adaptive code (#5689)"
This reverts commit
7219a0e1
.
上级
7219a0e1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
14 deletion
+16
-14
modelcenter/PP-HumanV2/APP/pipeline/pipeline.py
modelcenter/PP-HumanV2/APP/pipeline/pipeline.py
+5
-4
modelcenter/PP-TinyPose/APP/det_keypoint_unite_infer.py
modelcenter/PP-TinyPose/APP/det_keypoint_unite_infer.py
+6
-6
modelcenter/PP-Vehicle/APP/pipeline/pipeline.py
modelcenter/PP-Vehicle/APP/pipeline/pipeline.py
+5
-4
未找到文件。
modelcenter/PP-HumanV2/APP/pipeline/pipeline.py
浏览文件 @
25d00614
...
...
@@ -389,7 +389,8 @@ class PipePredictor(object):
def
set_file_name
(
self
,
path
):
if
path
is
not
None
:
self
.
file_name
=
path
if
"."
in
path
:
self
.
file_name
=
path
.
split
(
"."
)[
-
2
]
else
:
# use camera id
self
.
file_name
=
None
...
...
@@ -445,9 +446,9 @@ class PipePredictor(object):
frame_count
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FRAME_COUNT
))
print
(
"video fps: %d, frame_count: %d"
%
(
fps
,
frame_count
))
video_
name
,
suffix
=
os
.
path
.
splitext
(
self
.
file_name
)
out_path
=
video_
name
+
"_output"
+
suffix
fourcc
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FOURCC
)
)
video_
out_name
=
'output'
if
self
.
file_name
is
None
else
self
.
file_name
out_path
=
video_
out_name
+
"_output.mp4"
fourcc
=
cv2
.
VideoWriter_fourcc
(
*
'mp4v'
)
writer
=
cv2
.
VideoWriter
(
out_path
,
fourcc
,
fps
,
(
width
,
height
))
frame_id
=
0
...
...
modelcenter/PP-TinyPose/APP/det_keypoint_unite_infer.py
浏览文件 @
25d00614
...
...
@@ -107,18 +107,18 @@ def topdown_unite_predict_video(FLAGS,
capture
=
cv2
.
VideoCapture
(
camera_id
)
else
:
capture
=
cv2
.
VideoCapture
(
FLAGS
.
video_file
)
video_name
,
suffix
=
os
.
path
.
splitext
(
FLAGS
.
video_file
)
video_name
=
video_name
+
"_output"
+
suffix
video_name
,
suffix
=
FLAGS
.
video_file
.
split
(
'.'
)
video_name
=
video_name
+
"_output."
+
suffix
# Get Video info : resolution, fps, frame count
width
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FRAME_WIDTH
))
height
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FRAME_HEIGHT
))
fps
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FPS
))
frame_count
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FRAME_COUNT
))
print
(
"fps: %d, frame_count: %d"
%
(
fps
,
frame_count
))
codec
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FOURCC
))
writer
=
cv2
.
VideoWriter
(
video_name
,
codec
,
fps
,
(
width
,
height
))
fourcc
=
cv2
.
VideoWriter_fourcc
(
*
'mp4v'
)
writer
=
cv2
.
VideoWriter
(
video_name
,
fourcc
,
fps
,
(
width
,
height
))
index
=
0
store_res
=
[]
keypoint_smoothing
=
KeypointSmoothing
(
...
...
modelcenter/PP-Vehicle/APP/pipeline/pipeline.py
浏览文件 @
25d00614
...
...
@@ -329,7 +329,8 @@ class PipePredictor(object):
def
set_file_name
(
self
,
path
):
if
path
is
not
None
:
self
.
file_name
=
path
if
"."
in
path
:
self
.
file_name
=
path
.
split
(
"."
)[
-
2
]
else
:
# use camera id
self
.
file_name
=
None
...
...
@@ -396,9 +397,9 @@ class PipePredictor(object):
frame_count
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FRAME_COUNT
))
print
(
"video fps: %d, frame_count: %d"
%
(
fps
,
frame_count
))
video_
name
,
suffix
=
os
.
path
.
splitext
(
self
.
file_name
)
out_path
=
video_
name
+
"_output"
+
suffix
fourcc
=
int
(
capture
.
get
(
cv2
.
CAP_PROP_FOURCC
)
)
video_
out_name
=
'output'
if
self
.
file_name
is
None
else
self
.
file_name
out_path
=
video_
out_name
+
"_output.mp4"
fourcc
=
cv2
.
VideoWriter_fourcc
(
*
'mp4v'
)
writer
=
cv2
.
VideoWriter
(
out_path
,
fourcc
,
fps
,
(
width
,
height
))
frame_id
=
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录