You have to do a lot of research to solve these type of problems. I think that neural networks and machine learning are the best way... but it's a complex problem.
Considering that companies like Google are so good at this, why build your own photo site? Why not upload all the CC0 images to a public Google Photos library?
I like your question. Ok, you can use 500px, Flickr, Google and other sites... But... In my personal opinion, a developer should be curious. I'm a dev and, for this reason, I like to give myself a challenge. It's a good way to learn a lot, to discover new solutions, to meet new people, to improve my skills, to create something new. So... you can use Google Photos library or you can consider to create something different (because definitely your solution will be different from the others). It's a choice ;)