Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleX
提交
a953dcb3
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看板
提交
a953dcb3
编写于
7月 28, 2020
作者:
J
jack
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use jetson opencv lib instead of ours
上级
4e05c9a9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
19 deletion
+11
-19
deploy/cpp/CMakeLists.txt
deploy/cpp/CMakeLists.txt
+9
-2
deploy/cpp/scripts/jetson_bootstrap.sh
deploy/cpp/scripts/jetson_bootstrap.sh
+0
-10
deploy/cpp/scripts/jetson_build.sh
deploy/cpp/scripts/jetson_build.sh
+2
-7
未找到文件。
deploy/cpp/CMakeLists.txt
浏览文件 @
a953dcb3
...
...
@@ -17,7 +17,6 @@ SET(OPENCV_DIR "" CACHE PATH "Location of libraries")
SET
(
ENCRYPTION_DIR
""
CACHE PATH
"Location of libraries"
)
SET
(
CUDA_LIB
""
CACHE PATH
"Location of libraries"
)
if
(
NOT WIN32
)
set
(
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
...
...
@@ -111,10 +110,17 @@ if (WIN32)
find_package
(
OpenCV REQUIRED PATHS
${
OPENCV_DIR
}
/build/ NO_DEFAULT_PATH
)
unset
(
OpenCV_DIR CACHE
)
else
()
find_package
(
OpenCV REQUIRED PATHS
${
OPENCV_DIR
}
/share/OpenCV NO_DEFAULT_PATH
)
if
(
${
CMAKE_SYSTEM_PROCESSOR
}
STREQUAL
"aarch64"
)
# x86_64 aarch64
set
(
OpenCV_INCLUDE_DIRS
"/usr/include/opencv4"
)
file
(
GLOB OpenCV_LIBS /usr/lib/aarch64-linux-gnu/libopencv_*
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
message
(
"OpenCV libs:
${
OpenCV_LIBS
}
"
)
else
()
find_package
(
OpenCV REQUIRED PATHS
${
OPENCV_DIR
}
/share/OpenCV NO_DEFAULT_PATH
)
endif
()
include_directories
(
"
${
PADDLE_DIR
}
/paddle/include"
)
link_directories
(
"
${
PADDLE_DIR
}
/paddle/lib"
)
endif
()
include_directories
(
${
OpenCV_INCLUDE_DIRS
}
)
if
(
WIN32
)
...
...
@@ -276,6 +282,7 @@ if (NOT WIN32)
endif
()
set
(
DEPS
${
DEPS
}
${
OpenCV_LIBS
}
)
add_library
(
paddlex_inference SHARED src/visualize src/transforms.cpp src/paddlex.cpp
)
ADD_DEPENDENCIES
(
paddlex_inference ext-yaml-cpp
)
target_link_libraries
(
paddlex_inference
${
DEPS
}
)
...
...
deploy/cpp/scripts/jetson_bootstrap.sh
已删除
100644 → 0
浏览文件 @
4e05c9a9
# download pre-compiled opencv lib
OPENCV_URL
=
https://bj.bcebos.com/paddlex/deploy/tools/opencv3_aarch.tgz
if
[
!
-d
"./deps/opencv3"
]
;
then
mkdir
-p
deps
cd
deps
wget
-c
${
OPENCV_URL
}
tar
xvfz opencv3_aarch.tgz
rm
-rf
opencv3_aarch.tgz
cd
..
fi
deploy/cpp/scripts/jetson_build.sh
浏览文件 @
a953dcb3
...
...
@@ -14,15 +14,11 @@ WITH_STATIC_LIB=OFF
# CUDA 的 lib 路径
CUDA_LIB
=
/usr/local/cuda/lib64
# CUDNN 的 lib 路径
CUDNN_LIB
=
/usr/l
ocal/cuda/lib64
CUDNN_LIB
=
/usr/l
ib/aarch64-linux-gnu
# 是否加载加密后的模型
# 是否加载加密后的模型
(jetson版本预测库暂不支持模型加密)
WITH_ENCRYPTION
=
OFF
# OPENCV 路径, 如果使用自带预编译版本可不修改
sh
$(
pwd
)
/scripts/jetson_bootstrap.sh
# 下载预编译版本的opencv
OPENCV_DIR
=
$(
pwd
)
/deps/opencv3
# 以下无需改动
rm
-rf
build
mkdir
-p
build
...
...
@@ -38,5 +34,4 @@ cmake .. \
-DCUDA_LIB
=
${
CUDA_LIB
}
\
-DCUDNN_LIB
=
${
CUDNN_LIB
}
\
-DENCRYPTION_DIR
=
${
ENCRYPTION_DIR
}
\
-DOPENCV_DIR
=
${
OPENCV_DIR
}
make
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录