5 ms·
It's interesting this person can program, but chose to manually count 27,740 Skittles instead of automate it in some way. It feels like an almost-trivial compu
by tlrobinson 8y ago
It's interesting this person can program, but chose to manually count 27,740 Skittles instead of automate it in some way.
It feels like an almost-trivial computer vision problem.
- tayo42 8y agocomputer vision is trivial? when did that happen?and how was it made trivial?
- tlrobinson 8y agohttp://opencv.org/ http://opencv.org/ Counting the number of round colored objects on a white background is not a hard problem. I think I've found a project for this evening...
- dekhn 8y agoI've done a few computer vision projects lately and it's really amazing what you can get done with opencv for relatively clean data. In this case you're trying to identify circles and classify their color into one of several groups. This is pretty common, the main challenge is cleaning up the raw data so that the hough transform runs quickly and accurately, and the color cluster identifier is robust. If you're pretty good with Tensorflow, you could do it with an object detector. I've built absurdly accurate object detectors using the TF Object Detector tutorial and just a little hand labelled data plus some good synthetic augmentation. For this project's scope and scale it's probably not worth automating unless you're going to be repeatedly running the process.
- vortico 8y agoHe's saying detecting skittle colors is "trivial" in the field of computer vision, and he would be correct. A 50 line Python script with a popular classifier library would solve this problem with high accuracy. This is perhaps the easiest problem to solve with CV and would be a great first tutorial for such libraries.
- heavymark 8y agoHard to imagine that process would be trivial especially since as he noted in the article he had to have criteria on when to count a skittle such as if it were too small, appeared unedible and other such characteristics. But after completing the manual way would be interesting to running programs on it to see how close they are from the actual numbers.
- peterburkimsher 8y agoIt's been done! A teenager built an M&M and Skittles sorting machine a few years ago. I expected this article to be based on that, but to my surprise, he counted them all manually. https://hackaday.com/2017/02/06/mms-and-skittles-sorting-machine-is-both-entertainment-and-utility/ https://hackaday.com/2017/02/06/mms-and-skittles-sorting-mac... To the author's credit though, doing it manually probably made more sense in his situation. It would take a few months to build the auto-sorter, which would've had to be tweaked to handle the misshapen blobs. The collection of Skittles photos is impressive too, and hopefully will end up in a Maths classroom.
- tlrobinson 8y agoSince no one seemed believed it's almost trivial, I went ahead and implemented it: https://imgur.com/t7ivg0V https://imgur.com/t7ivg0V It took about an hour of Googling OpenCV questions. Also, I've never actually used OpenCV before, and don't use Python regularly. I haven't tested it against the full set of images. Even if it's not perfect you could at least use this to narrow down ones that are within some threshold, then manually verify they were tagged correctly. I'll post the code shortly.
- krackers 8y agoAny update on posting the code?
- tlrobinson 8y agohttps://github.com/tlrobinson/skittles.py https://github.com/tlrobinson/skittles.py It's definitely not perfect but could probably be improved a bit. There are a few where strawberry and grape or strawberry and lemon are swapped. I think better lighting would help.
- acqq 8y agoNice! > I think better lighting would help. That also demonstrates the difference between having the possibility to optimize input until the output matches the known values and having to process "real life" images made under different conditions. The later is certainly more interesting: e.g. I dream of having an OCR that is "always right" no matter how bad the image is.
- rcxdude 8y agoControlled lighting is extremely helpful in computer vision and key to the operation of a lot of industrial uses of it. From a system design point of view it makes a lot of sense, but obviously it's not possible in many applications (and researchers obviously want to go after the toughest problems, and would rather mostly solve a hard problem than entirely solve an easier one).