当前位置:网站首页>Bisenetv2 face segmentation ncnn reasoning
Bisenetv2 face segmentation ncnn reasoning
2022-07-19 03:13:00 【HySmiley】
1、onnx turn ncnn
onnx2ncnn.exe BiSeNetV2_sim.onnx BSNs.param NSNs.bin2、ncnn Reasoning
#include<iostream>
#include<opencv2/opencv.hpp>
#include<net.h>
#include <stdio.h>
int main()
{
cv::Mat img = cv::imread("../asserts/4.png");
cv::cvtColor(img,img,cv::COLOR_BGR2RGB);
ncnn::Net net;
// Load parameters before loading models
net.load_param("../asserts/BSNs.param");
net.load_model("../asserts/BSNs.bin");
ncnn::Mat input = ncnn::Mat::from_pixels_resize(img.data, ncnn::Mat::PIXEL_RGB, img.cols,img.rows,512,512);
const float mean_vals[3] = { 0.485f * 255.f, 0.456f * 255.f, 0.406f * 255.f };//123,117,104
const float norm_vals[3] = { 1 / 0.229f / 255.f, 1 / 0.224f / 255.f, 1 / 0.225f / 255.f };//0.017,0.017,0.017
input.substract_mean_normalize(mean_vals, norm_vals);
//std::cout << "data_shape:" << data.d << "," << data.c << "," <&l边栏推荐
猜你喜欢

Polynomial interpolation fitting (II)

04_服务注册Eureka

zsh: command not found: mysql

MySQL storage engine details
![[template record] string hash to judge palindrome string](/img/90/43109c6bd008990fa5b8147e629685.png)
[template record] string hash to judge palindrome string

Mysql多表查询

Can't access this website can't find DNS address DNS_ PROBE_ What about started?

Authentication code for wireless

3. Asynctool framework principle source code analysis

4年开发二面美团最终败给:volatile关键字作用和原理这道面试题
随机推荐
[MCU simulation] (VI) addressing mode - index addressing and relative addressing
4. Some thoughts on asynctool framework
通过Dao投票STI的销毁,SeekTiger真正做到由社区驱动
Multi table query - case exercise
[MCU simulation] (XXI) dB (define byte) - define byte
[MCU simulation] (IX) instruction system - add, ADDC, sub, Inc, Dec, Da of arithmetic operation instructions
C语言基础Day4-数组
Go语言 实现发送短信验证码 并登录
It's good to take more exercise
[MCU simulation] (XVI) control transfer instructions - unconditional transfer instructions, conditional transfer instructions
[MCU simulation] (V) addressing mode - immediate addressing and register indirect addressing
【单片机仿真】(十六)控制转移类指令 — 无条件转移指令、条件转移指令
需要慢一点点
Tools and methods - Excel plug-in xltools
LETV has more than 400 employees? Living a fairy life without a boss, the official responded
【回归预测】基于粒子滤波实现锂离子电池寿命预测附matlab代码
4年开发二面美团最终败给:volatile关键字作用和原理这道面试题
In depth understanding of machine learning - unbalanced learning: sample sampling technology - [smote sampling method and borderline smote sampling method of manual sampling technology]
工具及方法 - Excel插件XLTools
SysTick定时器的基础学习以及手撕代码