An Improved Underwater Recognition Algorithm for Subsea X-Tree Key Components Based on Deep Transfer Learning

<jats:p>It is promising to detect or maintain subsea X-trees using a remote operated vehicle (ROV). In this article, an efficient recognition model for the subsea X-tree component is proposed to assist in the autonomous operation of unmanned underwater maintenance vehicles: an efficient network module, SX(subsea X-tree)-DCANet, is designed to replace the CSPBlock of YOLOv4-tiny with ResBlock-D and combine with the ECANet attention module. In addition, two-stage transform learning is used for the insufficiency of underwater target recognition samples as well as the overfitting caused by the subsea target recognition model, thereby providing an effective learning strategy for traditional subsea target recognition. A mosaic data augment algorithm and cosine annealing algorithm are also utilized for better accuracy of network training. The results of ablation studies show that the mean Average Precision (mAP) and speed of the improved algorithm are increased by 1.58% and 10.62%, respectively. Multiple field experiments on the laboratory, experimental pool, and the hydro-electric station prove that the recognition algorithm and training strategy present in this article can be well applied in subsea X-tree component recognition, and can effectively promote the development of intelligent subsea oil extraction projects.</jats:p>

section_content: Under the trend of economic globalization, light and heavy industries are developing rapidly, and energy demand is increasing in all industries. With the development of onshore oil and gas exploration, the increase in global oil and gas reserves is decreasing as well as the size of oil and gas reservoirs, but the difficulty of exploration is increasing. To meet the demand for oil, marine oil and gas development has become a concern at a time when large oil fields are becoming depleted [1]. Therefore, safe, environmentally friendly, and efficient offshore oil development has become one of the methods and research is focused to solve the problem of decreasing resources at this stage [2]. As the functional portal of the underwater operation system, the subsea X-tree is the key equipment for offshore oil and gas production and downhole operation [3]. Studies on fatigue relief [4] and resistance [5] of subsea X-tree drilling continue to be updated, but most of the scientific experimental focus is on strength and mechanical properties, while the intelligent applications in this field are relatively absent. Therefore, the identification of subsea X-tree key components is the key step for intelligent research in this field. In this study, we carried out a target recognition network, which is based on lightweight and accuracy improvement for the X-tree key daily work environment. 

The underwater remote operated vehicle (ROV) plays an important role in X-tree installation and daily maintenance because of its deep-water operation ability and high safety [6]. In addition to the cameras that track the installation and movement of the X-tree in real time, ROVs need to provide tasks such as temporary well-head cover switches, tree locking, unlocking, and subsequent testing. However, the remote-control operation space with low intelligence integration cannot meet the needs of refined tasks. Therefore, intelligent perception assistant operation based on optical vision has become a hot research topic at this stage. The operating system of underwater robots based on an optical visual servo has been applied in increasingly more underwater operation scenarios [6] [7] [8]. Fatan [9] used a multilayer perceptron and targeted underwater cable identification using AUV for the guidance of underwater fiber optic cable overhaul operations. Han [10] conducted a classification recognition study for benthic organisms on the seafloor to detect and locate primary targets while underwater robots collect seafood. Nevertheless, at this stage, there is still a lack of related research on intelligent recognition algorithms of subsea X-trees. 

In addition, although data enhancement is necessary, it is worth considering whether to use digital image preprocessing to compensate for the low quality of seafloor images in the actual recognition process. There are many suspended substances and turbid water, so the obtained underwater images have low contrast, serious color attenuation, and optical scattering phenomena [11]. Underwater image restoration for low illumination, light scattering, and other physical factors has been a hot research topic. Many underwater target recognition applications use many image preprocessing methods to solve the problem of misrecognition caused by environmental distortion [12, 13]. However, the limited computing power of the oil tree maintenance robot and the complex underwater environment require a two-stage migration learning strategy, that is, using ImageNet for pre-training to migrate part of the dataset captured on land, and then migrating on the actual experimental dataset. The X-tree component model used in the recognition experiment in this paper is shown in Figure 1: J. Mar. Sci. Eng. 2022, 10, x FOR PEER REVIEW 2 of 23 tree in real time, ROVs need to provide tasks such as temporary well-head cover switches, tree locking, unlocking, and subsequent testing. However, the remote-control operation space with low intelligence integration cannot meet the needs of refined tasks. Therefore, intelligent perception assistant operation based on optical vision has become a hot research topic at this stage. The operating system of underwater robots based on an optical visual servo has been applied in increasingly more underwater operation scenarios [6] [7] [8]. 

Fatan [9] used a multilayer perceptron and targeted underwater cable identification using AUV for the guidance of underwater fiber optic cable overhaul operations. Han [10] conducted a classification recognition study for benthic organisms on the seafloor to detect and locate primary targets while underwater robots collect seafood. Nevertheless, at this stage, there is still a lack of related research on intelligent recognition algorithms of subsea X-trees. 

