CNN model to solve CAPTCHA's
Ashish Agrawal
Jaipur, Rajasthan
- 0 Collaborators
My Project is on the CNN model to solve specific CAPTCHAs. In this Project, I build a model that can predict the CAPTCHA using the convolutional neural network (CNN). Using python scripts and downloaded around 600k images as dataset on GPU. I have done this project with my friend Sailok Chinta. ...learn more
Project status: Under Development
Overview / Usage
A Neural network model that will predict the text present in the image when given as an input. This model is used to solve CAPTCHAs. With the help of CAPTCHA solver, we can automate our downloading from different sites. There is a requirement of lots of data of images to make this model more accurate.
Methodology / Approach
Image Data collection
In order to collect the data, we ran a python script that hits the website, takes a snapshot of the website and crops the image to the part where captcha is present. This is done by trial and error method where the dimensions of captcha image were found out after a certain number of tries and these values don't change. All these images are cropped and saved in a folder that makes our dataset. Below shown is an example of a raw captcha image.
Preprocessing of Data
Now that all the images have been collected they need to be cleaned. So the first step is to remove the noise present in these images. It can be observed that in the image there are noise pixels of grey color, hence in order to remove them, we applied a threshold technique where the pixels are given white color if they fall in between any particular range of pixel intensities. After thresholding the images, they are converted to a Black and White image. We chose to do this as already the image has letters in black color and by converting we reduce the number of channels of the image, which in turn reduces the load of data set that is to be trained. But a problem has occurred as there are thick gray noise pixels are passing through the black pixel areas, they create gaps when we threshold the image based on pixel intensities. In order to counterbalance this effect, we have used a technique called Opening.
Opening is a morphological image processing technique that is used to restore an image from a previous image where the pixel intensities are disturbed due to some noise particles. Opening consists of two operations. They are Erosion and Dilation.