Quality is essential in any industry, which is why quality control represents a crucial step in any production chain. The AFNOR study reveals that for 53% of companies, the cost of non-quality is between 1 and 5% of turnover. For 34% of them, this cost amounts to more than 5%, sometimes more than 10% of turnover. Historically, the majority of quality control tasks were performed by people. Yet this work is often repetitive, and ultimately prevents teams from focusing on higher-value activities.
This is where industrial vision cameras come in, with all their technological options to replace human visual inspection. The goal is to improve productivity by letting people focus on high-value tasks while technology handles the repetitive ones.
Rule-based machine vision is becoming increasingly common, but there are cases where it reaches its limits: high variability within the same part, or modular tolerance of defects. A solution then emerges: artificial intelligence. Based on machine learning and deep learning principles, it is still too little known and used, yet it is very effective in complement to the rule-based approach.
Artificial intelligence may be the missing element in your production chain. To find out, let us look at the advantages and disadvantages of both the rule-based and AI-based approaches.
What is rule-based machine vision?
Rule-based machine vision involves analyzing images obtained through industrial vision cameras. It uses a set of image processing algorithms to perform either direct tasks (relatively high level) or intermediate treatments such as image segmentation.
This approach uses predefined "rules" to identify and classify objects in an image. These rules are essentially parameters adjusted on the algorithms to obtain the desired result. They must be strictly described mathematically so they can be interpreted reliably.
The goal of this approach is to automate visual inspection according to strict rules predefined by the user. It is a deterministic approach, and it requires a precise context to detect defects reliably. Each part must be inspected under the same conditions, whether lighting, tilt, or angle.
As a result, rule-based vision is limited in its ability to model a "normal" situation compared to AI-based vision. It can model something simple, definable by rules applied to image processing results, but it cannot model something more complex and variable.
What is AI-based machine vision?
Instead of applying strict rules imposed by a vision expert, artificial intelligence models a situation. The AI trains itself by analyzing an image database.
Based on these images, the software builds, on its own, a model capable of predicting the state of new images. It can categorize images it has never seen before, without them being part of the training database. The larger and higher quality the image database provided, the more accurate the model becomes.
In summary, unlike rule-based vision, which relies on a set of assumptions defined by its user, artificial intelligence autonomously creates its own model, as close to reality as possible, based on multiple real-world examples.
The pros and cons of each approach
Both approaches have their advantages and disadvantages. It is therefore important to select the one best suited to your use case.
Rule-based machine vision
Pros
- It requires very little data and no prior data collection or labeling mechanism.
- It is fully customizable. All criteria are configured in advance, making it very effective for precise measurements and thresholds set to meet a specification.
- It is explainable. Based on a system of strict rules, its behavior is entirely predictable.
Cons
- It is resource-intensive. Its complex configuration requires a vision engineer or technician during programming and maintenance.
- It is difficult to write rules for every possible scenario, especially in complex and dynamic environments. Recognizable defects can only be ones that are already known. A brand-new type of defect, not covered by a rule, cannot be detected.
Artificial intelligence
Pros
- Very flexible. Its ability to keep improving on its own lets it adapt easily and automatically to changes in the environment.
- It saves significant resources, since its configuration is simple and requires no vision expert.
- Very effective in complex and dynamic environments, automating cases that were previously too difficult due to variability in brightness, structure, shape, or texture.
Cons
- Training the software requires quality data in sufficient quantity. The data must be representative of production and properly exploitable to deliver reliable results.
- It cannot set or extract metrological values. Only a compliance status is provided; no measurement is taken.
Which approach should you choose?
The best choice depends entirely on the use case. Artificial intelligence cannot extract metrological data, so rule-based vision is preferable in some cases. Because it is based on a fixed set of rules and cannot evolve without a vision expert, rule-based vision is particularly effective for relatively simple tasks that will not change. For example, if you want to detect an error in the dimensions of a part, rule-based vision is the best choice.
However, rule-based vision cannot adapt to a context where the rules change or are too numerous to define. Artificial intelligence fills that gap by continuously identifying the most complex defects despite variability. It is particularly effective when analyzing products that differ in color, shape, texture, or arrangement of elements.
For example, color or the presence of oil stains when detecting the presence or absence of a seal can introduce a lot of variability. Rule-based vision would require a very large number of rules and would likely result in many incorrect decisions. Artificial intelligence adapts and delivers far more reliable results.
Conclusion
Both approaches have their strengths and weaknesses, and the right choice depends on the specific requirements of your use case. AI-based vision opens the door to applications that would have been impossible a few years ago, and defect detection is particularly well suited to it.
At Visionairy, we decided to make AI-based vision accessible. Our solution lets you automate visual inspection directly on your production lines without any machine vision expertise. Requiring very few samples, it is functional with as few as 30 compliant images.