Search code examples
pythonimage-processingimage-recognition

Identify chess piece from image in python


I have images of the following type

enter image description here

etc..

What would be the easiest way of identifying what piece it is and if it is black or white? Do I need to use machine learning or is there an easier way?


Solution

  • It depends on your inputs. If all of your data looks like this (nice and clean, with contours being identical, just background and color changes), you could probably use some kind of pixel + color matching and you could be good to go.

    You definitely know that deep learning and machine learning only approximate function (functions of pixels in this case), if you can find it (the function) without using those methods (with sensible amount of work), you always should.

    And no, machine learning is not a silver bullet, you get an image and you throw it into convolutional neural networks black-box magic and you get your results, that's not the point.