In addition, although data enhancement is necessary, it is worth considering whether to use digital image preprocessing to compensate for the low quality of seafloor images in the actual recognition process. There are many suspended substances and turbid water, so the obtained underwater images have low contrast, serious color attenuation, and optical scattering phenomena [11]. Underwater image restoration for low illumination, light scattering, and other physical factors has been a hot research topic. Many underwater target recognition applications use many image preprocessing methods to solve the problem of misrecognition caused by environmental distortion [12, 13]. However, the limited computing power of the oil tree maintenance robot and the complex underwater environment require a two-stage migration learning strategy, that is, using ImageNet for pre-training to migrate part of the dataset captured on land, and then migrating on the actual experimental dataset. The X-tree component model used in the recognition experiment in this paper is shown in Figure 1 The overall blurring and cyan tones of the light-vision images taken in the underwater environment make it difficult to extract the location information and feature information. Therefore, the feature extraction ability, recognition accuracy, and recognition speed need to be taken into account in the process of subsea X-tree component identification network design, to be applied to the subsea X-tree maintenance task in the real environment. The main contributions of this paper are as follows:

(1) A target detection algorithm for the subsea X-tree component is proposed, which can be applied to VR operation assistant positioning and robot real-time positioning and mapping. This achievement, which has good performance through comparison, fills the gap in the field of subsea X-tree-related intelligent detection and recognition. The overall blurring and cyan tones of the light-vision images taken in the underwater environment make it difficult to extract the location information and feature information. Therefore, the feature extraction ability, recognition accuracy, and recognition speed need to be taken into account in the process of subsea X-tree component identification network design, to be applied to the subsea X-tree maintenance task in the real environment. The main contributions of this paper are as follows:

(1) A target detection algorithm for the subsea X-tree component is proposed, which can be applied to VR operation assistant positioning and robot real-time positioning and mapping. This achievement, which has good performance through comparison, fills the gap in the field of subsea X-tree-related intelligent detection and recognition. (2) Based on the YOLOv4-tiny Identify Network framework, the backbone framework replaces the original CSPNet with ResNet-D to speed up detection and avoid loss of information due to 1 × 1 convolution and down-sampling. (3) A more efficient attention mechanism is applied to the two features extracted by the backbone feature extraction module, that is, to optimize the main feature extraction results before obtaining a larger field of perception to ensure more accurate feature information. (4) A two-stage migration learning training strategy is presented. ImageNet is used to pre-train and migrates to the model dataset captured on land; then, the training results of the previous dataset are migrated to the underwater recognition training task. This efficient training strategy effectively makes up for the problem of the small number of underwater datasets and the single scene, which effectively improves the recognition accuracy. (5) This paper establishes an underwater oil extraction tree part identification dataset under multiple backgrounds. It is worth mentioning that the subsea X-tree cannot obtain effective image and video information directly, so we build some models of subsea X-tree parts by using 3D printing technology and build part datasets under different backgrounds, including underwater environment backgrounds. Mosaic data enhancement is used to enhance the acquisition of data during the training process.
section_name: Introduction

section_content: As a hotspot for artificial neural networks and machine learning, deep learning has shown great advantages in speech recognition [14, 15], text recognition [16, 17], pedestrian detection [18, 19], etc. Deep learning networks achieve target recognition by transforming feature information through nonlinear transformation to obtain higher-order features of images. The methods based on deep learning can be divided into two categories, Onestage and Two-stage. One stage can directly predict the location and category of different targets through a convolutional neural network, with representative algorithms such as YOLO [20, 21] and SSD [22] ; the two-stage first generates candidate frames, determines the target location, and then performs classification and regression operations on the candidate frames, with representative algorithms R-CNN [23], Fast R-CNN [24], and Faster R-CNN [25]. Both One-stage and Two-stage are frame-based image recognition algorithms. The box-based image recognition algorithm is the most widely used algorithm in the field of image recognition. The box is divided into the validation box and ground truth box and the validation box can be divided into the prior bounding box and anchor box, where the bounding box will output the specific position of the box (including the coordinates of the center point of the box and the width and height of the box). The bounding box outputs the specific position (including the coordinates of the center point of the box and the width and height of the box), the confidence, and the category, while the anchor box outputs only the width and height of the box. Different algorithms use different boxes to detect the target, so the speed and accuracy of recognition vary. 

