Sudoku Solver – 1

I was very much excited to solve the Sudoku puzzles that appeared in daily newspapers during childhood. In fact it’s a lot of fun solving them and even we (my friends) challenge ourselves to solve them first. By then we don’t know programming and other stuff, so we were not aware of finding the solution with ease. But when I was learning Data Structures and Algorithms long back I got encountered with the famous Backtracking algorithm and yes, solving a sudoku puzzle is one among the challenges that can be solved easily using that algorithm. Continue reading

Recognize Handwritten digits – 2

This post is going to be a long one and you may ask why don’t I split this up? And yes there is a reason for that, it would be better to complete all the details in this post at once rather than taking a break as you may get lost overtime. So getting to the point, in the last post we were able to segment the individual digits from the image. In this post we will develop a model to recognize those individual digits. Continue reading

Recognize Handwritten digits – 1

Recognizing handwritten digits is an easy task and I feel this would be a good one to start with. So coming straight to the point, this post is broken down into 2 parts to make it easy for understanding. The general handwritten digit pipeline can be explained as

  • Preprocessing
  • Segmentation
  • Recognition

In this part we will discuss about the first two, i.e., preprocessing and segmentation. To just give you an idea what is going to be the outcome of this complete post is shown below.

output Continue reading

Code a Neural Network

Though the underlying concepts that are required to build and train a neural network are difficult, It is very easy to implement it in code. So in this post, let’s

  • Code a neural network by hand
  • Use keras to build a neural network

Firstly let’s see how can we build our own neural network with just raw python code. For this let’s assume our task is to build a model that just XOR the input. It might seem very easy but believe me, it is the first difficult step in training any neural network as the XOR itself is not linear i.e it is non-linear. Continue reading