The image processing for that is over my head. I am sure there are some people out there with a better skill set than me for this. I have trouble just recognizing any round object consistently.
I tried but the public domain image sets for pool balls are weak with just a few hundred images. I think to do it well someone would have to label tens of thousands of images with balls of different styles, in different lighting conditions, and with different cloth colors.