Any library recommended for recognizing squares in an image? What do you recommend for recognizing squares in an image?

The data needed to know is:


Identify concrete squares.
Identify the pixel coordinates of (the edges of) the squares in the image.


A couple of examples:


20 squares identified.
For each square identify its pixel coordinates.





2 squares identified.
First square coordinates: (38, 124, 86, 187).
Second square coordinates: (88, 124, 136, 187).
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.