YOLOv4-tiny has about 6 million parameters, which is a lightweight version of YOLOv4. Their ratio is 1:10. The network structure has 38 layers in total. Among them, three residual units are used. The channel of the feature extraction network is divided by CSPNet, that is, the feature layer channel output after 3 × 3 convolution is divided into two parts. Two effective feature layers are used for target classification and regression, and the feature pyramid (FPN) network is used to merge the effective feature layers. The activation function uses LeakyReLU. Its structure is shown in Figure 2: YOLOv4-tiny has the main characteristics of multitasking, end-to-end, and multiscale. The network can accomplish both target classification and regression, share parameters, and avoid over-fitting. At the same time, the network will fuse the down-sampled and up-sampled data with each other, which can be used to divide the target into multiple scales. Therefore, YOLOv4-tiny achieves 40. 2% AP50, 371 FPS performance on COCO datasets, which is significantly better than other versions of lightweight models. YOLOv4-tiny has the main characteristics of multitasking, end-to-end, and multiscale. The network can accomplish both target classification and regression, share parameters, and avoid over-fitting. At the same time, the network will fuse the down-sampled and up-sampled data with each other, which can be used to divide the target into multiple scales. Therefore, YOLOv4-tiny achieves 40. 2% AP50, 371 FPS performance on COCO datasets, which is significantly better than other versions of lightweight models.
section_name: Related Work

section_name: Methodology

section_content: The ECA module is a variant of the se module, and the basic idea is that the features u are aggregated across the spatial dimensions of the input feature map using an average pooling method, which helps to improve computational efficiency. Figure 3 shows the structure of the efficient channel attention module. The statistic z is generated by contracting u through its spatial dimension H × W such that the cth element of z is computed as:

δ is the ReLU function and σ is the sigmoid function.
section_name: Efficient Channel Attention Module

section_content: The ECA module is a variant of the se module, and the basic idea is that the features u are aggregated across the spatial dimensions of the input feature map using an average pooling method, which helps to improve computational efficiency. Figure 3 shows the structure of the efficient channel attention module. The statistic z is generated by contracting u through its spatial dimension H × W such that the cth element of z is computed as:

δ is the ReLU function and σ is the sigmoid function. To demonstrate the effect of channel degradation on the effect and the benefit of interaction channel learning, three comparison experiments SE-var1, SE-var2, and SE-var3 are proposed (none of these variable experiments perform channel degradation). Due to the excessive parameters of SE-var3, the authors propose an efficient method for capturing local interaction channel information to reduce the complexity:

The weight parameter of k × C effectively solves the independent problem of different To demonstrate the effect of channel degradation on the effect and the benefit of interaction channel learning, three comparison experiments SE-var1, SE-var2, and SE-var3 are proposed (none of these variable experiments perform channel degradation). Due to the excessive parameters of SE-var3, the authors propose an efficient method for capturing local interaction channel information to reduce the complexity:

The weight parameter of k × C effectively solves the independent problem of different channel learning, based on a kernel size, i. e., where the mapping relation of k and C is:
section_name: Efficient Channel Attention Module

section_content: Because of the duplicate gradient information in the network optimization process, the Cross-Stage Partial Network (CSPNet) is designed to alleviate the problem where the previous work required a large number of inferential calculations from the network architecture perspective. CSPNet ensures the variability of gradients by integrating the beginning and end charts of network phases. As the residual module of YOLOv4-tiny, CSPNet reduces computational effort by 20% while maintaining excellent accuracy. Nevertheless, field tests remind us that the recognition speed still needs to be improved due to the limited computing power of the underwater vehicle. Therefore, the ResBlock-D module is used to replace the original CSPBlock module of YOLOv4-tiny. 

ResBlock-D uses a two-path network to process the input feature map. One layer consists of two layers of 1 × 1 convolution with a 3 × 3 convolution held in the middle, and the other layer includes an average pooling and a 1 × 1 convolution. The ResBlock-D module replaces the 3 × 3 convolution layer in the original CSPBlock module by using a 1 × 1 convolution layer, so although two layers are added in Path 2, the reduced computation is still greater than the increased computation. The structure diagram of the CSPBlock and ResBlock-D modules is compared as shown in Figure 4. Floating-point computational complexity illustrates the degree of specific light weight:

where D is the sum of all convolution layers, M 2 l is the size of the output feature map of the No. i convolution layers, K 2 l is the number of kernel sizes, and C l-1 and C l are the number of input and output channels, respectively. Therefore, the complexity of CSPBlock and ResBlock-D modules can be calculated. Assuming the size of the input image is N × N and the number of channels is C, the number of FLOPs of CSPBlock and the number of FLOPs of ResBlock-D Block are as follows, respectively:

It can be seen from the calculation formula that CSPBlock is more than ten times more complex than ResBlock-D Block because the number of channels is an integer. 

