News for hackers. Stuff that matters.
Re:I found two identical packs of Skittles among 468 packs by dekhn on Wednesday April 17, 2019 @09:07PM (#19687855)
I'm so glad to see there are people who think like me. I have spent thousands of hours doing various projects like this.

The only difference is, I normally spend my time automating the process with computer vision (a skittle sorter/counter wouldn't be that hard to build; opening the bag is harder than identifying colors). And then I never really finish the project.

Re:I found two identical packs of Skittles among 468 packs by LeifCarrotson on Thursday April 18, 2019 @10:13AM (#19691128)
As someone who (also?) builds automated industrial machinery for a living (and agrees that opening the bag would be harder than picking colors), the challenge would be in improving reliability from a typical 97% to the nigh-impossible task of getting 27,000 operations correct in a row. What will you do with small pieces of skittle shell, or broken skittles that lack a shell, or 2 skittles that are bonded together, or shreds of red bag that got into the hopper? What will you do if the dye is running low, or is contaminated, and the color fades or shifts between bags? The original article had some rather difficult to automate, subjective criteria for handling these questions.

One thing to remember in the panic over automation killing off jobs is that handling the normal case is maybe 20% of the work. Handling routine errors is 80% of the work. Handling the errors that crop up once in a thousand parts - or dozens of times in this small sample - is why running lights-out is so difficult, and why we'll always need human operators and maintenance staff who can diagnose and correct unexpected problems.

That said, I'm at least 97% confident that OP, in manually counting and marking down these 27,000 items, mis-counted or mis-marked at least once. So I'm not feeling too bad about my pessimism regarding the automated solution. Even if it can't identify if a given sample is "gross" or not, it will add 1 to a counter reliably!

Also, one test of 468 bags that shows one result does not prove anything about the average number required. You'd need to run this test many times for that, and for that you'd need automation!

Re:I found two identical packs of Skittles among 468 packs by dekhn on Thursday April 18, 2019 @10:18AM (#19691162)
I work in biotech now using microscopy to understand diseases better. Same exact problems there- so much still depends on expert humans who can diagnose and deal with all the edge cases with ease. I see all these articles about amazing results using image recognition, and while some of the results are really good, they always depend on massively cleaned-up datasets.
Re:I found two identical packs of Skittles among 468 packs by yurishimo on Thursday April 18, 2019 @02:15PM (#19693370)
In high school, our second year engineering classes required us to build a skittle sorter out of lego and some sensors/software.

The only requirement was a hopper for the teacher to dump the skittles into at the beginning. She would have a different amount for each group that was pre-counted and our numbers had to match hers at the end within a certain % of error.

It was a month+ long project and really fun to see each team's solution in how they moved/sorted/stored the final product. Some teams used long conveyor belts, others used short stacked belts, etc. It was all really interesting and I thoroughly enjoyed it!

Re:I found two identical packs of Skittles among 468 packs by dekhn on Thursday April 18, 2019 @02:31PM (#19693550)
Sounds like a great project.

Designing a hopper was a recently project for me and it was really fun. I learned a bunch about mass flow and realized that there are all sorts of interesting industrial problems involving hoppers.

Re:I found two identical packs of Skittles among 468 packs by yots on Thursday April 18, 2019 @05:03AM (#19689714)
Re:I found two identical packs of Skittles among 468 packs by Insanity on Thursday April 18, 2019 @05:57AM (#19689876)
That reminds me of this post about sorting 2 tons of lego: https://jacquesmattheij.com/sorting-two-metric-tons-of-lego/
Re:I found two identical packs of Skittles among 468 packs by dekhn on Thursday April 18, 2019 @09:14AM (#19690723)
that post was a revelation to me and led me down the path of making object detection classifiers for various projects. I was shocked at how easy it was to build a classifier that was as good as a human, but faster (or more accurate than a human in the same amount of time).

I ended up learning there is a whole area of computer vision in industry- relatively "boring" stuff like just looking at a line of bottles going by. I went on a tour of the money making machines in DC and they stream sheets of bills by industrial vision cameras to detect whether the bills are within QC.

Still amazes me people get paid to do this. To me it's just like a big fun game.

Re:I found two identical packs of Skittles among 468 packs by dekhn on Thursday April 18, 2019 @08:20AM (#19690431)
Ah, I forgot I had seen that before. yes, it's really nice. Pretty much what I was thinking. I've also been through the "hopper design process" (built a Galton board, needed to feed it a ton of balls, learned about mass flow in the process).
Re:I found two identical packs of Skittles among 468 packs by joshvm on Thursday April 18, 2019 @04:03AM (#19689507)
Yup, dump on a piece of paper and segment by contours, bright colours so super easy. Though you'd lose the nice skittle graphs which I think is half the fun of the process.
Re:I found two identical packs of Skittles among 468 packs by __m on Thursday April 18, 2019 @02:29AM (#19689157)
Well opening the packs is probably not that much of an effort compared to sorting/counting 27,000 skittles. Instead of 3 month you could break it down to one or two days
Re:I found two identical packs of Skittles among 468 packs by daveFNbuck on Thursday April 18, 2019 @02:36AM (#19689174)
If you have to put the bag in the machine, it's not much more effort to tear it open. If you do that over a large funnel, that should work to get all the skittles into the counter most of the time.

I was thinking that time could be saved by not sorting the skittles so nicely. Just take a picture of the skittles from each bag spread out randomly. You should be able to figure out the color distribution just by counting pixels within each color range.

Re:I found two identical packs of Skittles among 468 packs by dotancohen on Thursday April 18, 2019 @07:23AM (#19690180)
You do not even need to count the pixels. OpenCV will identify the objects, then their dominant colour can be determined.
Re:I found two identical packs of Skittles among 468 packs by dekhn on Thursday April 18, 2019 @08:44AM (#19690545)
actually ripping a small bag filled with stuff open reliably is a bit harder than you might think.
Re:I found two identical packs of Skittles among 468 packs by fencepost on Thursday April 18, 2019 @10:45AM (#19691374)
actually ripping a small bag filled with stuff open reliably is a bit harder than you might think.

"That's why we built Loppy the Chopper over there."

Re:I found two identical packs of Skittles among 468 packs by daveFNbuck on Friday April 19, 2019 @12:24PM (#19700797)
That's why I was saying I wouldn't try to automate that part. You don't need a super-reliable method if you're doing it by hand. On average, it probably takes a lot longer to count the skittles by hand than it does to open the bag, so most of the savings comes from the part that's easy to do reliably.