The age-old debate of cake or biscuit still continues to apply to Jaffa cakes, however, we’ve recently developed a deep learning vision system that can recognise both cakes and biscuits. The system can accurately count the number of Jaffa cakes in a plastic sleeve before they are placed into boxes. 

Traditional vision systems had failed to accurately count the number of Jaffa cakes for several reasons. The biscuit-sized cakes can sit at different orientations and angles each time within the plastic sleeve. Additionally, each biscuit can vary slightly in size, shape and colour which traditional camera systems fail to account for. 

The plastic film causes issues for cameras as light reflections stop the camera from being able to see and count the cakes. The use of coloured plastic film also hinders the ability to count the Jaffa cakes.

Deep learning – An intelligent vision system 

As a leading Cognex partner, we combined Cognex’s VIDI software with the Insight D900 colour smart camera to produce an intelligent vision solution. 

The deep learning software is able to learn what the possible variations of the Jaffa cakes can look like. It also takes into account the light reflections from the plastic sleeve. 

To achieve this, we show the software a series of images with the possible variations the camera will come across. This trains the system as to what the product looks like and how the lighting can vary. The system can continuously improve recognition over time and any images where it misses a product can be added into the model to re-train it. 

The result is an automated vision system that can accurately count the number of Jaffa cakes in a plastic sleeve despite any variations in product appearance, placement or lighting.