文章预览
效果 模型信息 Inputs ------------------------- name:input tensor:Float[1, 3, 256, 256] --------------------------------------------------------------- Outputs ------------------------- name:output tensor:Float[1, 3, 256, 256] --------------------------------------------------------------- 项目 VS2022 .net framework 4.8 OpenCvSharp 4.8 Microsoft.ML.OnnxRuntime 1.16.2 代码 using Microsoft.ML.OnnxRuntime; using Microsoft.ML.OnnxRuntime.Tensors; using OpenCvSharp; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Windows.Forms; namespace 人像卡通化 { public partial class Form1 : Form { public Form1 () { InitializeComponent(); } string fileFilter = "图片|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png" ; string image_path = "" ; string startupPath;
………………………………