21 Apr

Self-Training Machine Vision on the Fly: Counting Parts and Identifying Novel Objects

KTM Research recently developed a proof of concept system using Halcon software that is able to correctly identify a set of parts such as various sizes and styles of wood screws and rivets without pre-trained shape models or patterns. The system works by having an operator present a number of parts to the system during a training phase. Based on the parts presented, the system can automatically select the best features to identify the parts, and then trains itself using machine-learning. The system then identifies parts based on training data, with some machine-learning model modes even enabling “novelty detection” – in other words, the ability to identify parts as something other than what was trained.


Step 1: Six unique parts are presented by the operator to the camera during the training phase.

During the training phase, the operator shows the system parts either by taking multiple images of a single part, a single image of many of the same part, or some combination. The system automatically segments the images using a threshold to segment the outline of each part into a blob. It then computes all of the 30+ potential feature types of each blob. These features are fed into an algorithm that selects which combination of features are required to sort the objects as the operator did during the training phase.


Step 2: The six unique parts and two additional types of parts that were not trained are presented to the camera.

Note that this same approach could be used to sort screws from nuts regardless of size or sort sizes of nuts depending on how the user presented the parts to the system. This all happens automatically with no other input from the user besides presenting parts to the system.


Step 3: The software identifies the unique parts that the operator trained the system to recognize and the additional parts (in red) that were not trained.

About KTM Research

KTM Research is an engineering firm that specializes in industrial machine vision systems for quality control and vision-guided robotics.  Formed in 2009, we are located in Tualatin, Oregon.  We serve industries in the fields of advanced manufacturing, consumer electronics, bio-tech, food and beverage, research, and logistics.  Our systems have been successfully used by customers across North America and Asia.

Our goal at KTM Research is to be the first call you make when faced with a vision challenge.  Our team of engineers view themselves as an extension of your organization and strive to be your trusted vision partner.  Our success is our clients’ success.  Our collaborative approach to projects with our conservative and robust design process allows KTM Research to successfully complete projects that many others cannot.

Contact KTM Research at info@ktmresearch.com for more information on our vision solutions.