We ensured a customer, who was troubled by foreign objects and and plastic residue literally stuck by static electricity to toys ready for shipment, could sleep soundly. And not only he, but also the parents of the children who will play with the toys.
Why bark up the wrong tree? Let’s look for the source of the contamination first…
The problem that was to be addressed initially was finding and removing small plastic pieces, shards and other contaminants from toys leaving the production line for sale. First and foremost, it was necessary to find the cause of why these particles were on the toys.
The culprit was discovered quite quickly. The plastic boxes in which the cubes are transported for the next process (packing) are sometimes littered with mechanical particles, small pieces of plastic that simply belong to the production of plastic objects. The small impurities like to attach themselves to the cubes with static electricity, and nothing can stop them from reaching the toddler who receives them for his birthday. Where the plastic particles or other possible mechanical impurities go after that is left to the imagination of the readers.
The solution was obvious, check the quality of the cleanliness of the containers before each use. If we find a box with plastic residue or other contaminants, we send it back within the line for cleaning. And then what else but to check again 😉.
Even your phone can find dirt with some exaggeration. Why was AI needed?
All of this still seems like a trivial task that does not need a case study. But the real brain-storming for our team came when it became clear that the crates on the line were different colors, sizes and rotated in random order.
Will automation be possible?
A conventional inspection using an AI machine learning model would be easy, but if there are more variables at play, then it’s no longer a task for everyone. However, the PEKAT VISION team knew their stuff. With darker shades of boxes, defects and anomalies were visible and detectable immediately, but when a box of a brighter shade came under the camera and light, the photo was overexposed and you could see nothing at all. The system always assessed the box as clean, which may not have been the case. By shortening the exposure, it was possible to take pictures that, even with the bright boxes, were “readable” enough for the neural network. The algorithm found the impurities with 100% success.
Sophie’s choice? We left it up to the AI.
But how to decide which box to shoot with which exposure? Setting the exposure for each box separately is not possible on the line due to time constraints. So we decided, regardless of the color, to shoot each box twice. Once with normal exposure time and the second time with reduced exposure time.
Evaluating both images would have doubled the detection time, so we first incorporated the Classifier module into the process to evaluate which of the two images has the more optimal luminosity. The clearer of the two images taken was then sent to the Detector module to search for particles and residue. The Detector with Classifier module is trained on specific defects. Since it was not possible to rule out the possibility of new, unknown impurities, the Anomaly Detector was deployed in a parallel branch. The Anomaly Detector module is an expert on new defects, or contaminants in our case, that we have not yet encountered. If either of these modules detects an impurity, the box is automatically sent back to the cleaning center.
In the end, the solution seems simple and straightforward. Elegant solutions are our favorite. Still, we were the only one who managed the task in the competition of other AI quality control providers and we are happy about it. But as it happens, behind every great result there is a lot of work.