It can be seen from the calculation formula that CSPBlock is more than ten times more complex than ResBlock-D Block because the number of channels is an integer.
section_name: Replace CSPBlock with ResBlock-D

section_content: Underwater target detection has problems such as low image quality and small detection objects due to the special working conditions, and the common detection methods are generally effective. Our network structure is shown in Figure 5. The image size of the input network is 416 × 416 × 3, which is to make the output image of the network have an odd-number width and height so each feature map has only one central cell when dividing the cell. The image is first passed through two convolution layer modules to obtain an output of 104 × 104 × 64. Each convolution layer module contains a batch normalization layer and LeakyReLU as the activation function after the convolution layer. This is to ensure the speed of the network and to prevent network overfitting, which can lead to training anomalies. Usually, the input is passed through the convolution layer module and the residual module, and the deep semantic information is obtained through the convolution
section_name: Network Architecture

section_content: Underwater target detection has problems such as low image quality and small detection objects due to the special working conditions, and the common detection methods are generally effective. Our network structure is shown in Figure 5. The image size of the input network is 416 × 416 × 3, which is to make the output image of the network have an odd-number width and height so each feature map has only one central cell when dividing the cell. The image is first passed through two convolution layer modules to obtain an output of 104 × 104 × 64. Each convolution layer module contains a batch normalization layer and LeakyReLU as the activation function after the convolution layer. This is to ensure the speed of the network and to prevent network overfitting, which can lead to training anomalies. Usually, the input is passed through the convolution layer module and the residual module, and the deep semantic information is obtained through the convolution operation; meanwhile, the up-sampling of the middle and back layers of the network is tensor-stitched, to achieve the purpose of multi-scale feature fusion without changing the tensor dimension. In this paper, the backbone feature extraction network reduces the computational complexity by replacing the CSPBlock in the last layer with ResBlock-D. Using the backbone feature extraction network and the attention module, two effective feature layers with scales of 26 × 26 × 256 and 13 × 13 × 512 can be obtained, which are passed to the enhanced feature extraction network to construct the Feature Pyramid Network (FPN). The FPN will up-sample the effective feature layer of the latter scale after inputting it into the convolution module, and then stack and convolve it with the effective feature layer of the previous scale. The target detection effect is improved by fusing the high and low layers. In the feature utilization part, this network extracts multiple feature layers for target detection, and extracts two feature layers with scales of 26 × 26 × 255 and 13 × 13 × 255, outputs the positions of the prediction frames, and then performs screening and non-extreme suppression on the results to obtain the final results. 

operation; meanwhile, the up-sampling of the middle and back layers of the network is tensor-stitched, to achieve the purpose of multi-scale feature fusion without changing the tensor dimension. In this paper, the backbone feature extraction network reduces the computational complexity by replacing the CSPBlock in the last layer with ResBlock-D. Using the backbone feature extraction network and the attention module, two effective feature layers with scales of 26 × 26 × 256 and 13 × 13 × 512 can be obtained, which are passed to the enhanced feature extraction network to construct the Feature Pyramid Network (FPN). The FPN will up-sample the effective feature layer of the latter scale after inputting it into the convolution module, and then stack and convolve it with the effective feature layer of the previous scale. The target detection effect is improved by fusing the high and low layers. In the feature utilization part, this network extracts multiple feature layers for target detection, and extracts two feature layers with scales of 26 × 26 × 255 and 13 × 13 × 255, outputs the positions of the prediction frames, and then performs screening and nonextreme suppression on the results to obtain the final results.
section_name: Network Architecture

section_content: In SSD and Faster R-CNN, the manually designed anchor box can degrade the detection of the model when it deviates significantly from the target size. In this paper, the algorithm uses the K-means clustering method to train bounding boxes, aiming to replace the manually designed Anchor box by unsupervised learning algorithm analysis. The method aims to divide the dataset into k cluster classes, use the Intersection over Union (IOU) to assign each sample to its closest cluster center, and iteratively update it until the anchor no longer changes, and the optimal box width and height are obtained. Among them, the IOU metric is shown as follows. 

where the expressions for intersection and union are as follows. 

intersection = min(Anchor_w, box_w) × min(Anchor_h, box_h)

The more similar the boxes, the larger their IOU values. When the boxes and anchor completely overlap, i. e., IOU = 1, the distance between them is 0 and the IOU takes the value between 0 to 1, so the final measurement formula is:

