How to train AI to recognize images and classify