TECHNICAL REPORT

Automation of Magnetic Particle Inspection Process
Y. ARAI K. FUSAYASU

M. SUGIHARA

In automating the magnetic particle inspection process for rack and pinion type steering racks, the problems
were the false indication generated on the ridgeline of rack teeth and the variety of defect modes. Focusing on
the strength of magnetization and flow of magnetic particles, we have developed a magnetic particle application
technology suitable for image recognition. In addition, by using deep learning for image recognition, we wereable to overcome these challenges. By combining magnetic particle application technology and image recognition
technology, a recognition accuracy of 0% non-detection and less than 5% over-detection is achieved.
Key Words: magnetic particle testing, automation, deep learning, image recognition

1. Introduction

2. Automation Issues

Due to its declining birthrate and aging population,
Japan’s working-age population peaked in 1995 andhas been declining ever since1), and so, in the coming
years, labor shortages in the manufacturing industry are
expected to become more severe.
In order to address this issue, we have been striving to
improve productivity through automation, reducing thenumber of on-site workers, and by shifting them to higher
value-added tasks.
Among these tasks, the inspection process isparticularly difficult because it includes tasks using
human senses, and the automation of this process has notprogressed as much as expected.
In particular, the magnetic particle inspection process
is used to ensure that there are no defects such as burncracks in the rack and pinion, which are component partsof the rack and pinion steering system, and the constantvelocity joint outer race, which is a component part of thedrive shaft. Visual inspection is conducted on all of theseparts. This inspection requires skilled workers, and it isdifficult to train them. Also, because the work requires
workers to concentrate for long periods of time, there
have been strong demands for automation.
In addition, because the defects to be detected areminute and occur extremely infrequently, the inspection
quality is highly dependent on the operator. Therefore,
if the decision criteria can be quantified by automation,
stable quality assurance can be achieved that is notdependent on the skills of individuals.
This paper describes the development of an automation
technology for magnetic particle inspection and theresults of the development.

2. 1 What Is the Magnetic Particle Inspection Test?

96

The magnetic particle inspection test is an inspection
process that uses magnetic particle testing to detectmicroscopic aperture defects on the surface of a product2).
When a ferromagnetic material such as iron is placedin a magnetic field, magnetic flux penetrates into thematerial. During this process, if there are defects on thematerial surface in a direction that blocks the magnetic
flux, some of the flux leaks out from that area to thesurface. This is called the flux leakage.
In this process, when magnetic particles, which are ironpowder coated with paint, are applied to the surface of thematerial, the magnetic particles are adsorbed by the flux
leakage and form a pattern. This pattern makes it possible
to visualize the location of microscopic aperture defects
that cannot be observed with the naked eye. This is theprinciple of the magnetic particle testing (Fig. 1).
In the actual inspection process, multiple alternating
magnetization is used to detect defects occurring inany direction, and a magnetic particle solution made ofmagnetic particles dispersed in water is showered on theinspection object so that magnetic particles adhere to theentire object. Then, defects are visually checked by theworkers.

JTEKT ENGINEERING JOURNAL English Edition No. 1018E (2022)

Automation of Magnetic Particle Inspection Process

Flux

Flux leakage(Ridge)Magnetic particle solution
Magnetic particles
dispersed in water
Magnetic particles
Iron powder coatedwith paint
Flux leakage(Defect)

Fig. 1 Principle of magnetic particle testing

2. 2 Challenges of Conventional Technology
We examined prior technologies to determine a method
for automating the magnetic particle inspection test. As aresult of a literature survey and interviews with equipment
manufacturers, there is prior technology for automation ofmagnetic particle inspection for defects that occur on flator curved surfaces of simple shapes such as steel, and forautomotive parts with limited defect locations and modes.
However, the product to be automatically inspected in thistest has complex irregularities, and the defect locations
and modes are not limited, making it difficult to apply
the inspection method as it is. The following issues are
considered to be the reasons for the lack of progress inthe development of automation technologies for magnetic
particle inspection tests for objects with complex shapes.
Issue 1: Difficulty in extracting defects due to false
patterns
Normally, when visual inspection is automated, theobject is captured by a camera, image processing suchas filtering and binarization are applied to the acquired
image to extract defects, and a decision is made based onfeatures such as the area and length3). During this process,in order to avoid incorrect decisions, it is important toacquire an image that removes noise other than defects sothat defects can be extracted by image processing.
However, in the magnetic particle testing, magnetic
particles can adhere and produce patterns even though
no defects are present (Fig. 2). This is due to weak flux
leakage occurring at places such as the ridges of theinspection object, and these patterns are classified as false
patterns called a cross-section abrupt change indication4).
When the inspection object has a complex shape, these
false patterns are often generated, making it difficult to
extract defects by image processing.