Detection is achieved by the output of multiple feature layers and decoding with a decoder to achieve the image prediction frame output. In this case, the feature layer is divided into different sizes of grid points for detection, and the grids are 19 × 19 and 38 × 38, respectively, resulting in prediction results of (N, 19, 19, 3, 85), (N, 38, 38, 3, 85). For each grid cell, the bounding box (bbox) is expected, which includes a parameter x, y corresponding to the position of the center of the prediction box, (H, W) is the width and height of the box, and confidence is the IOU, which is explained in the previous section, as well as the final classification results. We can obtain the center of the prediction box for each grid point corresponding to (x, y), and then use the a priori box and the parameters (H, W) to calculate the length and width of the actual prediction box, to achieve the output of the detection box location information. The decoding process of the prediction results is shown in Figure 6.
section_name: K-Means Clustering Anchor Box and Predicted Results Decoded

section_content: To improve the convergence speed of the model and avoid adding new hyperparameters, SGD (stochastic Gradient Descent) rather than Gradient Descent method and Mini Batch Gradient Descent method is chosen as the learning rate decay strategy for network
section_name: Stochastic Gradient Descent with Restart Algorithm

section_content: To improve the convergence speed of the model and avoid adding new hyperparameters, SGD (stochastic Gradient Descent) rather than Gradient Descent method and Mini Batch Gradient Descent method is chosen as the learning rate decay strategy for network training. However, the gradient descent into the local minimum occurs during the training of underwater targets. The saddle point that occurs when the gradient converges will degrade the performance of the model. Therefore, the warm restart method is chosen by this paper to skip falling into the local optimum by increasing the learning rate. The Stochastic Gradient Descent with Restart (SGDR) algorithm introduces cosine annealing as a way of decreasing the learning rate [26]. 

Warm restarting is started after epochs, which is simulated by increasing the learning rate, used as the initial solution, and the neural network weights are solved by gradient descent to obtain the optimum. The principle of cosine annealing is as follows. 

where i refers to the i-th index; η i max and η i min denote the maximum and minimum values of the learning rate, respectively; T cur represents the current execution epoch; T i denotes the total number of epochs of the I index.
section_name: Stochastic Gradient Descent with Restart Algorithm

section_name: Transfer Learning and Data Enhance

section_content: Transfer learning is a machine learning method, whose main idea is to apply the knowledge of related fields to the target field. As most of the data are related to the task, transfer learning is often used to assist the learning of new models. Pan [27] defined the domains and tasks in transfer learning. With the development of deep learning, the idea of transfer learning has been applied to deep learning tasks. Tan [28] proposed the definition of deep transfer learning:

{D s, T s, D t, T t, f (•)} (13) when f (•) is a nonlinear function of a deep neural network, and the task is a deep transfer learning task, in which T t is the learning task in the target domain D t and T s is the task in the source domain. In most cases, the scale is much larger, and in the case of a given domain D, the task is represented by:

Generally, considering the relationship between the source domain and target domain, transfer learning methods can be divided into 4 categories [29] : instance-based, featurebased, parameter/model-based, and relation-based. At present, model-based deep transfer learning, that is, pre-training models learned from large benchmark datasets in the source domain and fine-tuned, has become the mainstream learning trend. Using ImageNet [30] for pre-training can bring significant improvement when the initial task data are insufficient, avoid some optimization problems of target data, and shorten the research period. In contrast, the weight of training starting from 0 is too random, and the feature extraction ability will be seriously reduced. Therefore, this paper proposes two-stage transfer learning for the identification of subsea X-tree parts:
section_name: Two-Stage Transfer Learning

section_content: The construction and pre-processing of the land-based dataset are key to underwater target recognition. We mirror, rotate, and shear the dataset while simulating the imaging features such as uneven exposure and partial over darkness during underwater filming through the placement of parts, thus weakening the scene degradation phenomenon of underwater recognition. The hues in the real underwater environment are cold and dominated by blue-green tones, so we simulate the hues of real underwater scenes by active image color compensation. This is because the underwater robot has limited computational power during the operation and needs to perform a series of operations such as positioning after the recognition prediction. 

The conventional methods of feature enhancement such as flip and color gamut change can effectively enhance the data, but for the scenario applied in this paper. The fixed orientation and chromaticity make it necessary to have a means of data enhancement that can enrich the background of the target object and prevent the network from generalizing due to the similarity of the background of the training set. Mosaic data enhancement is chosen to meet the disadvantage of having a small underwater dataset. The mosaic data method stitches four labeled images to obtain a new image. The mosaic data enhancement method flow is shown in Figure 8.
section_name: Data Enhance

section_content: The construction and pre-processing of the land-based dataset are key to underwater target recognition. We mirror, rotate, and shear the dataset while simulating the imaging features such as uneven exposure and partial over darkness during underwater filming through the placement of parts, thus weakening the scene degradation phenomenon of underwater recognition. The hues in the real underwater environment are cold and dominated by blue-green tones, so we simulate the hues of real underwater scenes by active image color compensation. This is because the underwater robot has limited computational power during the operation and needs to perform a series of operations such as positioning after the recognition prediction. 

