Esempio n. 1
0
        /// <summary>
        /// Test the system on an unseen set of CAPTCHAs to see how it performs.
        /// </summary>
        /// <param name="folder">The folder which contains the images to test on. Each image MUST be named with the solution to the CAPTCHA.</param>
        /// <returns></returns>
        public PatternResult TestOnSet(string folder)
        {
            SolutionSet set = LoadSolutionSet(folder);

            if (set.Patterns.Count == 0)
            {
                set = CreateSolutionSet(folder);
            }

            return(Test(set));
        }
Esempio n. 2
0
        /// <summary>
        /// Train on a set of patterns a specified number of iterations.
        /// </summary>
        /// <param name="folder">The folder which contains the images to train on. Each image MUST be named with the solution to the CAPTCHA.</param>
        /// <param name="iterations">The number of iterations to train.</param>
        /// <returns></returns>
        public PatternResult TrainOnSet(string folder, int iterations)
        {
            SolutionSet set = LoadSolutionSet(folder);

            if (set.Patterns.Count == 0)
            {
                set = CreateSolutionSet(folder);
            }

            using (trainingProgress = new ConsoleProgress("Training "))
            {
                return(Train(set, iterations));
            }
        }
Esempio n. 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     trainer = captcha.LoadSolutionSet("test2");
 }
Esempio n. 4
0
 void captcha_OnSolverSetCreated(object sender, OnSolverSetCreatedEventArgs e)
 {
     tester = e.SolutionsSet;
     label1.Text = "Done";
 }
Esempio n. 5
0
 private void button5_Click(object sender, EventArgs e)
 {
     tester = captcha.LoadSolutionSet("test4");
 }
 /// <summary>
 /// Train on a set of patterns and call back when done.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <param name="iterations">The number of iterations to train.</param>
 /// <returns></returns>
 public void TrainAsync(SolutionSet set, int iterations)
 {
     solver.TrainAsync(set.Patterns, iterations);
 }
 /// <summary>
 /// Train on a set of patterns and call back when done.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <returns></returns>
 public void TrainAsync(SolutionSet set)
 {
     TrainAsync(set, 1);
 }
 /// <summary>
 /// Train on a set of patterns a specified number of iterations.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <param name="iterations">The number of iterations to train.</param>
 /// <returns></returns>
 public PatternResult Train(SolutionSet set, int iterations)
 {
     return solver.Train(set.Patterns, iterations);
 }
 /// <summary>
 /// Train on a set of patterns.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <returns></returns>
 public PatternResult Train(SolutionSet set)
 {
     return Train(set, 1);
 }
 /// <summary>
 /// Test the system on an unseen set of CAPTCHAs to see how it performs.
 /// </summary>
 /// <param name="set">The set to test on.</param>
 /// <returns></returns>
 public PatternResult Test(SolutionSet set)
 {
     return solver.Test(set.Patterns);
 }
Esempio n. 11
0
 /// <summary>
 /// Test the system on an unseen set of CAPTCHAs to see how it performs.
 /// </summary>
 /// <param name="set">The set to test on.</param>
 /// <returns></returns>
 public PatternResult Test(SolutionSet set)
 {
     return(solver.Test(set.Patterns));
 }
Esempio n. 12
0
 /// <summary>
 /// Train on a set of patterns and call back when done.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <param name="iterations">The number of iterations to train.</param>
 /// <returns></returns>
 public void TrainAsync(SolutionSet set, int iterations)
 {
     solver.TrainAsync(set.Patterns, iterations);
 }
Esempio n. 13
0
 /// <summary>
 /// Train on a set of patterns and call back when done.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <returns></returns>
 public void TrainAsync(SolutionSet set)
 {
     TrainAsync(set, 1);
 }
Esempio n. 14
0
 /// <summary>
 /// Train on a set of patterns a specified number of iterations.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <param name="iterations">The number of iterations to train.</param>
 /// <returns></returns>
 public PatternResult Train(SolutionSet set, int iterations)
 {
     return(solver.Train(set.Patterns, iterations));
 }
Esempio n. 15
0
 /// <summary>
 /// Train on a set of patterns.
 /// </summary>
 /// <param name="set">The set of patterns to train on.</param>
 /// <returns></returns>
 public PatternResult Train(SolutionSet set)
 {
     return(Train(set, 1));
 }