当前位置:网站首页>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边栏推荐
猜你喜欢

zsh: command not found: mysql

【PHP】tp6多表连接查询

Face key point detection

DDD 超越 MVC了吗

Automatic assembly & set injection

一个优酷VIP会员帐号可以几个人用的设备同时登录如何共享多人使用优酷会员账号?

工具及方法 - Excel插件XLTools

【模板记录】字符串哈希判断回文串

After 4 years of developing two-sided meituan, we finally lost: the interview question of volatile keyword function and principle
4. Some thoughts on asynctool framework
随机推荐
Several methods of face detection
PyTorch最佳实践和代码模板
Tools and methods - Excel plug-in xltools
仿射变换实现
[MCU simulation] (IV) addressing mode register addressing and direct addressing
【PHP】tp6多表连接查询
显而易见的事情
【单片机仿真】(十七)控制转移类指令 — 调用及返回指令
[MCU simulation] (II) keil installation tutorial
It's good to take more exercise
ncnn DataReader&Extractor&blob
D. Permutation Restoration(贪心/双指针/set)
Has DDD surpassed MVC
04_服务注册Eureka
【单片机仿真】(七)寻址方式 — 位寻址
ncnn paramdict&modelbin
Go语言 实现发送短信验证码 并登录
多锻炼身体有好处
Is there really no way out for functional testing? 10K capping is never a joke
DDD 超越 MVC了吗