**2. Materials and Methods**

Machine learning is a subset of artificial intelligence, the purpose of which is to train computers so they are able to learn automatically through experience. Algorithms are used to build a predictive mathematical model capable of generalizing a behavior without being

explicitly programmed [27,28]. In this way, the computer acquires the ability to recognize patterns in sample data to predict future unseen data. Machine learning methods are usually categorized in accordance with their strategy, data processing, and the objective of the application.

Firstly, in the supervised learning approach training, data are composed of a set of previous analyzed examples whose outputs are known. Using these observations as inputs, the computer can learn general rules and establish a correlation to obtain an inferred function, being able to determine the output for new data. On the other hand, human intervention is not required in unsupervised learning algorithms. In this case, a predictive model is trained with unseen data that have not been studied. As a result, it must identify a pattern without previous knowledge. Thirdly, reinforcement learning is a method built on the interaction with its environment. Feedback is used to develop the model through rewards and punishments. Systems learn by analyzing the behavior of their surroundings in response to their actions to maximize positive signals.

This paper focuses on supervised learning to build a predictive model to obtain arithmetic mean roughness from the images of a piece manufactured by incremental forming; as a result, labelled and categorized photographs are used as training data. To this end, the developed model must be capable of extracting characteristics from examples and achieving a relationship between image features and outputs in order to apply this knowledge on new unobserved data.

Having set the objective, the working methodology can be divided into two separate stages: the first phase, aimed at measuring the parts and creating a database that would be used to train machine learning algorithms; the second stage concerning the development and the validation of the classification model.

## *Experimental Details of Measuring Process of Workpieces*

We measured 0.8 mm thick Ti6Al4V alloy parts obtained by a heat-assisted SPIF process to determine the 3D average and maximum roughness parameters (Sa and Sz). The corresponding waviness parameters (Wa and Wz) were also considered. The pieces consisted of cone trunks with a variable wall angle; the angle of the cones was continuously increasing with the forming depth in order to determine the SPIF formability of the alloy. WC and steel tools with a spherical tip of 10 and 12 mm were used and the processing temperature was within the range of 25–400 ◦C [11]. Parts were created in a Deckel Maho machining center, model DMC 835V (DMG MORI, CO., LTD.,Bielefeld, Germany). A hole frame was built to fasten the sheet. An electric suitably isolated mini-oven was specifically designed and fitted inside the support. The forming strategy adopted was a helical path with a pitch of 0.5 mm per revolution, a feed rate of 600 mm per min, and without any lubrication. To minimize any friction between tool and sheet, a counter-rotation speed of the tool was set at 30 rpm.

The sheet in virgin state always is covered by a TiO<sup>2</sup> layer that was not removed by a previous surface treatment, as it is usual in the SPIF for guaranteeing a same initial surface state in all tests.

The parts were specially selected to have a heterogeneous collection of surface finish values (Table 1). The roughness and waviness values reported in Table 1 correspond to measurements taken in intermediate positions of the rolling direction.

A profilometer Form Talysurf 50 and the Talymap software (6.0, Taylor Hobson Ltd., LE4 9JQ, Leicester, UK) were used to measure the roughness and to process the measuring data. An inductive gauge with a 2 µm radius was employed. A block diagram of the measurement procedure is shown in Figure 1. Measurements were carried out on surfaces of 5 mm × 2 mm along three different directions with respect to the rolling direction of the sheet, that is, 0◦ , 45◦ , and 90◦ . The measuring instrument provided an initial profile with some differences to the real surface because of the limitations of the contact profilometry, that is, the gauge radius. From the measured surface, the primary surface is obtained once

its shape (the curvature in this case) is removed. Finally, by using a gaussian filter, the irregularities of the primary profile can be split up in the roughness and waviness profiles.

**Table 1.** Single point incremental forming parameters and surface finish values. The value of wall angle in brackets corresponds to the maximum angle formed. (Initial sheet thickness = 0.8 mm, pitch = 0.5 mm/rev, feed rate = 600 mm/min).


**Figure 1.** Measurement procedure.

According to the shape of the parts obtained by the SPIF process, it was considered appropriate to apply a polynomial of degree 7 to remove that shape and obtain the primary

surface. Some filters were then studied in order to separate the roughness and waviness surfaces that comprise the primary surface. The Gaussian filter is currently the most widely used filtering tool in three-dimensional models because of its isotropic transmission and lack of phase shift according to the standards ISO 11562 and ASME B46. Nevertheless, the symmetry of the filter may cause problems in the edge treatment, which must be removed. Alternately, the spline filter is based on a matrix algorithm which prevents edge defects and is characterized by fast calculations and complex geometry filtering. Nevertheless, this filter has not been widely used in the measurement of 3D surfaces because of its severe anisotropic characteristics. Finally, the robust Gaussian filter used an iterative statistical method in order to improve the Gaussian filter response. This technique allows for a topographic reconstruction without being affected by accidental surface defects. However, it demands large amounts of computation time. Finally, a Gaussian filter, including an edge treatment, was applied by using the Talymap Gold software from Taylor Hobson (6.0, Taylor Hobson Ltd., Leicester, UK).

As a result of the application of the Gaussian filter, roughness and waviness threedimensional profiles were obtained. These were then used to gather surface finish parameters to build a database.

Concurrently, an Olympus SZX7 (Olympus Corp., Tokyo, Japan) stereoscopic microscope was used to take photographs of the measured surfaces. The images, with dimensions of approximately 6.2 mm × 6 mm, were labelled in accordance with the direction and the position in which they were photographed. Additionally, every image was distributed in files associated with the part to which it belonged. As an example, Figure 2 shows the images taken from Part 5 in the rolling direction (0◦ ). Although the references of the different areas are represented for a frustum with a variable wall angle, the part depicted in Figure 2 corresponds to a constant wall angle cone.

**Figure 2.** (**a**) Images corresponding to Part 5 (experiment 5) in the rolling direction at different depths; (**b**–**f**) correspond to Zones 1 to 5, respectively. The rolling direction, RD, corresponds to the vertical axis of the photographs.
