Any library recommended for recognizing squares in an image?
You might want to look into building convolutional neural network (CNN) for object detection using Keras. With plain white squares, it should work pretty good.