Mathematica has a built-in function called MorphologicalGraph.
The open source image analysis software Fiji can do this too. The rough steps are:
Smoothen the image if needed
Threshold the image to make it binary
Process -> Binary -> Skeletonize
Analyze -> Skeleton -> Analyze Skeleton, tick Show Detailed Info. When a table comes up, save it as CSV.
On the Tensorflow Github site there are pretrained models, some of which are based on Image collections. I think with some digging you'll find more.
Here is one available as a NodeJS model: MobileNet - Classify images with labels from the ImageNet database.
`npm i @tensorflow-models/mobilenet`
I haven't used it personally though. A while back, at a ...
You can indeed do this sort of task with a Raspberry Pi, Python and OpenCV there are a number of write-ups on how to do this on the PyImageSearch site such as https://www.pyimagesearch.com/2017/02/13/recognizing-digits-with-opencv-and-python/ (dealing with number recognition) and https://www.pyimagesearch.com/2018/08/20/opencv-text-detection-east-text-...
There are some programs that work decently enough. Unfortunately, one of them is (I think) no longer under development. It is a pity.
VisiPics rates the similarity using colors. http://www.visipics.info/index.php?title=Main_Page
Pixiple give you also similar images, this can be handy to detect the same image with some changes in cropping or rotation but ...