I went to the photo store not long ago and had dozens of rolls of negatives scanned, from a vacation to Europe 20 years ago. I uploaded them into Google Photos and it geotagged many of them automatically.
They have a public API that does the same, it detects landmarks in images and can give you a lat/long position for it as well as a confidence score.
They took 126 million geotagged images from the web, bined them into 26,000 squares, and trained a neural net to predict which square on the earth an image was taken in. That's very poor resolution, but if you see that 20 images taken around the same time are tagged as the square that contains San Francisco, you can be pretty sure they all happened during a trip to San Francisco.
Reminds me of https://geoguessr.com