The conventional methods of feature enhancement such as flip and color gamut change can effectively enhance the data, but for the scenario applied in this paper. The fixed orientation and chromaticity make it necessary to have a means of data enhancement that can enrich the background of the target object and prevent the network from generalizing due to the similarity of the background of the training set. Mosaic data enhancement is chosen to meet the disadvantage of having a small underwater dataset. The mosaic data method stitches four labeled images to obtain a new image. The mosaic data enhancement method flow is shown in Figure 8. First, the width and height of the input image (W, H) are used as boundary values to scale the image, and the scaling multiplier is,, which is calculated as follows:

= (, + ∆ )

where represents the random value function;, is the value of the minimum width and height of the image after scaling, respectively; ∆, ∆ is the random length, the value of which is between the scaled width and height values. 

The coordinates of the upper-left and lower-right corners of the group after image scaling are [(, ), (, )], which is obtained from the following equation:

= + × (20) where r1 and r2 are the ratios of the distance between the upper-left coordinate point and O, and the point to the total width of the two groups of images other than the 0 point on the X and Y axes, respectively. From this, the coordinates of the segmentation line can be obtained:

For partial or complete truncation of the image during the scaling and stitching process, we also need to crop out the real frame corresponding to the target.
section_name: Data Enhance

section_name: Results

section_content: In this paper, there are 3654 (3000 + 654) images in the experimental dataset for verifying the recognition algorithm of subsea tree components. The dataset in this paper is First, the width and height of the input image (W, H) are used as boundary values to scale the image, and the scaling multiplier is t X, t Y, which is calculated as follows:

where f random represents the random value function; t W, t H is the value of the minimum width and height of the image after scaling, respectively; ∆t W, ∆t H is the random length, the value of which is between the scaled width and height values. 

The coordinates of the upper-left and lower-right corners of the group after image scaling are [(a i, b i ), (c i, d i )], which is obtained from the following equation:

where r 1 and r 2 are the ratios of the distance between the upper-left coordinate point and O, and the point to the total width of the two groups of images other than the 0 point on the X and Y axes, respectively. From this, the coordinates of the segmentation line can be obtained:

For partial or complete truncation of the image during the scaling and stitching process, we also need to crop out the real frame corresponding to the target.
section_name: Parts Selection, Labeling Strategy, and Test Introduction

section_content: In this paper, there are 3654 (3000 + 654) images in the experimental dataset for verifying the recognition algorithm of subsea tree components. The dataset in this paper is produced by a real subsea X-tree parts model through 3D printing (generated by inputting the digital model file of subsea X-tree simulation parts into the printing machine and printing layer by layer using adhesive materials such as powdered metal or plastic). The ratio of its own size to the size of subsea X-tree parts is 5:1, and the color is painted in the same way as the original subsea X-tree. The parts we selected are umbilical cable terminal connector, electric connector, terminal connector, operating handle, set down position bend limiter, and ROV control panel knob. 

During the labeling process, different scenes are selected as the background of the dataset, in which a mixture of backlight, low brightness, green background, brown background, brown background, blue background, and other artificially constructed background environments is used, to improve the scene generalization of the training dataset and the robustness of model recognition in complex underwater environments, thus reducing problems such as model distortion due to scene inconsistency. 

For the experiments, we use the robot's upper computer for the recognition task to conduct the experiments, and the specific recognition algorithm carrier hardware configuration parameters are described in the next section. Underwater oil recovery tree parts are lifted into the water using a crane, and the recognition image information is acquired through the optical vision system carried on the ROV. The specific parameters of the robot are shown in Table 1 and Figure 9. produced by a real subsea X-tree parts model through 3D printing (generated by inputting the digital model file of subsea X-tree simulation parts into the printing machine and printing layer by layer using adhesive materials such as powdered metal or plastic). The ratio of its own size to the size of subsea X-tree parts is 5:1, and the color is painted in the same way as the original subsea X-tree. The parts we selected are umbilical cable terminal connector, electric connector, terminal connector, operating handle, set down position bend limiter, and ROV control panel knob. 

During the labeling process, different scenes are selected as the background of the dataset, in which a mixture of backlight, low brightness, green background, brown background, brown background, blue background, and other artificially constructed background environments is used, to improve the scene generalization of the training dataset and the robustness of model recognition in complex underwater environments, thus reducing problems such as model distortion due to scene inconsistency. 

