Jump to content
Brian Enos's Forums... Maku mozo!

FingerBlaster

Classified
  • Posts

    73
  • Joined

  • Last visited

Everything posted by FingerBlaster

  1. I tried, it jams and stalls more frequently. It isn't due to the weight of the cases, something is mechanically jamming the case plate. If i try to manually spin it forwards you can feel something is bound up and it won't go without a fair bit of force, but if i spin backwards a bit, then forwards it's fine.
  2. I'm done accepting people to beta test for now. Everyone who messaged me or posted here will get access to the files once I'm ready to share, i'm hoping by next weekend. I tried to run some .223 through it since i know a lot of you are more interested in rifle brass, and it wasn't as good as i hoped with the last design revision. Have to make yet another tweak. @Hansimania send me a PM so I can keep track of you once i'm ready. My main focus with the little time i had this weekend has been the Image classification, and a bug i was dealing with. I'm making progress, and now i feel like if i get a lot more training data things should continue to improve and get more accurate. The current stats are at the bottom of the post in code block text. Probability threshold means how confident the computer is in the classification being a match to one of the available classes. If it sees a peice of brass that's brand new. Say it sees some starline brass and it's never seen that before, it's still going to try to categorize it to the known classes. Right now my logic send matches over a certain threshold to their buckets if that headstamp has a bucket assigned. If no bucket is assigned it still goes to the mixed brass bucket. Anything under that threshold will go to the mixed bucket no matter what. Example: Let's look at the below block that says 95%. So what this means is assume i set the probably threshold to 95%, what do my results mean? Correct above 95%: that means 363 pieces of brass, or 75% of the total brass was above the Threshold 95%, and went to the the right output. IE 'FC' Brass went to the 'FC' bucket, but if it was Tula brass and i had no bucket assigned for Tula brass, it still goes to the mixed bucket. Correct below X: that means 68 pieces or 14% of the total was below the Threshold %, even though the computer guessed right, the probability was too low so it went to the mixed bucket no matter what. IE the computer guess that FC brass was in fact FC, but wasn't "super confident", so to be cautious it sent it to the mixed brass bucket. InCorrect above X: That means 5 pieces or 1% of the brass went to the wrong bucket. The computer was "really sure", but it was wrong. It was "really sure" that a piece of Winchester brass was FC Brass and thus sent it to the FC brass bucket. It made a mistake. InCorrect below X: 43 peices or 8% of the total: the guess was wrong and the probability was low so it went to the mixed bucket. So the computer guessed that Winchester was FC, but it wasn't sure, so it went to the mixed brass bucket. Or maybe it saw a piece of brass it hasn't been trained on, like Starline, and it was only 50% sure so it sent it to the mixed bucket. One of the incorrect peices of brass was in fact a "new" headstamp, it was PMP, and it was around 96% sure that it was PMC. and sent it to the PMC bucket. So in this 95% example you could say it sorted 76.8% of the brass ran through it with a 1.35% error rate. Out of 479 pieces of brass, 363 + 5 = 368 pieces were above the Threshold value. 368/479 = 76.8%. 5 out of 368 were wrong, 5/368 = 1.35%. You will be able to set the threshold to whatever you want. For example if i set it to 99%, 95%, 90% or 80% here's what i would look like. As i get more training data my hope is that the results will improve. 99% Total 479 Correct above 99%: 319 Percent 66 % Correct below 99%: 112 Percent 23 % InCorrect above 99%: 1 Percent 0 % InCorrect below 99%: 47 Percent 9 % 95% Total 479 Correct above 95%: 363 Percent 75 % Correct below 95%: 68 Percent 14 % InCorrect above 95%: 5 Percent 1 % InCorrect below 95%: 43 Percent 8 % 90% Total 479 Correct above 90%: 383 Percent 79 % Correct below 90%: 48 Percent 10 % InCorrect above 90%: 11 Percent 2 % InCorrect below 90%: 37 Percent 7 % 80% Total 479 Correct above 80%: 402 Percent 83 % Correct below 80%: 29 Percent 6 % InCorrect above 80%: 18 Percent 3 % InCorrect below 80%: 30 Percent 6 %
  3. @assnolaxSend me a PM and we'll discuss tomorrow. I'm using an Nvidia Jetson now, along with an arducam and a low power microscope lens. You could make it work with a pi hq cam, you'll just have to tweak the image capture code, shouldn't be too bad. I'm using the adafruit servo hat so that works too. I just ran a small sample set and I think i just got image classification up to an honest 85% accuracy. I only tested on 40 images, but it's looking promising.
  4. So far so good with the servos. I'm testing the 2 different types and having no issues, if one will outlast the other remains to be seen. It took a while before the dc motor board burned out. I have 2 more design tweaks to make to the cad file. Nothing major, but i think i'll be ready to share the designs from there. So here's the magic question. Is anyone interested in helping beta testing this? You need a 3d printer, minor carpentry skils, a few hundred dollars disposable income, and some linux skills: know how to use ssh, scp, navigate around a bash shell, that sort of stuff. The Image classification still isn't working to my satisfaction, and now that I changed cameras/lenses I'm retaking all of the images to see if that helps. If I can get someone else to help by imaging and tagging a bucket of their brass it'll be a big help. My main focus is still on 9mm. Once i get a Model that's pretty accurate I plan on switching gears to .223
  5. @Hansimania Good idea, i didn't think of that, but ultimately i don't think workable. These dirt cheap little DC motors are all speed and zero torque. Any sort of weight and they don't move, a flea would keep them from moving. There are work arounds: Gear reduction, stronger motors, heck a worm gear would solve the issue of keeping the door in place with the motor unpowered... Either way they all require some redesign and servos are just the easier solution for me. @muncie21 I have a few other ideas, in fact something similar to a star wheel is one of them. However my main goal is to keep this as simple as possible. I feel that's a level of complexity I'm not ready for yet. I do think that kind of design has the ability to operate faster. Funny thing is, i actually didn't burn out the motors as i thought. Turns out I burnt out one of the chips on the motor control board. The failed chip was running 2 output gates, for the FCNT and FC headstamps, so it was the one being taxed the most since those 2 headstamps account for 75% of the brass I've run through it so far. The magic smoke came while the motors were stalling, my guess is just too much current. The chip on the the bottom controller motors M1 and M2, you can see the burn marks in the attached pic I got a couple different servos. Some cheap $2 servos with all plastic gear sets, and some slightly upgraded $6 dollar servos with metal gears. The $2 servos need m2.2 which where a little hard to source in the size i needed, i found #2 screws which work since they just cut their own threads into the plastic output shaft, the $6 servos use m2.5 which were easier to find. Also with the metal gears I had a much better feel for how much torque to apply without stripping the output shaft. I bench tested the "zero" repeatability on both of these servos and i'm pretty impressed that they both tracked fine. I just ran a script to put them through various motion cycles and i checked on them at the end of each cycle. my biggest iteration was 1000 cycles and they were both fine. I tested both of them running different output gates. The programming is much easier, i got rid of some sleeps that I needed for the motors and gained a little speed. Overall I thnk going to servos was the right call. The $20 servo control board I was using can handle 16 servos, 4 are to control the flow of brass, so 12 can be used for output bins. The $20 Motor control board can only run 4 motors per board. So for 12 output bins you need no extra control boards with servos, for motors you need 3, which is another $60. $5 per motor offsets the cost of $6 servos with this revision. Now that I think i have this issue tackled it's back to working the programming.
  6. Had the morning off, worked on some design ideas, the changes are minimal and i don't think i'll have to reprint everything. Tomorrow I should have a ten pack of cheap Chinese servos from amazon for $20. Made a few partial test prints to work on tolerances, and conceptual ideas, with the few spare servos I already have and i think this will work, but the servos i have are more expensive. Waiting on the cheap Chinese ones to take measurements before i print and test the entire design. My hope is that the cheap servos will work. Some of the cheap servos have issues where they "lose their place" and don't return to the same spot. Hopefully these servos don't have that issue, but it's possible. Even if it happens, my main concern is not the gate being close/open 98% vs 100%, but rather the gate trying to be closed 102%, constantly pushing the motor and the servo burning out Otherwise i'll have to use the same mid range servos i used for the pins to drop the brass, which are like $10 each. They should have no issue tracking zero. The Issue is if you want 12 output bins, that's $120 in servos vs $24 with cheap chinese servos...
  7. Ran into an issue today. It didn't come out of left field, it was done for simplicity of design. I was concerned it might happen, but had a workaround I thought would work. Spoiler, it didn't hold up. The flapper gates that divert the brass to the flex tubing that goes to the buckets are powered by a short pulse from a $2 toy DC motor to open and close. The issue with DC motors is when no power is applied they rotate freely with almost no resistance. So if a piece of brass in free fall bumps into one of the gates there's nothing to keep it from bouncing open. I have been applying 20% power to the motors, to hold them closed, hoping it wouldn't burn them out and it seemed to be working fine. Until today when i got magic smoke. So I'm going to have to do what I should have done from the start and redesign this with servos. And possibly go through a few test print iterations. Also using black hose I probably wouldn't have even noticed an issue if i didn't see the smoke. I heard some of the doors opening and closing and everything seemed to be working after i powered it back up. I'm looking for a clear hose alternative. The current black hose i'm using is a little over 1.25" ID and is like $0.50/foot and is very flexible, it's a cheap sump discharge hose kit from home depot. 2.5" ID dust collection hose for shop dust collection systems looks like the right concept, but it's just too big and I can't find a smaller ID alternative that's flexible and not unreasonably priced.
  8. @Hansimania my expectation is that we should be able to share the trained model and it should as a starting point at the minimum, hopefully work darn good if it's sufficiently trained. I'll end up putting my model and all my training data on a github repo along with my code once i'm there, which is starting to get close @btp has actually helped me a lot with the machine learning side of things, he gave me a a very in-depth example of code to try along with detailed instructions that i'm just getting to. Dude is clutch. I made quite a few mechanical upgrades over the last week. The biggest is I should be able to support multiple calibers now, you only have to change out 1 part, and i made it an easy swap. I designed it to work with 9, 40, 45, 223, 300blk, and 308. I'm sure it will work for other calibers too, ultimately has to do with case length. i briefly tested 223 just to see if it should work out of 9mm drop assembly and it looks like it should. I have to print a new part to test 308 and just haven't gotten around to it, i expect i will have to make another tweak elsewhere though. swapped out the bailing wire with servo pushrod wire. It's a lot cleaner looking and the servos are struggling a lot less. I have 4 output gate modules set up now, so i can support 8 buckets, plus a reject bucket. I can maybe add 1 or 2 more drop modules so another 2 or 4 buckets, but any more than that and you'll have to put the case feeder ridiculously high in the air, or cut that clear output tube that comes off the case feeder and make it shorter. so the practical limit is probably around 10 to 12 buckets. Realistically i imagine much more than most people need. I changed the camera and lens, I think it's a big upgrade. I can capture and crop an image in around 0.07 seconds, vs around 0.5 second with the old camera. This should speed things up a bit and should be able to hit that case a second goal. Also, the images are in better focus and less noise in the image. I got a new light ring - I haven't installed it yet, but it's controllable by the raspi/jetson instead of just having a separate on/off switch. have to design and print a housing/mount for it. It's a few bucks more than the usb powered one i got on amazon, but i like being able to control it via software vs a separate switch. I'll be monkeying with code a lot more, taking more images, working with what BTP helped me with, working on the interface. I've been working on cleaning up the code to post on a github repo along with the cad files. I also started building a shopping list. The sortinator is a turn key product. This is definitely more geared towards a hobbies/tinkerer/maker, some assembly required.. You're going to need some intermediate computer knowledge: SSH, command line Linux, maybe a bit of python. A 3d printer of course. Some soldering skills. Probably around $350 in parts.
  9. I'm thinking tweaked, i double checked everything it seems fine. The case feeder is kind of old and beat up, lot of scratches/gouges inside the bowl and on the shell plate, wondering if that's causing an issue. definitely using all dillon gear.
  10. @67isb That looks nice, might be worth looking into. I have an older style case feeder with the High/Low switch.
  11. I'm not sure, i'll have to check, it's possible i misplaced it. It worked ok before I moved! I've had nothing but problems since It's definitely jamming, i can't even manually advance the shell plate without a lot of effort.. I have to turn off the motor and spin it backwards.
  12. so i've been running my case feeder hard with 9mm for a project to sort brass by headstamp, and the case feeder keeps jamming up and stalling the motor. Brass is getting lodged between the sidewall of the bowl and the small pistol plate. Have to turn the case feeder power off, and manually turn the plate backwards (counterclockwise) about 1/8-1/4 of a turn then power it back up to get it to work.... I've cleaned the case feeder up of any debris and wiped it out with a rag. Any ideas what the fix is?
  13. Well ain't that annoying! nickle and brass coated steel? Jeez! Great idea with the magnet on the case feeder though, definitely a good enough solution for now. I wonder if I could add in a sensor to see if a casing is magnetic and kick it based on that. No idea if this would work or how to implement it at this point, i'm vaguely remembering stuff from highschool physics. Something along the lines of an inductive loop, when the bass drops through it if it's ferrous it should do some magnetic voodoo, something with fields, maybe currents and somehow detect it... That's a problem for another day, but just a thought.
  14. @assnolax I'm not anticipating any issues as long we have enough sample images of different types.
  15. I have 2 data sets: My main set which i do an 80/20 split for training/validation and a testing dataset. In my test set, masking saw an almost a 10% increase in accuracy. Possible reasons: I still don't have a good distribution of training images, they are heavily weighted to 3-4 different headstamps. I will try more data augmentation like zoom/skew/color/contrast as you suggested. Could just be my CNN layers not being ideal. I will also try transfer learning.
  16. Very helpful! Thank you. I'm just learning about TF and Machine Learning. I'm gonna send you a DM, sounds like you're way smarter with this stuff than me. Would like to keep in touch. I'll try resnet and transfer learning as you suggested. I'm using TFLite for image classification right now. Just started looking into TensorRT last night, but haven't had any success yet.
  17. @btp with opencv, i'm resizing and using HoughCircles to apply a mask over the primer and measure the diameter of the primer (knowing the diameter is useless for 9mm, but will be handy for .45). The mask is to eliminate features of the primer I'm not concerned about. when training the model I'm only applying a RandomRotation of 2pi, i didn't see the point in any other keras image preprocessing like random zoom, flip, contrast since the casing will always be in the same position.
  18. Using a totally custom trained model. I've tried various image sizes and 256x256 seems to be the sweet spot, Larger, images and it's too slow, smaller images and i can't get good accuracy... at least based on my CNN parameters.
  19. Question to all: What calibers would you like to be able to sort with this? for me, 9mm, .45, .223, and .308. I want to redesign the position of the new camera, and i want to do it with the longest cartridge in mind. Looking for any likelyhood of interest in anything longer than 308?
  20. So I'll be honest, i'm not sure this paragraph is all speculation. If i were to guess, the preprocessing a high contrast image may make it more accurate, the edges of the text seem to be more clearly defined. But you lose the ability to seperate based on case material. I'd like to be able to identify steel cased for example once i get to .223 by color, and his images look almost black and white, so i'm not sure how that kind of pre-processing would allow you to pick out case color. I'm messing with the camera and lens mainly because the issue is the image transfer is very slow. I also believe a better quality/sharper starting image will generally produce better results in general, i have nothing to base that on other than intuition. Part of the issue is these cheap USB cameras are not meant for "macro" photography. The standard/common lenses are made for cctv type stuff and of the dozens I've looked at they won't focus on objects closer than 200-500 mm, and they have wide fields of view. So currently in order to get a 512x512 image of the headstamp because the field of view is so big - I'm capturing a huge high res 4000x3000 pixel images, with these cheaper cameras, they get a little noisy/grainy at high def as well, at least the one i'm using. Then cropping down to around a 700x700 image and throwing 11.5 million pixels away resizing to a 512x512 image that I'm saving as is, then doing a little pre-processing and shrinking the image down to 256x256 to feed to to image classification model. I'm saving the higher res photo for now, until i decide on the optimal size to send to the image classifier, right now 256x256 is having the best results of speed & performance. The new camera and lens combo I have, is actually a low power microscope, it will focus from 200mm-50mm on a part and have a very narrow field of view, at the lowest magnification it captures a field of view of about 1.5" inches wide. So now I can go down and capture a lower res image 1920x1080 and only have to throw about 1.5 million pixels away to get a 700x700 image and then do the same steps as above. The raw capture size is about 1/10th of size with the other camera, so it should be about 1/10th the speed, and looks like it generates a less noisy image from my very limited testing. Right now save as many oddball cases as you can, rather need them and not have them than the inverse. My gut feeling is we'll need at minimum 100, and ideally closer to 1,000 of each case type to reliably identify, but I'm unsure how things change if i make a "junk brass" classification label and put a bunch of different heatstamps in there. I'm starting to think about different calibers now too, Once i mount the camera i'm trying to set everything up with that in mind.
  21. I got the new camera, lens and the nvidia jetson nano. I played around with everything for a couple hours. The new camera and lens combo is great, i just need to figure out a good mounting solution. I can capture and decode an image in less than a tenth of a second and I think it's a better quality image. So looks like a win/win. The only downside i see so far is ribbon cable it uses is a little annoying vs USB. The jetson nano, i'm not sure it was a good purchase. Might return it. it's a little more complicated to set up than the raspi, it's still runing ubuntu 18.04 which leads to some depdency issues. It's also slower to classify images right now, but i must be doing something wrong, i need more time to mess with it. It SHOULD be much faster by all accounts. I also tested using the jetson to train the model, and i'm estimating that it will take about 6-8 hours to train. Not bad considering it's not made to do that. However, when you can do it in the cloud in 20 minutes *shrugs*. Might be worth it to some people though, esp if they don't have good internet to upload almost 1gb worth of images to the cloud.
  22. Thanks! I'll keep that in mind and put an ask out once I'm ready. I just put some more brass in the tumbler and it's stuff i didn't buy from the police range, so hopefully it'll lead to good data. I ordered some components from digikey so i can run up to 12 buckets, I also substituted a slightly more expensive motor, $6 instead of $2. The one i was using is out of stock. Same voltage but has more torque, which could be a good and a bad thing. We'll see if it's worth it or not. I'm running some more 3d prints to get ready for it. Also have a new camera and lens coming along with the jetson. If everything arrives before the weekend I may have some updates by sunday/monday. I manually dropped some .308 cases through the flappy gates and it handles them no problem, so .223 will be no sweat. I just need to get the presentation module done to be able to feed and image the brass.
  23. Yeah, I agree 2800/hr is RIPPING. But if there's low hanging fruit to make it go faster, why not. Plus larger cases, like 5.56mm will go slower. I sort all my brass by headstamp, i've had a surprises with cheap 9mm cases that are stepped. And esp now in my case the NT brass i got from the police range has larger than normal flash holes for the non-toxic primers to ignite better, but they do affect the pressure curve.... does it make a difference with my shooting? probably not. But as you can see I'm a little crazy. Patina shouldn't matter, actually I want a mix. Everything from bright shiny new cases to pretty heavily patina'ed cases. I was actually surised when training that it was able to classify cases that I honestly had a hard time reading due to being worn out. So I want to cover the gamut of the type of stuff it will see in the real world. But i wouldn't try to run brass through that hasn't at least been dry tumbled first, esp if it's nasty. Not to mention to make sure there's no debris in the brass to gum up the works As far as camera/lighting. I really don't know. Here's my "gut feeling". If you change the camera and the lighting it will probably decrease the accuracy of the system, but still work. What i'll do once I change the lens and camera is use the old training model to assist me in taking pictures of brass that I'd then use to retrain the model. Not to mention I already have a lot of brass sorted into buckets now, so i can just dump a bucket of "RP" brass in there, tell the app it's only RP brass and let it just got full auto and take pictures only. Once I have a sufficiently trained model and share all the code, If you build the design using the exact same hardware camera, lighting system. Also if i design standards for mounting everything so it's all in the same relative positions as mine, I imagine that my model should work for you, or again at least work as a starting point. Fact is I just put a piece of plywood down, and said "that looks like a good spot to put the camera" and eyeballed it. As far as brass goes, that might be a big help, depending on what mix of handstamps you have in your bin? i do have a couple smaller buckets that i need to work on. They should have a better mix of brass in them. I'll hold off on saying yes until after i get the new camera though. I'm probably going to start designing the mechanical side of things for 5.56 soon. I actually don't think there's too much work to do. I'm 75% sure the way i designed the sorting flappy gate assembly that it should handle 5.56 pretty well. I just need to redesign the part that allows me to take pictures of the brass, I can easily make it caliber specific parts, but swapping back and fourth may be annoying. I want to try and do something a little more universal/modular. I have about 30% of an idea that I just need to flesh out.
  24. I had the day off. I worked on a little performance tuning today. I can't get the mechanical system running any faster. If i do it starts causing sorting or presentation malfunctions. Otherwise mechanical portion is working great. I've put about 4,000 peices of brass through it with no failures yet. Image recognition is fast and is working perfectly on FCNT and RP headstamps. So I'm using the partially trained model to my advantage. I put a couple lines of code so that if it sees either of those 2 handstamps and is 95% certain or more to just sort them with no input from me. If certainty is under 95 or if it sees something else it waits for input. it worked great since about 50% of my brass is FCNT, just doing that alone helped me get through the last of the bucket I've been working through for training in no time flat. I then put a batch of 150 pre-sorted FCNT and RP cases in there mixed together, it actually paused on a few cases that were the wrong headstamp so i had to redo the test a few times. But once i got a clean run of 150 cases, it took about 191 seconds. Roughly 1 case every 1.3 seconds or about 2800 cases an hour. There are definitely 2 places in the code to save time. As mentioned earlier the next big place to shave time will be the image acquisition. If I can cut that in half I should be able to do a case per second. I think I can also save another tenth by threading 1 or 2 functions. Otherwise I don't think there will be any big chunks of time to shave and anything more will be diminishing returns and not worth it. I still need more brass of other headstamps to do more training, have plenty of brass i just want to run it through the tumbler to clean it up first. The issue is the distribution of brass I have is very heavily weighted towards 4 headstamps. So i have to go through a ton to get a small percentage of useful data. However i'm starting to be able to run through all the brass faster now. I want to try the different camera, a different lens, and i still want to put a different LED light on there to illuminate the brass, one that i can control with the raspi to turn on and off. I have one, i just haven't soldered it up and tried it yet. I ordered a jetson today, also ordered a new lens for my current camera. Waiting for a few other things to come in stock on adafruit before i order the hq raspi cam.
×
×
  • Create New...