JTEKT ENGINEERING JOURNAL English Edition No. 1018E (2022)

Defect pattern

False pattern of ridges

Fig. 2 False indication on rack teeth ridgeline

Issue 2: Defects occur in various modes
Defects to be detected by the magnetic particle testing
include burn cracks, which occur when abnormal stresses
occur on the surface of the material during heat treatment.
As the shape of the target product becomes more
complex, the stress state on its surface also becomes more
complex, and the location, direction, and size of burncracks may become more varied (Fig. 3).
It is not easy to design features and decision rules forimage processing that can capture this variety of defects
and distinguish them from false patterns.

Fig. 3 Types of cracks in rack teeth

Therefore, development must be conducted to resolvethese issues.

2. 3 Objectives
The objective of this development is to automate theprocess of magnetic particle inspection test of racks inrack and pinion steering systems.
We defined the false-negative rate and the falsepositive rate as indices of decision accuracy (Fig. 4),
and the development goal was to develop an automation
technology where the false-negative rate is 0% and thefalse-positive rate is less than 5%.

97Automation of Magnetic Particle Inspection Process

False-negative: Overlooking defective products→ Leads to the release of defective products to the market
False-positive: Misclassification of normal products as defective→ Leads to a lower pass-through rate
False-negative rate

Number of false-negative workpieces
Number of inspected workpieces

False-positive rate

Number of false-positive workpieces
Number of inspected workpieces

Fig. 4 Definition of parameters

3. Development Technologies
To address the issues described in the previous section,
this project aimed to achieve its objectives using a twopronged approach by developing technology for applying
magnetic particles and by developing image decision
technology.

3. 1 Magnetic Particle Application Technology
The decision algorithm is important for image
decisions, but it is also important to obtain images whererecognition is easy.
In regular visual inspection, a combination of imaging
methods and lighting is used to make the features ofdefects more prominent. In the magnetic particle testing,the process of adhering magnetic particles to the object iscalled applying magnetic particles, and since this method
greatly affects the features of defects, this development
focused on the method of applying magnetic particles.
With the current method of applying magnetic particles,
the adhesion of magnetic particle to defects is uniform,
but there are shades of adhesion in the false patterns that
occur on the ridges of tooth tips and tooth bases (Fig. 5).
This non-uniformity of magnetic particle adhesion makes
the feature extraction difficult for the decision algorithm.
Front viewof rack teeth

Ridges:Magnetic particles
are adhering to somelocations and notadhering to others
Defects:
Magnetic particles
are adhering

Fig. 5 Current magnetic particle application (rack teeth）

particle solution. In the defect area, the flux leakage
is large and always F 1 defect ≫ F 2, and so the magnetic
particles adhere evenly to the surface. On the other hand,
it is known that the flux leakage at ridges, where crosssection abrupt change indications occur, is smaller than
the flux leakage at a defect, and if the strength of the flow
is non-uniform, it is possible that locations could exist
where F 1 ridge > F 2 and where F 2 > F 1 ridge. This is thought
to produce a non-uniform false pattern.

Magnetic particle
solution flow direction

F2
Force of solution flow sweeping
magnetic particles away
F 1defect
Force that adsorbs magnetic
particles at the defectF 1ridge
Force that adsorbs magnetic
particles at the ridge

Fig. 6 Force acting on magnetic particles

To resolve this issue, we created a uniform flow ofmagnetic particle solution against the inspection surface
and adjusted the balance between F 1 and F 2 by themagnetization strength and flow strength, and developed
two methods of applying magnetic particles.
①Pattern 1: Applying magnetic particles without
generating false patterns
By setting F 1 defect > F 2 > F 1 ridge, the false patterns at theridges are always swept away by the flow of the magnetic
particle solution, and the false patterns at the ridges do notoccur (Fig. 7). This image has the property that defects
can be easily extracted by the decision algorithm.
②Pattern 2: Applying magnetic particles to stably
generate false patterns
By setting F 1 defect > F 1 ridge > F 2, false patterns are not
swept away and uniform false patterns are generated(Fig. 7). This image has the property that both crack andridge features can be obtained by the decision algorithm.

The cause of these types of non-uniform false
patterns is thought to be the effect of the strength of themagnetization and the strength of the flow of the magnetic
particle solution when applying the magnetic particles.
During the application of magnetic particles, there are
two forces acting on the magnetic particles: the force F 1that adsorbs the particles at the magnetic poles and theforce F 2 (Fig. 6)4) generated by the flow of the magnetic

