## 3 Results and Discussion
### SEM and FTIR Observation
Such a microstructure is less effective in inhibiting corrosion compared to a structure with more grain boundaries. Fewer grain boundaries facilitate the diffusion of Cl\({}^{-}\) ions. The increased volume of the grain boundaries enhances the chemical activities involved in surface corrosion, thereby promoting the formation of a dense and highly stable passive film that provides superior protection [17]. The WM zone exhibits the highest corrosion in the HCI solution due to its larger grain size and lower hardness. It is well established that metals with a lower hardness possess lower corrosion resistance [61]. Furthermore, the presence of precipitates formed during the welding process contributes to the elevated corrosion rate observed in the WM zone [62]. These precipitates often contain non-metallic elements that have the potential to accelerate the corrosion kinetics [62]. During the duration of the PP test, there were observable changes in the properties of the H\({}_{2}\) bubbles (Figures 8 and 11). When analyzing the images taken at the E\({}_{\text{corr}}\), it was noted that fewer bubbles were identified on the samples submerged in a solution containing 0.4 g/L of inhibitor, particularly in the WM area. In contrast, a distinct trend was observed in the HAZ and BM regions, where the lowest bubble counts were detected for the specimens immersed in a solution with 0.2 g/L of inhibitor. This variance could be attributed to variations in the microstructural characteristics of the HAZ and BM regions when compared to the WM zone. The coarser grain structure of the WM area does not facilitate the development of a tightly protective layer, resulting in a more active corrosion environment [17] and encouraging the formation of more bubbles. In the samples without inhibitors, the bubbles tend to exhibit larger sizes compared to those found in the samples containing inhibitors (Figure 8). Furthermore, an analysis of the bubble detection through a deep learning model reveals that the quantity of bubbles is higher in the absence of inhibitors when contrasted with their presence (refer to Table 5). Persistent bubbles appeared intermittently on the surface of the specimen, indicating a partial cathodic reaction to reduce the presence of H\({}^{+}\) ions in the H\({}^{+}\)-rich solution (1 M HCl) [35; 56]. Following the polarization potential surpassing the corrosion potential E\({}_{\text{corr}}\) point, there was a gradual reduction in bubble formation, eventually leading to the point where no bubbles were visually observed at the last process of the PP test. This observation aligns with the corrosion process transitioning into the anodic reaction phase. The quantified amount of H\({}_{2}\) gas produced during the PP test (as shown in Figure 11a-c) validates the results obtained from the deep learning-based bubble detection. The rate of H\({}_{2}\) evolution exhibits a parallel pattern with the corrosion rate, consequently reflecting the trend in inhibitor effectiveness, as indicated in Table 3. A direct correlation can be observed: the fewer H\({}_{2}\) bubbles detected, the lower the recorded volume of H\({}_{2}\) gas, and the higher the inhibition efficiency (IE). Hence, conducting a quantitative assessment of H\({}_{2}\) bubble properties and H\({}_{2}\) gas volume should yield a strong correlation with IE.