I love the Amazon X-Ray feature. I wonder if they patented it, because I’m surprised other players like Netflix or cable providers are not offering something similar. I personally find it adds a lot to my viewing experience without being too intrusive.
Amazon owns IMDb. They have been gathering data about actors for literally decades. They probably have well-trained machine learning models to identify actors on screen.
It's really not that hard since they can run it against a narrowed down dataset with the names of the cast.