Image similarity questions are very common in e-commerce and fashion. This is particular the case with the question of similar colours. I based the following on the excellent work by my friend Thomas Hunger. My implementation has only a few alterations compared to his, but I felt it was worth putting online even if I’m not claiming any originality.
There are many improvements that would be made in a real industrial case, but I found this a good education exercise especially since I don’t have a lot of experience with image analysis and such similarity problems.
I hope you enjoy this too.