/Captcha-Reader

Solving Golestan-Captchas by implementing Machine Learning Algorithms.

Primary LanguageJupyter NotebookMIT LicenseMIT

About project

This project started with Reading and Solving captchas from the Golestan site. Steps:

1) Collecting Captchas:

  • Collecting captchas using an API.

2) Getting captchas ready for the ML process:

  • Convert captcha backgrounds to black and white.
  • Split created picture to alphabet and digits by cropping the picture.

3) Implement Classification-Algorithms to make cropped pictures to text:

  • Train the handmade Dataset from Golestan captchas
  • Implement KNN to the trained dataset.
  • Save the model to the .sav file for decreasing the running time of the program.
  • Get the captcha's text as the output by 96% accuracy.

How to run?

Install the dependencies.

pip3 install -r requirements.txt

Train Dataset:

Run modelTrainer.py for train model using Datasets.

Solve captcha:

After the model created and saved in directory you should run captchaSolver.py for solving speciefic captcha.

Files and directories