Let's See What We've Got
For the purposes of this blog post, we purchased buttons1 from an auction site. The auction listing showed a single image of a pile of buttons on a carpeted floor, with the description “couple hundred, not exactly sure”.

For ease of handling, we divided the pile into two groups based on size.

To see exactly what we'd bought, we further separated the pile into random groups of buttons, each given a unique reference number. Then we took digital images of each group.

Running a machine vision model trained to identify buttons against all these images, within a few seconds we learn that there were a total of 1,837 buttons in the pile. Now we could clearly see their distribution by number of holes, size and colour.

As the common guess-the-number-of-jelly-beans challenge often shows, we humans find it difficult to accurately count large piles of items. So it's not surprising that the seller guessed "couple of hundred" buttons.

And there were relatively few blue or green buttons

By creating digital copies of the physical buttons, and applying machine vision techniques, we now have a set of data that we can examine and manage with ease.
Spot The Odd One Out
Machine vision can be ideal for quality control in manufacturing, especially where visual defects are subtle and human inspection is slow or error-prone. Machines don't tire of looking at complex images as items pass along a production line at speed, hour after hour.
Let’s try an example : see if you can spot the unusual button in this image? (A clue - focus on the button holes.) How long did it take you? Could you do this all day, every day?

Now let's query the machine vision model to find any buttons which do not have two or four holes. In a few seconds we get a visual representation of every button in the image, with its colour, dimensions, and number of holes. The 3-holed button stands out immediately, its exact location known so that it can be retrieved either manually or by a robotic hand. And a machine vision system can perform this task continuously, without getting tired or bored or distracted.

Visual Search
We're all familiar now with number plate recognition on toll roads, and facial recognition to unlock our phones. But visual search (also known as Content Based Image Retrieval) has many other uses.
E-commerce customers might upload a photo of an item to find the exact or visually similar products within the online store's catalogue. This dramatically improves product discovery and the shopping experience, especially when a user doesn't know the name of an item.
In a manufacturing environment, and engineer might search a database of production images to find past examples of a specific type of product defect or anomaly.

Using our button example once more, suppose that we see one button in particular that we like. A group of the same buttons would be much more valuable than just this one button by itself. How can we find out if there are any more?
We could do a physical search of our whole inventory of buttons - but that could take a long time, and we don't know if the effort will be worthwhile. By contrast, we can perform a digital search of our image database with just a few mouse clicks. Lets try that.

Great! There are eight other buttons that are just the same. And with just a few more mouse clicks, we can generate a 'pick list' of labels so that we can easily retrieve them from storage.

Whether you're matching spare parts, identifying fashion accessories, or organising visual collections, machine vision can streamline the process and improve accuracy.
Conclusion
While our demo uses buttons as a fun example, the underlying technology is anything but trivial. The machine vision capabilities that we've demonstrated - spotting subtle differences, classifying visual data, and searching for similar items - can be applied to a wide range of industries and use cases.
Sagitto not only has expertise in applying machine learning to spectroscopy data - we are also expert at building custom machine vision solutions that are tailored to your particular business needs. If you're curious about how machine vision could streamline your operations or unlock new opportunities then we'd love to talk.
Notes
- We chose buttons because they're things that we're all familiar with - and (I confess) because as a child I was fascinated by the buttons in my mother's sewing basket.