Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleX
提交
f0b25dd4
P
PaddleX
项目概览
PaddlePaddle
/
PaddleX
通知
138
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
43
列表
看板
标记
里程碑
合并请求
5
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleX
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
43
Issue
43
列表
看板
标记
里程碑
合并请求
5
合并请求
5
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f0b25dd4
编写于
7月 01, 2020
作者:
J
Jason
提交者:
GitHub
7月 01, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #182 from joey12300/develop
add openmp flag in windows
上级
1c273121
59d1e941
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
7 deletion
+16
-7
deploy/cpp/CMakeLists.txt
deploy/cpp/CMakeLists.txt
+8
-0
deploy/cpp/CMakeSettings.json
deploy/cpp/CMakeSettings.json
+0
-5
deploy/cpp/demo/detector.cpp
deploy/cpp/demo/detector.cpp
+7
-1
docs/tutorials/deploy/deploy_server/deploy_cpp/deploy_cpp_win_vs2019.md
.../deploy/deploy_server/deploy_cpp/deploy_cpp_win_vs2019.md
+1
-1
未找到文件。
deploy/cpp/CMakeLists.txt
浏览文件 @
f0b25dd4
...
...
@@ -114,6 +114,14 @@ include_directories(${OpenCV_INCLUDE_DIRS})
if
(
WIN32
)
add_definitions
(
"/DGOOGLE_GLOG_DLL_DECL="
)
find_package
(
OpenMP REQUIRED
)
if
(
OPENMP_FOUND
)
message
(
"OPENMP FOUND"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
OpenMP_C_FLAGS
}
"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS_RELEASE
}
${
OpenMP_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
${
OpenMP_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
${
OpenMP_CXX_FLAGS
}
"
)
endif
()
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
/bigobj /MTd"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS_RELEASE
}
/bigobj /MT"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
/bigobj /MTd"
)
...
...
deploy/cpp/CMakeSettings.json
浏览文件 @
f0b25dd4
...
...
@@ -26,11 +26,6 @@
"value"
:
""
,
"type"
:
"PATH"
},
{
"name"
:
"CMAKE_BUILD_TYPE"
,
"value"
:
"Release"
,
"type"
:
"STRING"
},
{
"name"
:
"WITH_STATIC_LIB"
,
"value"
:
"True"
,
...
...
deploy/cpp/demo/detector.cpp
浏览文件 @
f0b25dd4
...
...
@@ -56,7 +56,6 @@ int main(int argc, char** argv) {
std
::
cerr
<<
"--image or --image_list need to be defined"
<<
std
::
endl
;
return
-
1
;
}
std
::
cout
<<
"Thread num: "
<<
FLAGS_thread_num
<<
std
::
endl
;
// 加载模型
PaddleX
::
Model
model
;
model
.
Init
(
FLAGS_model_dir
,
...
...
@@ -132,9 +131,16 @@ int main(int argc, char** argv) {
}
}
}
else
{
auto
start
=
system_clock
::
now
();
PaddleX
::
DetResult
result
;
cv
::
Mat
im
=
cv
::
imread
(
FLAGS_image
,
1
);
model
.
predict
(
im
,
&
result
);
auto
end
=
system_clock
::
now
();
auto
duration
=
duration_cast
<
microseconds
>
(
end
-
start
);
total_running_time_s
+=
static_cast
<
double
>
(
duration
.
count
())
*
microseconds
::
period
::
num
/
microseconds
::
period
::
den
;
// 输出结果目标框
for
(
int
i
=
0
;
i
<
result
.
boxes
.
size
();
++
i
)
{
std
::
cout
<<
"image file: "
<<
FLAGS_image
<<
std
::
endl
;
std
::
cout
<<
", predict label: "
<<
result
.
boxes
[
i
].
category
...
...
docs/tutorials/deploy/deploy_server/deploy_cpp/deploy_cpp_win_vs2019.md
浏览文件 @
f0b25dd4
...
...
@@ -106,7 +106,7 @@ yaml-cpp.zip文件下载后无需解压,在cmake/yaml.cmake中将`URL https://
上述`
Visual Studio 2019
`编译产出的可执行文件在`
out
\b
uild
\x
64-Release
`目录下,打开`
cmd
`,并切换到该目录:
```
d
:
D
:
cd D:\projects\PaddleX\deploy\cpp\out\build\x64-Release
```
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录