Exemple #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));
        }
Exemple #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));
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {
     trainer = captcha.LoadSolutionSet("test2");
 }
 void captcha_OnSolverSetCreated(object sender, OnSolverSetCreatedEventArgs e)
 {
     tester = e.SolutionsSet;
     label1.Text = "Done";
 }
 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);
 }
Exemple #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));
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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));
 }
Exemple #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));
 }