How to build a coin recognition tool?

I want to build a coin recognition tool for my personal project. I have obverse and reverse images of 300k coins. Users will upload two images and the API will try to find a match. How can I achieve this?