Yes, this is a image recognition process that has been done in multiple ways before. I would suggest looking up relevant literature for inspiration and browsing around competition sites like Kaggle or Zindi to get access to datasets!
The coolest project I have worked on probably was something I did with a startup to recognize different hairtypes and hairstyles!