I actually registered just to respond to this post. I'm a software engineer with experience in backend web development (mostly Python, including Django, Flask, etc.), embedded software, Linux, and more recently, machine vision. I wrote and trained an ML model last year to sort 5.56 brass by headstamp, and it does so with 100% accuracy based on my validation data.
Here are some samples that were all correctly classified. https://imgur.com/a/90eSE
The code is open source, and freely available here: https://github.com/jakogut/brass-sorter
It was actually rather easy, and it's quite quick, even on an RPi 3 (even faster on many other inexpensive SBCs out there). If memory serves, it takes about a tenth of a second to classify each piece of brass, but don't quote me on that.
I haven't spent much time or effort on the mechanical side of this, because it's not my strong suite, but if somebody could build a machine that could be controlled by an RPi, I could write all the software to make it happen. It would be really neat if the parts could be 3D printed, and the machine could be built for a couple hundred bucks. I'm also very experienced with (and an active contributor to) Buildroot, and I could make a set of scripts to build a firmware image automatically that would be easy for DIYers to install.
I'd be willing to do this work and open source it, if some of you want to work on the hardware side of things.