在前面系列博客基础上,来继续完善博客中的程序,使得c#可以通过调用python来完成模型的训练,训练完毕后可以实时预测一张图像的结果。
1.界面改为:

2. 代码中的引用类如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Collections;
using System.Net.Sockets;
using System.Threading;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;
3. 成员变量
本博客展示了如何使用C#通过调用Python来完成深度学习模型的训练和预测。在C#界面中,用户可以选择模型路径、训练数据路径,Python脚本在后台执行训练,完成后进行图像预测。C#控制台窗口会显示Python脚本的输出信息。提供的完整示例包括训练和预测的代码及所需配置文件,供读者参考和扩展。
订阅专栏 解锁全文
6640

被折叠的 条评论
为什么被折叠?



