This website uses cookies primarily for visitor analytics. Certain pages will ask you to fill in contact details to receive additional information. On these pages you have the option of having the site log your details for future visits. Indicating you want the site to remember your details will place a cookie on your device. To view our full cookie policy, please click here. You can also view it at any time by going to our Contact Us page.

Machine learning solutions for classification applications

07 June 2019

Dr Jon Vickers looks at how machine learning technologies can now offer a simple solution for food classification applications. 

As part of the quality control procedure many applications have a need to identify defects in a part-processed or final product, or for checking that a particular product variant has been correctly packaged. 

Ensuring that labels accurately reflect the contents is vital – to avoid waste or repackaging and to ensure consumer safety. 

Inspection can involve checking parameters such as shape, size and even just the ‘type’ of product. For example; is it a chicken wing or a chicken thigh? These types of decisions are comparatively easy for a human inspector on the basis of experience – the human ‘knows’ the difference between the two products. However, it is rarely possible at production line speeds and often the variations are rather more subtle. 

Classification is one of the most challenging tasks for machine vision in the food industry. The appropriate features need to be identified and extracted from the image in order to allow the classification to take place. 

Although the concepts of machine learning and deep learning are not new, advances in computing capabilities have allowed these techniques to be added to machine vision classification tools. In both methods the system is supplied with a set of training images to learn the classification required and this is then applied in real time on the production line. 

In the deep learning approach, convolutional neural networks are used. Here, the system can be supplied with sets of training images which it analyses from scratch to pick out the classifications. In machine learning, there are a number of algorithms available, but a supervised learning approach is used, where the user marks up the training images with a region of interest highlighting typical examples of the features for classification. 

One example is Stemmer Imaging’s CVB Polimago image recognition tool, which is part of the Common Vision Blox machine vision toolkit. This uses ridge regression, a supervised learning method for search and classification. One of the benefits of this approach is that far fewer training images are need compared to a CNN, which leads to much shorter training times for the system. Typically, CVB Polimago requires just 20 - 100 training images whereas CNNs could require 500 training images per class as well as 500 good ones. In addition to a lower cost than many commercial CNN tools it is designed to run on a CPU without the need for GPU acceleration generally required by CNNs.

Problem solving 
A number of different problems have been addressed recently using CVB Polimago, including detection of incomplete biscuits; sorting different biscuit types; checking whether the coating on nuts is complete; counting and identifying different types of chicken portions and checking that the labelling on pre-packed sandwiches corresponds with the actual sandwiches inside. An assessment of broken and complete biscuits on three biscuit types required around 60 training images with a 7ms classification time. The classification time is the time taken to carry out an inline classification after the system has been trained.

Identifying different biscuit types in a mixture took a larger training set of 150 training images, with a classification time 148ms. Other classifications were quicker. The identification of chicken wings, thighs, drumsticks and breast required just 14 training images in each set with a classification time of 1ms. The sandwich inspection application was more challenging as the sandwiches need to be imaged through the ‘clear’ plastic packaging, while the label on the packaging is also read. A feasibility study looked at a subset of three fillings: Cheese Ploughman’s, Cheese & Celery and Cheese & Bacon Club, yet still only 11 training images were needed per set, with a classification time of classification time 1.5ms. 

With this ease of training and fast execution times, the machine learning approach has huge potential for classification applications in the food processing industry.

Dr Jon Vickers is technical manager at Stemmer Imaging.


Contact Details and Archive...

Print this page | E-mail this page