For the experiments, we use the robot's upper computer for the recognition task to conduct the experiments, and the specific recognition algorithm carrier hardware configuration parameters are described in the next section. Underwater oil recovery tree parts are lifted into the water using a crane, and the recognition image information is acquired through the optical vision system carried on the ROV. The specific parameters of the robot are shown in Table 1 and Figure 9. All the tests carried out in this paper are completed in the pool. As the subsequent work development is the underwater VR simulation virtual reality technology, we also carry out the development of the pool/robot/target recognition simulation environment. In addition to guiding the daily operation and maintenance of subsea tree parts, the robot can also be self-positioned and input locating information into the system by identifying targets. Figure 10 illustrates that an experiment in one of the experimental pools used the target recognition result feedback VR system for auxiliary positioning. 

Operating voltage/rated power 24 V/2000 W Communication method

Zero buoyancy cable, 100 m Lighting method High-brightness LED × 4

All the tests carried out in this paper are completed in the pool. As the subsequent work development is the underwater VR simulation virtual reality technology, we also carry out the development of the pool/robot/target recognition simulation environment. In addition to guiding the daily operation and maintenance of subsea tree parts, the robot can also be self-positioned and input locating information into the system by identifying targets. Figure 10 illustrates that an experiment in one of the experimental pools used the target recognition result feedback VR system for auxiliary positioning.
section_name: Parts Selection, Labeling Strategy, and Test Introduction

section_content: The hardware configuration is shown in Table 2 : The network training hyperparameters are shown in Table 3.
section_name: Training configuration and parameters

section_content: This paper describes four experiments in total. The first one is to simply identify the 3D-printed model in the laboratory on land. This work mainly includes two aspects: one is to test the reliability of the basic recognition algorithm, and the other is to establish a land dataset to provide the weight that can be used for transfer learning. Two representative underwater experiments are conducted in different pools and depths to test the recognition ability under different degrees of distortion environments. Then, a recognition work in turbid waters is carried out to verify the generalization ability of the proposed algorithm in underwater workpiece recognition. Ablation tests are shown at the end. The result of applying the land pre-training weight directly to the underwater dataset is not outstanding, but the comparison of different evaluation functions under different epochs is shown in Figure 11, which represents the initial situation of transfer learning when approaching 0 steps. This is similar to the case when displaying experiments, where environmental distortion leads to errors in recognition. The construction and recognition of terrestrial datasets are relatively simple. Rotation and translation of components can ensure that we capture more angles and, thus, greatly improve the recognition accuracy, which is based on the quality of datasets. We build a dataset of about 12,000 pieces, so the recognition rate is basically 100% in normal scenarios. Figure 12 shows some of the tests on the laboratory, including normal conditions, motion ambiguity, and the presence of shadowing and complex angles. It can be seen that the average recognition rate is still over 97% even if there is motion blur and the distance and angle change. 

The reason for the two pool tests is that the imaging conditions of the underwater scattering model are different in different waters or water depths. First, the training is carried out by the previous pre-training model and the marked underwater target, which is applied to the target recognition of the two pools. Different pools and depths result in different distortion effects: background changes, tint changes, limited visual range, etc. Therefore, the weights already stable in the previous part cannot be identified in this environment. At the same time, because of the test environment, we cannot obtain too many underwater datasets. Once the position or angle of the parts is changed, the phenomenon that cannot be recognized will occur. However, there is a good performance in underwater identification using the strategy proposed in this paper. It is worth noting that the transfer learning is not ablated in this paper, because the non-underwater datasets cannot be directly used underwater, that is, the pre-training model obtained in the first phase fails in the initial recognition experiment, and the recognition rate is 0 when the observation distance of the underwater robot is 0. 5-1. 5 m. Therefore, the test results show that the two-stage migration learning used in this paper has obvious effects. 

Because the underwater robot requires real-time identification tasks, the speed of identification is also the focus. The FPS values identified under different models are shown in Table 4, which can prove that the algorithm proposed in this paper is lighter: The construction and recognition of terrestrial datasets are relatively simple. Rotation and translation of components can ensure that we capture more angles and, thus, greatly improve the recognition accuracy, which is based on the quality of datasets. We build a dataset of about 12,000 pieces, so the recognition rate is basically 100% in normal scenarios. Figure 12 shows some of the tests on the laboratory, including normal conditions, motion ambiguity, and the presence of shadowing and complex angles. It can be seen that the average recognition rate is still over 97% even if there is motion blur and the distance and angle change. Figure 13 shows the results of two different water pool tests, and from the results, it can be seen that the recognition algorithm presented in this paper performs extremely well in the presence of different degrees of imaging blurring or color degradation. Figure 13 shows the results of two different water pool tests, and from the results, it can be seen that the recognition algorithm presented in this paper performs extremely well in the presence of different degrees of imaging blurring or color degradation. The ablation test in this paper mainly compares with different recognition networks such as SSD and Fast R-CNN series. At the same time, this paper makes a horizontal comparison between our method and the YOLOv4-tiny network and YOLOv4-tiny network with the addition of the attention mechanism module CBMA. Finally, the classical method YOLOv4 is compared. Experimental results show that the proposed target recognition network has absolute advantages when compared with the traditional target recognition framework and the improved target recognition network. Finally, the algorithm in this paper is compared with the classical method YOLOv4. Although this comparison does not consider the factor of speed, the overall performance of SX-DCANet is not as good as YOLOv4, but SX-DCANet still performs better than YOLOv4 in some part recognition tasks. SX-DCANet is faster than traditional algorithms, with an average improvement of 1. 31% in precision and 1. 58% in mAP. Figure 14 shows the performance of different evaluation function values corresponding to different scoring thresholds on multiple parts studied in this paper. Table 5 shows the average value of evaluation functions of different target recognition models under multiple recognition objects.
section_name: Test Records and Comparison of Training Results