98

JTEKT ENGINEERING JOURNAL English Edition No. 1018E (2022)

Automation of Magnetic Particle Inspection Process

Defects
Thin false pattern
Defects
Thick false pattern

Current adhesion state

No false patterns occur

False patterns occurs on all ridges

Pattern 1

Pattern 2

Fig. 7 Comparison of magnetic particle application methods

3. 2 Image Decision Technology
Existing rule-based processing could not handle theextraction of defects from images containing false patterns
and the detection of a variety of defects. To deal withthese issues, we decided to use an image classification
method based on deep learning as the decision method.
Deep learning is characterized by the fact thatfeatures are automatically extracted and decisions are
made by learning the data. This is expected to enable
it to distinguish between a variety of defects and false
patterns. In this development, supervised learning using
convolutional neural networks (CNNs) was adopted
as the learning method to provide the training for deeplearning. Compared to rule-based decision making, CNNs
are known to be robust to shifts in image position andchanges in shape, color, and brightness, and can recognize
a variety of objects with a single model by training
appropriate data beforehand. In the production lines thatare subject to automated inspection, the products thatflow have different diameters, modules, and gear cutting
directions and angles. Also, these properties of CNN area great advantage because the way that magnetic particles
adhere varies from one product to another.
As a model for deep learning, we created a model
based on EfficientNet5), which is known to have highimage recognition accuracy among CNN architectures.
In supervised learning, both the quality and quantityof the data used as a teacher have an important impact on
the decision results. However, in actual mass production,
the occurrence of cracking defects is extremely rare,
and it is not possible to obtain sufficient data for model
creation. Therefore, by deliberately manipulating theheat treatment conditions, defective samples with various
modes of cracking were created for data acquisition, andimages were acquired. In order to improve the robustnessof the decision-making for various concentrations ofmagnetic particle solution, which vary daily, we alsoacquired images with different concentration levels.
Data enhancement was also performed by image
processing in order to improve the decision accuracy.
For the data enhancement, we prepared images with
deformations and rotations, assuming differences in the
shapes of products based on their model numbers. For

JTEKT ENGINEERING JOURNAL English Edition No. 1018E (2022)

defects that occur infrequently, simulated crack images
are created by GAN*, and finally the obtained images
are divided by a grid, and about 200 000 defect images
are used for training. These processes are expected
to improve the decision accuracy rate even for model
numbers that are not used for learning.
* GAN: A type of machine learning model that can learn
the features of the data for generating previously
non-existent data based on those features.

4. Results
4. 1 Batch Test Results
Two types of images obtained by the developed
magnetic particle application method patterns 1 and2 were acquired for training and decision-making,respectively. The conditions for the images used fortraining were as follows (Table 1).
Table 1 Details of image data
Item

Conditions

Model No.

6 typesQuantity

580 total

Concentration

Level 6

Number of images(after division)

NG (Fail): 200 000
OK (Pass): 150 000

The conditions under which we conducted the study
were as follows (Table 2).
Table 2 Details of deep learning
Item

Conditions

Framework

Tensor FlowModel

EﬃcientNet-based model

Optimization algorithm

Adam

Learning rate

1E-4

Batch size

24

Number of epochs

1099Automation of Magnetic Particle Inspection Process

False-negative/False-positive rate, %The accuracy rate for decisions made under theabove conditions is shown in Fig. 8. The highdimensional features that are output from the model weredimensionally compressed using the t-SNE method**,
and the visualization of the classification status is shownin Fig. 9. The decision accuracy rate is the average of theresults of the three-part cross-validation.
** t-SNE method: Algorithm for compressing dimensions
in order to represent the analysis ofhigh-dimensional data in two or three
dimensions
10
False-negative rate
False-positive rate

9
8
7
6

