在前面系列博客基础上,来继续完善博客中的程序,使得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. 成员变量如下: