-
Notifications
You must be signed in to change notification settings - Fork 61
编译手册 v1.1.0
taotianran edited this page Jan 30, 2023
·
8 revisions
大家可以在本机编译,我们也提供了部分平台的docker环境,也可以下载docker镜像进行编译:Docker安装(可选)
# 克隆代码
git clone git@github.com:PaddlePaddle/FlyCV.git
git checkout <branch name or tag name>
# 设置NDK路径
export ANDROID_NDK=${NDK_PATH}
# 编译
cd FlyCV
./scripts/android/build.sh
# 拉取docker镜像
docker pull flycv/x86_64:android
# 建立交互终端(宿主机执行)
docker run --name=flycv_android -i -t -v `pwd`:/io flycv/x86_64:android /bin/bash
# 拷贝flycv至容器(宿主机执行)
docker cp ./flycv flycv_android:/root
# 激活环境变量(容器内执行)
source /etc/ndk/r17c.env
# 执行编译(容器内执行)
cd /root/flycv/
./scripts/android/build.sh
# 编译产物拷贝至本地(宿主机执行)
docker cp flycv_android:/root/flycv/install/ ./
# 克隆代码
git clone git@github.com:PaddlePaddle/FlyCV.git
git checkout <branch name or tag name>
# 编译
cd FlyCV
./scripts/armlinux/build.sh
# 克隆代码
git clone git@github.com:PaddlePaddle/FlyCV.git
git checkout <branch name or tag name>
# 编译
# 如果你的机器是X86架构,执行下面的编译脚本
cd FlyCV
./scripts/macos/build_x86.sh
# 如果你的机器是arm架构,执行下面的编译脚本
./scripts/macos/build_arm.sh
# 克隆代码
git clone git@github.com:PaddlePaddle/FlyCV.git
git checkout <branch name or tag name>
# 编译
# 生成sln方案,使用visual studio进行编译
./scripts/windows/build.sh
# 使用Visual Studio打开解决方案,进行编译
# 克隆代码
git clone git@github.com:PaddlePaddle/FlyCV.git
git checkout <branch name or tag name>
# 编译
./scripts/linux/build.sh
编译选项 | 默认值 | 描述 |
---|---|---|
📃 FLYCV_NAMESPACE | flycv | 可以自定义命名空间,在cmake编译选项里加上 -DFLYCV_NAMESPACE=xxx 即可 |
编译选项 | 默认值 | 描述 |
---|---|---|
🗂️ BUILD_FCV_CORE | ON | 核心模块不可设置关闭 |
🗂️ BUILD_FCV_IMG_TRANSFORM | ON | 图像转换模块 |
📃 WITH_FCV_COLOR_CONVERT | ON | 颜色空间转换功能 |
📃 WITH_FCV_RESIZE | ON | 图像缩放 |
📃 WITH_FCV_WARP_AFFINE | ON | 仿射变换 |
📃 WITH_FCV_WARP_PERSPECTIVE | ON | 透视变换 |
📃 WITH_FCV_ROTATION | ON | 图像旋转 |
📃 WITH_FCV_FLIP | ON | 图像翻转 |
📃 WITH_FCV_SUBTRACT | ON | 图像相减 |
📃 WITH_FCV_COPY_MAKE_BORDER | ON | 边界填充 |
📃 WITH_FCV_CROP | ON | 抠图 |
📃 WITH_FCV_REMAP | ON | 重映射 |
📃 WITH_FCV_ADD_WEIGHTED | ON | 图像融合 |
📃 WITH_FCV_EXTRACT_CHANNEL | ON | 特定通道提取 |
🗂️ BUILD_FCV_IMG_CALCULATION | ON | 图像计算模块 |
📃 WITH_FCV_MATRIX_MUL | ON | 矩阵乘 |
📃 WITH_FCV_NORM | ON | 范数计算 |
📃 WITH_FCV_MEAN | ON | 均值计算 |
📃 WITH_FCV_MIN_AREA_RECT | ON | 最小外接矩形 |
📃 WITH_FCV_MIN_MAX_LOC | ON | 获取最小、最大点坐标 |
📃 WITH_FCV_CONNECTED_COMPONENTS | ON | 计算连通域 |
📃 WITH_FCV_FIND_HOMOGRAPHY | ON | 计算二维点对映射 |
🗂️ BUILD_FCV_FUSION_API | ON | 融合算子模块 |
📃 WITH_FCV_BGR_TO_RGBA_WITH_MASK | ON | bgr合并mask转rgba |
📃 WITH_FCV_NORMALIZE_TO_SUBMEAN_TO_REORDER | ON | 图像减均值,归一化,通道顺序变换 |
📃 WITH_FCV_SPLIT_TO_MEMCPY | ON | 通道分离和拷贝 |
📃 WITH_FCV_Y420SP_TO_RESIZE_TO_BGR | ON | yuv数据缩放且转换为BGR数据 |
📃 WITH_FCV_BGRA_TO_RESIZE_TO_BGR | ON | bgra缩放和转换位bgr |
🗂️ BUILD_FCV_MATH_OPERATOR | ON | 基本数学运算 |
📃 WITH_FCV_VECTOR_OPERATOR | ON | 向量计算 |
🗂️ BUILD_FCV_MEDIA_IO | ON | 多媒体IO操作 |
📃 WITH_FCV_IMGCODECS | ON | 图像编解码 |
📃 WITH_LIB_JPEG_TURBO | ON | 支持jpg |
📃 WITH_LIB_PNG | ON | 支持png |
🗂️ BUILD_FCV_IMG_DRAW | ON | 图形绘制 |
📃 WITH_FCV_FILL_POLY | ON | 多边形绘制和填充 |
📃 WITH_FCV_POLY_LINES | ON | 多边形绘制 |
📃 WITH_FCV_CIRCLE | ON | 圆形绘制 |
📃 WITH_FCV_LINE | ON | 线绘制 |
编译选项 | 默认值 | 描述 |
---|---|---|
🚀 ENABLE_SSE | ON | 开启SSE指令集优化(仅支持x86架构) |
🚀 ENABLE_AVX | ON | 开启AVX指令集优化(仅支持x86架构) |
🚀 ANDROID_ARM_NEON | ON | 开启neon指令集优化(仅支持arm架构) |
🚀 ENABLE_NEON | ON | 开启neon指令集优化(仅支持arm架构) |
🚀 ENABLE_SVE2 | OFF | 开启SVE2指令集优化(仅支持arm架构) |
编译选项 | 默认值 | 描述 |
---|---|---|
🔖 BUILD_TEST | ON | 开启单元测试编译 |
🔖 BUILD_BENCHMARK | ON | 开启性能测试编译 |
🔖 BUILD_SAMPLES | ON | 开启demo编译 |