当前位置:网站首页>ncnn 推理框架安装;onnx转ncnn
ncnn 推理框架安装;onnx转ncnn
2022-07-15 17:58:00 【loong_XL】
参考:
https://zhuanlan.zhihu.com/p/394762128
1、安装(ubuntu测试、安装opencv对应包libopencv-dev)
参考:https://github.com/Tencent/ncnn/wiki/how-to-build#build-for-linux
## 前置关联包安装(如果安装过程有错误,可以 sudo apt-get update后再运行)
sudo apt install build-essential git cmake libprotobuf-dev protobuf-compiler libvulkan-dev vulkan-utils libopencv-dev
## 下载git项目
git clone https://github.com/Tencent/ncnn.git
## 编译
cd ncnn
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. ###这步运行如果OpenCV没安好,一些案例后面会用不了,索引需要重新去安装OpenCV后再来cmake编译,参考https://blog.csdn.net/sinat_29957455/article/details/108830085
make -j32
测试(这个如果前面OpenCV没安装好编译后这个案例会运行不了报错)
cd ../examples
../build/examples/squeezenet ../images/256-ncnn.png

性能测试
cd ../benchmark
## 第四个参数是 GPU deive index
## 若要使用 CPU,设置第五个参数为 -1
../build/benchmark/benchncnn 10 32 0 0

2、onnx转ncnn(用编译后的转换工具)
进入ncnn/build/tools/onnx下
./onnx2ncnn /data/loong/triton_test/model_repository/clip_onnx/1/model.onnx model.param model.bin

边栏推荐
- VxWorks environment construction and learning
- [detailed tutorial] a thorough article on mongodb aggregation query
- Swift custom subscript
- Is the sub database and sub table really suitable for your system? Talk about how to select sub databases, sub tables and newsql
- i. Mx6ull driver development | 30 - use EC20 4G network card (migrate gobinet driver)
- 307·区域和检索-数组可修改
- Two way merge sort summary
- (zero six) flask is OK if you have hands - configure static files
- Lifecycle: the foundation of lifecycle aware components - jetpack series (1)
- Vscode [because scripts are not allowed to run on this system]
猜你喜欢

How to set the allure test report

406 · rebuild the queue according to height · greed

Anhui University store

Torch in pytoch Argmax() function parsing

LDAP introduction

#夏日挑战赛# HarmonyOS 实现一个手绘板

Matlab: build neural network

Torch in pytoch Repeat() function parsing

Vscode default new directory overlap

数百亿数据压缩至 600GB,TDengine 落地协鑫能科移动能源平台
随机推荐
The physical meaning of Fourier transform
JVM memory scaling
测试光流传感器速度特性
在 SQL Server 中查找活动的 SQL 连接
Basic knowledge of capacitance
Software architecture and design (V) -- data centric architecture
How to set the allure test report
Anhui University store
#夏日挑战赛# HarmonyOS 实现一个手绘板
Is it true or false that blue collar workers are sleepy and live broadcasting is needed?
This year, how many war investment departments have become "decorations"
Log in and operate the database with the command line
(零六)Flask有手就行——配置静态文件
競賽·6116·計算布爾二叉樹的值·遞歸
Software architecture and design (IX) -- component based architecture
薄膜铜箔导电电位测量
Swift value type and reference type
From March to June, after summary, more than 200 pages of true question notes and detailed explanations (including core test sites and 6 major factories)
EasyGBS平台编辑设备管理分组时,出现崩溃该如何解决?
EasyCVR视频调阅页面如何增加对应视频的云台控制?