# Intelligent System for Railway Wheelset Press-Fit Inspection Using Deep Learning
## 3 Intelligent Railway Wheelset Inspection System  
### System Overview and Description  
Humans are the most valuable asset in the manufacturing industry. When developing the system, we should need to account for the human-in-the-loop in interaction [41]. To fully describe the main processes of the system, we roughly divide the system architecture into two parts: cyberspace and physical space. The proposed system architecture is presented in Figure 3.  
In cyberspace, the main task is to establish and evaluate the prediction model of press-fit quality. The purpose of the image-preprocessing stage is to automatically segment the press-fit curve region and remove unrelated areas from the original image of the recording press-fit information output using the NC wheelset assembly machine. Figure 4 shows the image preprocessing steps. Figure 4a is an original image, containing the wheelset and press-fit information. Then, we crop the region of interest (ROI) for the press-fit curve at a fixed position in the original image to obtain Figure 4b. The image size of the ROI of the press-fit curve is \(400\times 602\) pixels. To convert the image of the press-fit curve into a binary image for subsequent modeling, we first convert the color press-fit image to grayscale and apply a Gaussian low-pass filter to image smoothing to suppress the high-frequency parts of the image. Then, we use grayscale 127 as the threshold value to binarize the  
Figure 3: The system architecture of the proposed intelligent railway wheelset inspection system.  
smoothed image based on experimental experiences. Pixels with grayscale values below 127 in the image are regarded as candidate objects for the press-fit curve. We take half of the highest 255 grayscales as the binary threshold because, if the threshold value is set too high, over-segmentation will occur. This will allow more false candidate objects to be misjudged as the press-fit curve. However, if the threshold value is set too low, it will cause under-segmentation, which leads to some parts of the press-fit curve being discarded. The initial result after binarization is shown in Figure 4c. In the postprocessing stage, if the area of these objects is too small or the position of an object is obviously not the press-fit curve on image space, such as the straight line above the curve, we will treat these as noise and delete them. The final result is shown in Figure 4d. For a description of the deep Siamese modeling, please refer to the following subsection. Once evaluation and verification of the predictive model are completed, it will be deployed to the enterprise private cloud for remote access by field operators.  
In the physical space, the primary focus is on developing technologies and system operational interfaces. The proposed system was implemented by the following techniques. The web front end of this system was developed by AngularS and other standard technologies, such as HTML, CSS, and JavaScript, to provide an operational interface for on-site operators. Node.js was chosen to build a web server, and RESTful APIs were created to connect the front-end applications with the backend services. Figure 5 shows the query page of the inspection results for the proposed intelligent system. Through this system, operators can upload the original image generated by the NC wheelset assembly machine. Then, the inspection result determined by the prediction model will be sent to the front-end webpage to assist on-site operators in decision-making.  
Figure 4: An output diagram of each stage in the image-preprocessing process. **(a)** The original image of the recording press-fit information output by NC wheelset assembly machines; **(b)** The ROI of the press-fit curve was cropped from the original image; **(c)** The initial binarization result of **(b)**; **(d)** The final result after postprocessing.