Recycling facilities everywhere use tech like this (near infrared) at an industrial scale [0], and sorting robots that use AI is a rapidly growing industry [1]
[0] https://www.youtube.com/watch?v=f0OZ7Mlmkvk [1] https://www.youtube.com/watch?v=ZlLy-gT0n_k