Skip to content
⚡ Developer documentation for INFINICAM, the real-time high-speed camera (UC-1.1 / GbE-2)

Using it for unsupervised learning (AI)

AI that works with images is built by learning from a large number of images. INFINICAM can capture 1,000 images per second, so you can collect images for training very quickly and in large numbers. However, it is not realistic for a person to label each collected image with the correct answer, such as “this is normal” or “this is abnormal”.

This is where unsupervised learning, which needs no correct labels, is a good match. This page shows what might be possible when you combine 1,000 fps video with unsupervised learning. As a typical example, it looks at anomaly detection in factories (early signs of minor stoppages).

There are two broad ways to train an AI.

Supervised learning Unsupervised learning
What it learns from Images, plus correct answers (labels) added by people Images only
What it is good at Sorting into fixed categories (what is this?) Finding things that are out of the ordinary, grouping similar things together
Preparation effort Adding correct answers takes a lot of work Just collect images

In unsupervised learning, for example, you train only on images of the machine running normally, so that the AI learns “how things usually look”. The AI then flags anything that departs from the usual as “possibly abnormal”. It can also be used to automatically sort similar motions into groups.

2. Why it is a good match for 1,000 fps video

Section titled “2. Why it is a good match for 1,000 fps video”
  • Data piles up without labels: just filming normal operation collects 1,000 training images per second. Because no one needs to add correct answers, you can use everything you collect for training as it is.
  • It can learn even the “middle” of a motion: because you can see each second divided into 1,000 parts, the AI can learn “how things usually look” including the middle of fast motions and very brief disturbances, which a conventional camera (30 fps) would lose inside a single frame.
  • It can judge on the spot while capturing: INFINICAM sends each captured image to the PC right away, so the trained AI can judge each image one by one while capturing. When it finds something out of the ordinary, it can alert you immediately or save only the images before and after.

Example: anomaly detection in factories (early signs of minor stoppages)

Section titled “Example: anomaly detection in factories (early signs of minor stoppages)”

On production lines, machines sometimes stop for a short time because parts get jammed, caught, or misplaced. These are called minor stoppages (“choko-tei” in Japanese). Each one may last only a few seconds to a few minutes, but when they happen again and again, output drops a lot.

The cause of a short stoppage is often a very brief event (a part bouncing, shifting slightly, getting caught, and so on), and often you cannot tell what happened either by watching or by filming with a conventional camera. Also, anomalies rarely happen, and happen differently each time, so collecting many images of anomalies for supervised learning is hard. This is exactly the kind of situation unsupervised learning is suited to.

For example, suppose you film a machine that picks up and moves a part every 0.5 seconds. Compare how many images one motion (one cycle) appears in.

30 fps 1,000 fps
Number of images per cycle (0.5 seconds) 15 500
Interval between images About 33.3 ms 1 ms

If a part bouncing or being missed by the gripper is an event of about 10 ms, at 30 fps it may start and end between two frames and not be captured at all. At 1,000 fps, you can see those 10 ms in 10 images, including what happens in the middle.

If the AI learns normal motion at the fine level of 500 images per cycle, it may be able to find small changes before a stop (early signs), such as a certain action being a few ms later than usual.

To compare cycle by cycle, you need to align the timing of the images with the motion of the machine. When INFINICAM receives an external trigger signal, it can record a trigger frame mark in the image of that frame. If the machine’s controller (such as a PLC) sends a trigger signal at the start of each cycle, you can align exactly which image corresponds to which point in the cycle (see External IO).

Judging on the spot and saving the moments before and after

Section titled “Judging on the spot and saving the moments before and after”

The trained AI judges while capturing, and when it finds motion that is out of the ordinary, it saves only the images before and after, so you can investigate the cause later in slow motion (the idea in Recording the moment of motion). Other possible uses include continuously recording the degree of anomaly to see trends in the changes before a stop, and stopping the machine or issuing a warning if needed.

Example: monitoring rotating and moving equipment (predictive maintenance)

Section titled “Example: monitoring rotating and moving equipment (predictive maintenance)”

Machines that rotate or move back and forth, such as fans, motors, belts, and rollers, often gradually change in how they vibrate or move before they break down. Noticing these changes early and servicing the machine before it stops is called predictive maintenance.

Filming at 1,000 fps lets you capture, as motion in the images, fine vibrations of up to about 500 cycles per second (each vibration cycle needs to be captured in at least 2 images, so half the frame rate is a rule of thumb). At 30 fps, you can only see slow vibrations of up to about 15 cycles per second.

If the AI learns how the machine vibrates and rotates when it runs normally, possible uses include:

  • Finding “unusual vibrations” such as uneven rotation, belt flapping, or shaft wobble
  • Recording the degree of anomaly every day to see trends of gradual deterioration

Because it watches with a camera, it may also be usable in places where sensors cannot be attached to the machine, or where you want to monitor many machines at once. You can try the idea of counting rotations in the application Measuring rotation speed.

Example: visual inspection of products on a conveyor

Section titled “Example: visual inspection of products on a conveyor”

This is inspection to find scratches, stains, chips, distorted shapes, and so on in products moving along a belt conveyor. Defective products rarely appear, and the type of defect differs each time, so unsupervised learning, which trains only on images of good products and finds “appearance that is out of the ordinary”, is well suited.

Compare the case of a conveyor moving at 1 m per second.

30 fps 1,000 fps
Distance the product moves per frame About 3.3 cm 1 mm
Number of images a 10 cm product appears in (with a 20 cm field of view) About 3 About 100

Because you can capture one product in dozens of images, each at a slightly different position, possible benefits include:

  • Shallow scratches and dents that are visible or invisible depending on how the light hits them are easier to find in at least one of the images
  • Combining the judgments of several images reduces misjudgments
  • You can inspect products as they flow, without stopping or slowing down the line

If a sensor detects that a product has passed and notifies the camera with a trigger signal, it is also easy to split the images by product.

Filming at 1,000 fps the motion of living things (insect wingbeats, the way fish swim, cell movement, and so on), liquid splashes, the flow of powder, sports movements, and so on collects a very large amount of motion data.

Unsupervised learning includes methods that automatically sort similar things into groups without being told the correct answer (clustering). If you extract motion features from 1,000 fps video and classify them, possible uses include:

  • Finding differences in motion patterns that people could not see by eye
  • Automatically organizing thousands of motions without a person looking at each one
  • Picking out only rare motions that seldom happen, and studying them in detail

Its strength is that even fast motions, which would be lost inside a single frame at 30 fps, can be compared including their shapes in the middle of the motion.

4. Key points and limits for making it work

Section titled “4. Key points and limits for making it work”

To keep judging 1,000 images per second with a trained AI, you need to finish processing each image within 1 ms. This calls for measures such as:

  • Using only the area you want to see (ROI) instead of the whole image
  • Using scaled-down images (DC components, 100 × 75 pixels)
  • Making the AI model smaller, or using a GPU

Using smaller images also helps reduce the time needed for training.

Unsupervised learning is a method for finding “out of the ordinary”, so it may also judge changes in lighting or shifts in camera position as “anomalies”. Fix the lighting and camera firmly, and keep outside light out. When you change what you film or the machine settings, you may need to retrain.

What the AI finds is only that something is “out of the ordinary”. It is people who judge whether it is really an anomaly, what caused it, and how to fix it. The saved slow-motion footage from before and after is a major clue when investigating the cause.