Example #1
0
        private unsafe void button2_Click(object sender, EventArgs e)
        {
            CC.TraindEventCallback func = new CC.TraindEventCallback(trainCallback);
            CC.setTraindEventCallback(func);

            Thread t = new Thread(new ThreadStart(run));

            t.Start();
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            IntPtr model = CC.createClassifier("deploy.prototxt", "nin_iter_16000.caffemodel");

            byte[] img     = readFile("测试图片.png");
            IntPtr softmax = CC.predictSoftmax(model, img, img.Length);

            int[] label = new int[4];

            CC.getMultiLabel(softmax, label);
            MessageBox.Show("识别结果是: " + getLabelString(label));

            CC.releaseSoftmaxResult(softmax);
            CC.releaseClassifier(model);
        }
Example #3
0
 public unsafe void convertImageSet()
 {
     CC.convert_imageset("./ label-train.txt train_lmdb --shuffle=true --resize_width=224 --resize_height=224", new CC.ConvertImageSetEventCallback(convertImageSetCallback));
 }
Example #4
0
 public void run()
 {
     CC.train_network("train --solver=solver.prototxt");
 }