Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
d56cf3f7
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
d56cf3f7
编写于
1月 31, 2023
作者:
jackie_2009_ok
提交者:
GitHub
1月 31, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix output_dir path by OS_PATH_SEP in cpp deploy (#7616)
上级
38ebb263
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
4 deletion
+4
-4
deploy/cpp/src/main_keypoint.cc
deploy/cpp/src/main_keypoint.cc
+4
-4
未找到文件。
deploy/cpp/src/main_keypoint.cc
浏览文件 @
d56cf3f7
...
@@ -105,7 +105,7 @@ void PrintBenchmarkLog(std::vector<double> det_time, int img_num) {
...
@@ -105,7 +105,7 @@ void PrintBenchmarkLog(std::vector<double> det_time, int img_num) {
LOG
(
INFO
)
<<
"input_shape: "
LOG
(
INFO
)
<<
"input_shape: "
<<
"dynamic shape"
;
<<
"dynamic shape"
;
LOG
(
INFO
)
<<
"----------------------- Model info -----------------------"
;
LOG
(
INFO
)
<<
"----------------------- Model info -----------------------"
;
FLAGS_model_dir
.
erase
(
FLAGS_model_dir
.
find_last_not_of
(
"/"
)
+
1
);
FLAGS_model_dir
.
erase
(
FLAGS_model_dir
.
find_last_not_of
(
OS_PATH_SEP
)
+
1
);
LOG
(
INFO
)
<<
"model_name: "
<<
FLAGS_model_dir
;
LOG
(
INFO
)
<<
"model_name: "
<<
FLAGS_model_dir
;
LOG
(
INFO
)
<<
"----------------------- Perf info ------------------------"
;
LOG
(
INFO
)
<<
"----------------------- Perf info ------------------------"
;
LOG
(
INFO
)
<<
"Total number of predicted data: "
<<
img_num
LOG
(
INFO
)
<<
"Total number of predicted data: "
<<
img_num
...
@@ -122,7 +122,7 @@ void PrintKptsBenchmarkLog(std::vector<double> det_time, int img_num) {
...
@@ -122,7 +122,7 @@ void PrintKptsBenchmarkLog(std::vector<double> det_time, int img_num) {
LOG
(
INFO
)
<<
"batch_size_keypoint: "
<<
FLAGS_batch_size_keypoint
;
LOG
(
INFO
)
<<
"batch_size_keypoint: "
<<
FLAGS_batch_size_keypoint
;
LOG
(
INFO
)
<<
"----------------------- Model info -----------------------"
;
LOG
(
INFO
)
<<
"----------------------- Model info -----------------------"
;
FLAGS_model_dir_keypoint
.
erase
(
FLAGS_model_dir_keypoint
.
erase
(
FLAGS_model_dir_keypoint
.
find_last_not_of
(
"/"
)
+
1
);
FLAGS_model_dir_keypoint
.
find_last_not_of
(
OS_PATH_SEP
)
+
1
);
LOG
(
INFO
)
<<
"keypoint_model_name: "
<<
FLAGS_model_dir_keypoint
;
LOG
(
INFO
)
<<
"keypoint_model_name: "
<<
FLAGS_model_dir_keypoint
;
LOG
(
INFO
)
<<
"----------------------- Perf info ------------------------"
;
LOG
(
INFO
)
<<
"----------------------- Perf info ------------------------"
;
LOG
(
INFO
)
<<
"Total number of predicted data: "
<<
img_num
LOG
(
INFO
)
<<
"Total number of predicted data: "
<<
img_num
...
@@ -476,7 +476,7 @@ void PredictImage(const std::vector<std::string> all_img_paths,
...
@@ -476,7 +476,7 @@ void PredictImage(const std::vector<std::string> all_img_paths,
}
}
std
::
string
kpts_savepath
=
std
::
string
kpts_savepath
=
output_path
+
"keypoint_"
+
output_path
+
"keypoint_"
+
image_file_path
.
substr
(
image_file_path
.
find_last_of
(
'/'
)
+
1
);
image_file_path
.
substr
(
image_file_path
.
find_last_of
(
OS_PATH_SEP
)
+
1
);
cv
::
Mat
kpts_vis_img
=
cv
::
Mat
kpts_vis_img
=
VisualizeKptsResult
(
im
,
result_kpts
,
colormap_kpts
);
VisualizeKptsResult
(
im
,
result_kpts
,
colormap_kpts
);
cv
::
imwrite
(
kpts_savepath
,
kpts_vis_img
,
compression_params
);
cv
::
imwrite
(
kpts_savepath
,
kpts_vis_img
,
compression_params
);
...
@@ -487,7 +487,7 @@ void PredictImage(const std::vector<std::string> all_img_paths,
...
@@ -487,7 +487,7 @@ void PredictImage(const std::vector<std::string> all_img_paths,
im
,
im_result
,
labels
,
colormap
,
is_rbox
);
im
,
im_result
,
labels
,
colormap
,
is_rbox
);
std
::
string
det_savepath
=
std
::
string
det_savepath
=
output_path
+
output_path
+
image_file_path
.
substr
(
image_file_path
.
find_last_of
(
'/'
)
+
1
);
image_file_path
.
substr
(
image_file_path
.
find_last_of
(
OS_PATH_SEP
)
+
1
);
cv
::
imwrite
(
det_savepath
,
vis_img
,
compression_params
);
cv
::
imwrite
(
det_savepath
,
vis_img
,
compression_params
);
printf
(
"Visualized output saved as %s
\n
"
,
det_savepath
.
c_str
());
printf
(
"Visualized output saved as %s
\n
"
,
det_savepath
.
c_str
());
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录