The decision results showed that pattern 2, where thefalse pattern of the ridges was evenly applied, achieved
the goal of no false-negatives and a low false-positive
rate. It can be confirmed that, under these conditions,the defective section (NG) and the normal section (OK)are more separated. It is thought that the learning model
captured the respective features of both defects and false
patterns for enabling stable decision-making.
On the other hand, image pattern 1, which does not
generate a false pattern, resulted in false-negatives. This isthought to be due to the force that sweeps away the false
pattern becoming stronger, causing the magnetic particles
of some defects to be swept away, making it difficult
to discern the features of the defects. Also, there was atendency to misclassify a small amount of false patterns
as defects, resulting in a large number of false-positives.

5.33
False-positive
rate target

5
4
3

1.93

2

0.87

1

0

0

Pattern 1

Pattern 2

Fig. 8 Accuracy of the image recognition

Based on the results of the batch tests, a method of
applying magnetic particles that stably adhere to the false
patterns was used for the automatic inspection machine
installed in the production line. This inspection machine(Fig. 10) was installed in the production line and flowedin parallel with the conventional manual inspection
machine.

Pattern 2

Pattern 1
NGOK

4. 2 Decision Accuracy Rate in Mass Production

NG
OK

Fig. 9 Visualization of classification
Fig. 10 Automatic inspection machine

10
False-positive rate, %98
76
False-positive rate target

5
4
3
2
0

Feb 1
Feb 2
Feb 3
Feb 4
Feb 5
Feb 6
Feb 8
Feb 15
Feb 16
Feb 17
Feb 18
Feb 19
Mar 3
Mar 4
Mar 5
Mar 8
Mar 9
Mar 10Mar 11
Mar 12
Mar 15
Mar 16
Mar 17
Mar 18Mar 19Mar 22
Mar 23
Mar 24
Mar 25
Mar 26
Mar 27
Apr 1
Apr 2
Apr 3
Apr 5

1

Fig. 11 Over-detection rate in mass production

100

JTEKT ENGINEERING JOURNAL English Edition No. 1018E (2022)

Automation of Magnetic Particle Inspection Process

Parallel flow was conducted from February to April
2021 with approximately 50 000 products, and the resultsof automatic and human decisions during this period wererecorded to calculate the false-positive rate (Fig. 11).
Because there were no defects during the entire period,
verification of false-negatives was conducted using the
NG (Fail) samples prepared beforehand.
Immediately after installation, the number of falsepositives increased due to the difference in the magnetic
particle solution state from the batch test, but the defectdata was acquired again and the model was relearned inorder to adjust to the magnetic particle solution state, andit was confirmed that the false-positive rate remained lessthan 5%. During this process, verification was performed
using NG samples to ensure that no false-negatives
occurred.
In this period, many products with part numbers
not used for training were flowing, but the decisionaccuracy did not decrease, confirming the generalization
performance of the decision model.

References
1)

2)
3)
4)

5)

Ministry of Internal Affairs and Communications,J a p a n : 2 0 1 7 W H I T E PA P E R I n f o r m a t i o n a n dCommunications in Japan (2017) https://www.soumu.
go.jp/johotsusintokei/whitepaper/eng/WP2017/2017index.html.
Japanese Society for Non-destructive Inspection:
Magnetic Particle Testing II (2018) (in Japanese).
Computer Graphic Arts Society: Digital Image
Processing (2012) (in Japanese).
Japanese Society for Non-destructive Inspection:
Magnetic Particle Testing Practical reference book (2018)(in Japanese).
Q. V. Mingxing Tan: “EfficientNet: Rethinking
Model Scaling for Convolutional Neural Networks”,
International Conference on Machine Learning (2019)20.

5. Conclusion
The automation technology that was developed for themagnetic particle inspection test process is capable ofdetecting multiple crack modes in products with complex
shapes, and it has attained a decision accuracy having a
0% false-negative rate and less than 5% false-positive rate
in mass production.
We were able to achieve our objective by combining
decision-making by deep learning, which is capable ofcapturing complex features, with a method of applying
magnetic particles that makes it easier to extract features.
Looking forward, we also intend to implement thistechnology to the magnetic particle inspection test process
for pinion shafts and drive shafts to further reduce humanlabor and improve product quality in the factory.

Y. ARAI****JTEKT ENGINEERING JOURNAL English Edition No. 1018E (2022)

K. FUSAYASU** M. SUGIHARA**

Production Engineering Administration Dept.,
Production Engineering Division
Process innovation Engineering Dept., Production
Engineering Division101