section_name: Discussion

section_content: The field test on a hydro-electric station was carried out the following year in Gongzui reservoir, Sichuan Province. The photo of the field test is shown in Figure 15. Due to a large number of sand mining ships upstream, the water quality of the reservoir is very turbid, which is representative of verifying the generalization of the algorithm proposed in this paper. As a result of site factors, we replaced the workpiece with painted yellow pillars against the background of this test as a base point for calibration of the combined navigation coordinates for ROV operations. Similarly, using the proposed scheme, our algorithm can effectively identify industrial objects in turbid waters and has generalization through experimental verification.
section_name: Field Experiment/Generalization Validation

section_content: The underwater target recognition algorithm proposed in this paper has been verified to be extremely effective in the experiment of experimental pools and DAMS, that is to say, the lightweight and efficient recognition network can meet the recognition work of underwater robots. Two-stage transfer learning can effectively make up for the problem of too few supervised objects caused by the difficulty of acquiring underwater datasets. However, this technology still has certain directions that can be improved: In the stage of target recognition, deep learning relies on a large amount of data for continuous training to achieve higher recognition accuracy; in other words, if the prior dataset for transfer learning cannot be obtained, weakly supervised learning will become the focus of subsequent research. Although many field tests have been carried out, there are still differences in the simulation of the deep-water environment. In practical applications, the imaging physical model in deep water will seriously affect the quality of the collected image, making the actual target detection results unsatisfactory. Given these deficiencies, further research will be performed in the next work.
section_name: Future Research Directions

section_content: Thus far, no subsea X-tree parts recognition algorithm has been proposed, and this work is the first underwater recognition of these targets. This paper solves the problem of the difficult acquisition of underwater datasets and low generalization of underwater
section_name: Conclusions

section_content: Thus far, no subsea X-tree parts recognition algorithm has been proposed, and this work is the first underwater recognition of these targets. This paper solves the problem of the difficult acquisition of underwater datasets and low generalization of underwater recognition algorithms due to environmental distortion through multiple experiments and multi-stage transfer learning. An underwater oil tree key component identification method based on depth CNN is proposed. First, ResBlock-D is selected to replace CSPBlock as the middle layer of the feature extraction module to improve the overall lightweight degree of the network. To compensate for the reduced model effect caused by the reduced computation, this paper adds an ECA attention assistance module to the two feature extraction outputs to increase the quality of deep and shallow feature extraction. These changes make the speed of the algorithm proposed in this paper increase by 4. 34 fps compared with that before improvement, and the maximum mPA increases by 4. 2%. Secondly, K-means is used to cluster bounding boxes of training sets and IOU is used as a measure to automatically generate a set of more suitable anchors for the dataset, which effectively improves the detection effect of the network. More importantly, this paper solves the problem of feature extraction ability degradation caused by random weights through two-stage deep transfer learning. That is, when identifying a network of underwater targets with fewer datasets, the weights of the non-underwater datasets are used as the pre-training model. This method combines the pre-processing mosaic data enhancement algorithm selected in this paper to improve the training efficiency and network feature extraction ability in such recognition tasks. Finally, the validity and capability of the proposed method are verified by non-pool and pool tests, and it is proved that the method is superior to the existing target recognition model in accuracy and speed. This model will be used to assist ROV in detecting underwater targets, promoting intelligent and independent operation and maintenance of subsea X-tree, and providing an accurate relative coordinate system for the VR system in operation.
section_name: Conclusions

section_name: Institutional Review Board Statement: Not applicable.

section_content: Funding: This research was funded by the Natural Science Foundation of Heilongjiang Province of China, grant number LH2021E047.

section_content: Informed Consent Statement: Not applicable.
section_name: Institutional Review Board Statement: Not applicable.

section_name: Conflicts of Interest:

section_content: Data Availability Statement: Not applicable.

section_content: The authors declare no conflict of interest.
section_name: Conflicts of Interest: