HSLU’s AI machine puts an end to costly counting errors

Klaus Zahn und Projektleiter Vision-basierte Schüttgutzählung Jonas Hofstetter b
Klaus Zahn und Projektleiter Vision-basierte Schüttgutzählung Jonas Hofstetter betrachten den Rechner, auf dem die KI läuft. Bild: HSLU.

Whether it’s diamonds or expensive hemp seeds: If you miscount, you can quickly lose a lot of money. Lucerne University of Applied Sciences and Arts is therefore developing a machine that uses artificial intelligence (AI) to count with high precision - and is four times faster than the human eye.

The precise counting of small parts is crucial in many industries, such as pharmaceuticals. After all, an incorrect count can quickly become very expensive. An Innosuisse-funded research project at Lucerne University of Applied Sciences and Arts aims to increase not only counting accuracy, but above all the number of parts counted per minute, especially for very delicate goods. The research team, led by Klaus Zahn, is relying on artificial intelligence, among other things.

Modern camera technology and self-learning AI

The project partner is the Schwyz-based company elmor AG, a manufacturer of specialized counting devices that also reliably detect irregularly shaped parts - such as seeds - using a light barrier. However, the existing technology is increasingly reaching its limits: around 40 percent of the market volume is accounted for by such complex bulk material shapes, which cannot be counted with sufficient speed and precision using current methods.
The new HSLU system replaces the light barrier with a combination of a modern camera and self-learning AI. The camera captures 100 images per second, compared to around 25 for the human eye, and the AI uses these images to recognize each individual part in free fall. "With our technology, even the smallest, irregular objects or objects that overlap as they fall can be captured with pinpoint accuracy," explains Zahn. The first prototypes have already been successfully tested in pilot applications, initially with peas, among other things.

Counting where it counts

The system is suitable for a wide range of industries, especially where large quantities of small parts need to be counted particularly accurately and counting errors can quickly cost money: Seed companies, for example, benefit when dosing expensive hemp seeds, which cost up to 50 francs each. In medical technology, the technology helps to avoid miscounting sensitive components, such as bone screws or tiny vascular supports for the brain (known as brain stents). The more expensive or sensitive the parts, the more important this accuracy becomes: diamonds can also be counted using the system. And the technology is even helpful in DIY stores: screws, which were previously filled by weight, can now be portioned to the exact piece. Zahn, who admits with a twinkle in his eye that he is a "bean counter" in a double sense, explains: "Our AI not only counts, it also recognizes damaged or incorrect parts in the bulk goods. In this way, we not only record quantities, but also quality features and document them automatically." The AI therefore not only delivers precise quantities, but also filters according to quality - a crucial prerequisite for greater cost efficiency and therefore for the market success of the technology.

Data protection-friendly and future-proof

Another advantage of the system is that it does not require a cloud connection. The AI runs locally on a compact computer and the camera does not store any images, only the data required for counting. A clear advantage for sensitive applications. "Processing on a cloud would also take far too long," explains Zahn.
The data protection-friendly solution paves the way for other applications in the future. In building automation, for example, it could also be used to count people, which is relevant for the automatic control of heating, ventilation or lighting. New functions can be retrofitted via software updates, similar to modern electric cars. Completely finished