# Animation Design of Multisensor Data Fusion Based on Optimized AVOD Algorithm

Authors: Li Ding; Guobing Wei; Kai Zhang
Journal: Journal of Sensors
 (2022)

---

## Abstract

With the development of artificial intelligence, Internet of things, machine learning, and many other technologies, animation design task based on algorithm theory has become a research hotspot in the field. In recent years, perception technology has gradually become the key technology of animation design, and it is also the key research content in the current field. Whether the perception system can design animation quickly and accurately is the key of research. Compared with other algorithms, using AVOD (Aggregate view object detection) algorithm for animation design has obvious advantages. The original AVOD algorithm has some problems, such as low clustering efficiency, insufficient depth of feature extraction network, and occupying a large amount of memory. Based on this, this paper proposes to use the googleNet network and initial model of k-means++ to extract features and establish an optimized AVOD algorithm. At the same time, in order to illustrate the effectiveness of the optimization method, two typical cases are introduced to provide scientific guidance and reference for the research in this field.


---

## Body

## 1. Introduction

The existence of some wonderful group behaviors, such as the honey gathering of bees, the migration of birds, and the foraging of fish, makes it possible to use computers to simulate and reshape these phenomena. Especially with the development of artificial intelligence [1–3], Internet of things [4–6], machine learning [7–9], and other technologies, animation design tasks based on in-depth learning have become a hot topic in the current field. The early animation design evolved from art films. It uses the visual persistence of the human eye. By shooting and editing one by one, it will gradually change and clearly reflect the continuous dynamic process of the still picture and make it move through a certain playback system, that is, the traditional shooting design method. With the increasing complexity of group behavior and animation model production, neither the traditional animation production methods nor the key frame based technology can well complete some specific tasks and meet the expected requirements. Therefore, exploring and using animation production methods that are relatively simple, efficient, and truly reflect the characteristics of the group have become the focus of many scholars. Intelligent optimization algorithm is a kind of algorithm proposed by imitating the biological behavior of nature. This kind of algorithm has certain adaptive ability and intelligence and can well show the physical characteristics and social essence of the group. Therefore, the application of intelligent algorithm in group animation has gradually become a new research direction [10–12].However, because the object information sensed by a single sensor device is not comprehensive and vulnerable to external interference, people began to study the method of target detection by fusing the image information obtained by the camera and the point cloud information obtained by the lidar [13–15]. The fusion methods include data level fusion, feature level fusion, and result level fusion. MV3D (Multi-View 3D) multisensor target detection algorithm is introduced in the literature: convert the original point cloud into bird’s eye view (BEV) [16–18], generate suggestion boxes using region proposal network (RPN), and generate detection boxes through deep fusion. The anchor frame size in RPN network is given based on experience, and the original data set is not fully utilized, resulting in the target detection frame is not accurate enough [19–21]. Literature [22] is to detect targets, respectively, from the data collected by lidar and camera sensors, and then optimally match the detection results. This result level fusion is not sufficient for data fusion. Literature [23, 24] introduces AVOD algorithm: use k-means clustering to generate a three-dimensional anchor box, use vgg16 network to extract features, fuse the two feature maps to generate a suggestion box, and then refine the suggestion box to generate a detection box.AVOD algorithm [25] only uses the aerial view of point cloud and the front view of image as the data input of the network, improves the RPN network architecture, adds predictive geometry constraints, and improves the accuracy and real-time performance of target detection. Moreover, k-means clustering initially generates k clustering centers randomly, which will affect the clustering efficiency. The depth of vgg16 feature extraction network is not enough, and there are problems of large amount of calculation and large memory occupation at the same time. Feature fusion is only the addition operation at the element level, or the connection at the channel level, without considering the respective characteristics of the two features, and the fusion is not sufficient. Based on the above analysis, this paper makes the following improvements on the basis of AVOD algorithm: firstly, k-means++ algorithm is used to generate three-dimensional anchor frame, which improves the clustering effect and the learning ability of the model to the data set; then, googleNet network with inception model is used for feature extraction; finally, attention mechanism is cited for fusion.AVOD algorithm [25] only uses the aerial view of the point cloud and the front view of the image as the data input of the network, which improves the RPN network architecture, adds predictive geometric constraints, and improves the accuracy and real-time performance of target detection. However, at present, k-means clustering is often used in AVOD algorithm as the initial random generation of k clustering centers, which will greatly affect the clustering efficiency. Moreover, the depth of vgg16 feature extraction network is not enough. At the same time, there are problems of large amount of computation and large memory consumption. More importantly, feature fusion is only the addition operation at the element level or the connection at the channel level, without considering the respective characteristics of the two features, and fusion is not enough.Based on the above analysis, this paper makes the following improvements on the basis of AVOD algorithm:(i)
The k-means++ algorithm is used to generate the three-dimensional anchor framework, which improves the clustering effect and learning ability of the model on the data set(ii)
GoogleNet network with initial model is used for feature extraction, which improves the depth of feature extraction network(iii)
Attention mechanism is introduced for fusion, which greatly reduces the problem of large amount of computation and memory consumption. More importantly, the respective characteristics of the two features are considered


## 2. AVOD Algorithm and Its Optimization Method

### 2.1. AVOD Algorithm

#### 2.1.1. AVOD Algorithm Framework

The network structure of sensor fusion target detection algorithm based on AVOD model is shown in Figure1. The sensor fusion algorithm based on AVOD model is mainly divided into two stages. The first stage is composed of feature extraction network and candidate region generation network, and the second stage is 3D target detection network.Figure 1
AVOD algorithm network framework.In the first stage, the point cloud data is preprocessed to generate a point cloud top view and a 3D prior frame. Two same feature extraction networks are used for feature extraction to obtain image feature map and point cloud feature map. Two kinds of characteristic graphs pass through1×1, respectively. The convolution layer is dimensionally reduced and trimmed. After adjusting the size of the feature map, the 3D prior frame is mapped to the adjusted feature map and fused with the features in the prior frame area to generate the feature crop. After the feature tensor is fused, it is input into the whole convolution layer to generate the candidate box, and the candidate box with high confidence is retained by NMS method. In the second stage, the 3D target detection network first fuses the candidate frames with the adjusted feature map, and then classifies and regresses the candidate frames to obtain the category and location information of the 3D prediction frames.


#### 2.1.2. Data Preprocessing

(1) Generation of 3D Prior Box. The initial prior box generates one of the input data used to generate the network in the candidate area. First, select −40,40×0,70×point cloud data within the range of [0, 2.5] (i.e., 40 meters to the left and right of the center of the lidar coordinate system, 70 meters in front, and 0 to 2.5 meters in the vertical direction); then, a priori boxes in horizontal and vertical directions are generated in each dimension; finally, empty prior frames are filtered out to obtain nonempty 3D prior frames.(2) Point Cloud Data Projection. Before inputting point cloud data into the network, it is necessary to preprocess the point cloud data to meet the needs of feature extraction network. Project the original three-dimensional point cloud data onto the two-dimensional plane, that is, project the point cloud data onto the top view. First, set the resolution of point cloud data to 0.1 M per pixel. Then, select [-40, 40] the point cloud data within the range of [0, 70] that is projected onto the top view, and the resolution is 700×800 black and white images. In order to increase the information content of the data in the top view of the point cloud, the point cloud data information in the range of [0, 2.5] in the vertical direction is divided into five layers, and the point cloud data information of different layers is projected to the resolution of 700×800 point cloud top view. Finally, it forms 700×800×600 with the top view of the original point cloud, as one of the input data of the feature extraction network.A two-dimensional RGB image of a frame, as shown in Figure2, is the top view of the corresponding 6-layer point cloud. Figure 2(a) is the top view of the original point cloud, and Figure 2(b) is the top view of the point cloud from the lower to the upper 1-5 layers. When the point cloud of the target object is projected to the top view, the size change is very small, and the target objects occupy different spaces in the top view, which avoids the problem of target occlusion.Figure 2
Top view of point cloud of a frame.
(a)(b)


#### 2.1.3. Feature Extraction

This chapter adopts the feature extraction network based on FPN, with the size of480×1590×3 front view and size of image is 700×800×6 as the input of the network, feature extraction is carried out to generate a high-resolution feature map. The structure of FPN feature extraction network is shown in Figure 3.Figure 3
Structure of feature extraction network.The feature extraction network based on FPN is composed of encoder and decoder. The encoder is based on VGG-16 network, reducing the number of channels and using the first four convolution layers. The decoder is divided into three layers from bottom to top. Each layer samples the output of the previous layer and fuses it with the corresponding layer of the encoder, and then uses3×3. Finally, the feature extraction network outputs a high-resolution feature map with the same size as the input data. These high-resolution feature maps combine the low-level detail information and high-level semantic information and significantly improve the detection effect of small target objects.


#### 2.1.4. Candidate Area Generation

The function of the candidate region generation network is to generate candidate frames that may contain target objects after processing and merging the image output from the feature extraction network and the point cloud feature map.(1) Feature Fusion. If the feature tensor is extracted directly from the high dimensional feature map, the storage of data and the calculation of RPN network will be greatly increased. Therefore, the full resolution feature map output from the FPN-based feature extraction network needs to be transmitted through 1×1 and reduces the dimension of convolution layer to reduce parameters and computation. Then, adjust the size of the image and point cloud feature map. The pregenerated 3D prior frame is mapped to the adjusted image and point cloud feature map to obtain two regions of interest (ROI). The feature tensor is extracted from the corresponding feature map using the region of interest, and then the bilinear longitude of the feature tensor is 3×3 is adjusted to obtain the feature vector of equal length.(2) Candidate Area Generation. Firstly, the processed feature tensor is fused by pixels, and then the fused feature is tensor by RPN network to generate the target candidate box, and the target candidate box is classified and regression predicted. Finally, NMS method is used to process the generated 3D candidate box and select the best 3D candidate box. RPN method not only has good performance in 2D target detection but also has excellent performance in 3D target detection. The network structure of RPN is shown in Figure 4.Figure 4
Network structure of RPN.The RPN method takes the feature map output by the convolution layer as the input and outputs a series of candidate boxes that may contain the target object. Take an image feature map as an example. First, a size of3×3, and then generate preset k rectangular boxes with fixed size and aspect ratio on each pixel corresponding to the convolution kernel (i.e., sliding window) (generally k=3, threeaspectratios×threescales), namely the anchor box. Deploying a priori box in advance can narrow the search scope of the target object and speed up the convergence of the model. The three aspect ratios of a priori frame are generally 1 : 1, 1 : 2, and 2 : 1, and the three scales are generally 128×128, 256×256, and 512×512. After convolution of upsampling and downsampling, the characteristic maps of three different scales are classified and regressed. Compared with the selective search method, the RPN method only extracts the features of the feature map once, which greatly reduces the complexity of the feature map network and improves the speed of the whole target detection network.Regression prediction outputs the results in the form of (tx,ty,tz,dx,dy,anddz), where the coordinates of the central point of the tx,ty,andtz 3D prediction frame dx,dy,anddz are the length, width, and height of the 3D candidate frame on the x, y, and z axes, respectively, where (tx and ty) are sampled at an interval of 0.5 m through the point cloud data, tz is determined by the height of the sensor from the ground, and (dx,dy,anddz) are determined by the clustering of the targets in the training sample.


#### 2.1.5. Object Detection

(1) 3D Bounding Box Coding. There are 8 regression points of 3D bounding box, and there are mainly 3 coding methods for 3D bounding box, as shown in Figure 5.Figure 5
Encoding method of 3D prediction frame.For the three coding methods in the figure, (a) is the coding method of MV3D algorithm, which is too miscellaneous; (b) the encoding method of axis aligned algorithm is easy to cause prediction frame drift. This chapter selects the coding method (c) through 10 dimensions (2×thevectorof4+2) represents the 3D prediction frame, which realizes the dimensionality reduction processing of coding and effectively reduces the amount of parameters and operations.(2) Forecast Box Generation. The number of 3D candidate frames generated by the candidate region generation network is one order of magnitude lower than that of 3D prior frames, so the 3D candidate frames are adjusted and fused with the original feature map. The fused characteristic crops are predicted by using the full connection layer, and the regression information, direction estimation, and category classification of each candidate box are output. Then NMS method is used to remove redundant 3D prediction frames, and finally 3D candidate frames with high confidence are output. When calculating the 3D candidate box regression, filter the 3D background box (that is, the 3D candidate box that does not contain the target). By calculating the IoU value of the projection area of the 3D candidate box and the real boundary box on the top view of the point cloud, if the IoU value is less than 0.3, it is regarded as the 3D background box, and if the IoU value is greater than 0.5, it is the 3D candidate box containing the vehicle target object. Then NMS method is used to remove redundant 3D candidate boxes.


#### 2.1.6. Loss Function

The loss function in this chapter is mainly divided into two parts, positioning loss and classification loss. The location loss adopts smooth L1 function, and the classification loss adopts cross entropy function.Smooth L1 function, as shown in equation (1):
(1)Lclass=∑j=1Nyjlogsj,where y is the vector of the real label; s is the vector of network prediction; i is the number of categories of the target object.Softmax function, as shown in equation (2):
(2)Lreg=lobj0.5x2,x<1lobjx−0.5,x>1,where lobj is whether a feature point is a positive sample. If it is a positive sample, the value is 1, otherwise it is 0.


### 2.2. AVOD Advantages

AVOD algorithm is actually developed on the basis of MV3D method. Through the analysis of MV3D and AVOD algorithm, the improvement of AVOD is shown in the following aspects:(i)
Network input: the network input of MV3D is the aerial view of point cloud, the front view of point cloud and image, while the input of AVOD is only the aerial view and image, which simplifies the network model and improves the detection speed(ii)
Feature extraction network: MV3D selects VGG-16 network for feature extraction, and AVOD selects RPN structure for feature extraction, as shown in Figure3. We can make full use of the feature map of different scales to obtain the full resolution feature map, so AVOD has higher detection accuracy for small target objects(iii)
Fusion strategy: MV3D adopts the feature fusion strategy of deep fusion, and AVOD uses the early fusion strategy to fuse the two feature maps to extract candidate regions, which can improve the detection performance of small targets. In the process of feature fusion, AVOD performs convolution dimensionality reduction on the feature map, reducing the amount of calculation on the original basis(iv)
Coding method: MV3D uses 8 vertex coordinates to describe the position and size of the 3D bounding box, which needs a 24 dimensional vector to represent. AVOD uses the bottom and height to limit the shape of the 3D bounding box, plus the coordinates of four vertices to determine the position. A 10 dimensional vector is sufficient, as shown in Figure5


### 2.3. AVOD Optimization Algorithm

#### 2.3.1. 3D Anchor Box Generation

In AVOD model,k (K=2) clustering centers are randomly generated by k-means as the size of anchor box. The selection of K value in the algorithm and the randomness of K initial clustering centers will affect the size of anchor box, and ultimately affect the accuracy of detection. Improve this: use the k-means++ method to cluster, and use the elbow method to select the optimal K value. Finally, cluster the original data into K groups of height, width, and length data as the anchor frame size. The specific steps are as follows:(1) extract the height, width, and length of objects in the data as clustering data points; (2) randomly select a point from the cluster data point set as the first cluster center; (3) calculate the distance between each data point and the existing clustering center, and use the elbow method to calculate the clustering error; (4) select the points with larger distance as the new clustering center; (5) repeat steps (2) and (3) draw the variation curve between clustering error and K value (the range of K value is generally 1 ~ 9), and then select the best K value; (6) The cluster center when extracting the best K value is used as the anchor frame size.


#### 2.3.2. Feature Extraction Network

In the feature extraction network, the depth of the network is directly related to the effect of feature extraction. VGG-16 network in AVOD algorithm removes the full connection layer, with a total of 13 layers, and the parameter quantity reaches14.7×107, and memory consumption reached 15.2 MB. And in VGG network 3×3, the receptive field obtained by convolution kernel of is too single, which is not conducive to feature extraction of multiple size targets. Therefore, the algorithm in this paper has been improved. GoogleNet network with inception V1 is used for feature extraction. Compared with VGG-16 network, it is optimized from two aspects of network depth and width, which is conducive to extracting a variety of features. In the optimization algorithm, the full connection layer and auxiliary classifier in googleNet network are removed, and only the convolution layer, pooling layer, and inception structure are used for feature extraction. The network structure is shown in Figure 6. Figure 7 shows the structure of inception V1, using with different sizes 1×1,3×3,and5×5; convolution kernel obtains different receptive field features, that is, features of different scales, and then enhances the effect of feature extraction by fusing features of different scales. In addition, 1 is also introduced in inception V1 1×1; convolution is used to reduce the dimension, which reduces the amount of calculation. The improved feature extraction network has reached 22 layers, and the network is widened through inception structure, with a parameter of about 5.8×107, which is 1/3 of VGG network parameters. The memory consumption is about 6 MB, which is 2/5 of VGG network.Figure 6
GoogleNet network with inception V1.Figure 7
Inception structure.Using the improved AVOD algorithm of k-means + + and googleNet, the efficiency and accuracy in simple, medium, and difficult animation design have been improved, the average accuracy of BEV detection will also be greatly improved, and the efficiency of 3D animation design will also be improved. On the basis of the above improvements, the average accuracy of detection will be further improved after introducing attention mechanism for feature fusion. Compared with the original AVOD algorithm, the optimized AVOD algorithm has more advantages, and it has also more application prospects.


#### 2.3.3. Feature Fusion Based on Attention Mechanism

In recent years, attention mechanism has been widely used in deep learning tasks. Attention mechanism can obtain the difference of the importance of each part of the input characteristic matrix, so as to give different weights, extract more critical and differentiated information, and make the model make more accurate judgments.In the feature fusion stage, AVOD algorithm simply connects the image features at the channel level, without considering the differences between the image and the point cloud features. This simple fusion method will greatly affect the accuracy of target detection. Therefore, a feature fusion method based on attention mechanism is proposed, and its structure is shown in Figure8.Figure 8
Loss changes.Firstly, the obtained image and the BEV feature of point cloud are analyzed2×2. Maximize pool operation and reuse 1×1; the convolution and activation function generates the scale factor of image feature and BEV feature and performs the sum operation according to the scale factor to generate the fused feature for the subsequent generation of detection frame. Sigmoid function is selected as the activation function, and the scale factor is
(3)p=11+e−z,where z is the result of convolution. According to Formula (3), the final calculation is the range of p from 0 to 1.


## 2.1. AVOD Algorithm

### 2.1.1. AVOD Algorithm Framework

The network structure of sensor fusion target detection algorithm based on AVOD model is shown in Figure1. The sensor fusion algorithm based on AVOD model is mainly divided into two stages. The first stage is composed of feature extraction network and candidate region generation network, and the second stage is 3D target detection network.Figure 1
AVOD algorithm network framework.In the first stage, the point cloud data is preprocessed to generate a point cloud top view and a 3D prior frame. Two same feature extraction networks are used for feature extraction to obtain image feature map and point cloud feature map. Two kinds of characteristic graphs pass through1×1, respectively. The convolution layer is dimensionally reduced and trimmed. After adjusting the size of the feature map, the 3D prior frame is mapped to the adjusted feature map and fused with the features in the prior frame area to generate the feature crop. After the feature tensor is fused, it is input into the whole convolution layer to generate the candidate box, and the candidate box with high confidence is retained by NMS method. In the second stage, the 3D target detection network first fuses the candidate frames with the adjusted feature map, and then classifies and regresses the candidate frames to obtain the category and location information of the 3D prediction frames.


### 2.1.2. Data Preprocessing

(1) Generation of 3D Prior Box. The initial prior box generates one of the input data used to generate the network in the candidate area. First, select −40,40×0,70×point cloud data within the range of [0, 2.5] (i.e., 40 meters to the left and right of the center of the lidar coordinate system, 70 meters in front, and 0 to 2.5 meters in the vertical direction); then, a priori boxes in horizontal and vertical directions are generated in each dimension; finally, empty prior frames are filtered out to obtain nonempty 3D prior frames.(2) Point Cloud Data Projection. Before inputting point cloud data into the network, it is necessary to preprocess the point cloud data to meet the needs of feature extraction network. Project the original three-dimensional point cloud data onto the two-dimensional plane, that is, project the point cloud data onto the top view. First, set the resolution of point cloud data to 0.1 M per pixel. Then, select [-40, 40] the point cloud data within the range of [0, 70] that is projected onto the top view, and the resolution is 700×800 black and white images. In order to increase the information content of the data in the top view of the point cloud, the point cloud data information in the range of [0, 2.5] in the vertical direction is divided into five layers, and the point cloud data information of different layers is projected to the resolution of 700×800 point cloud top view. Finally, it forms 700×800×600 with the top view of the original point cloud, as one of the input data of the feature extraction network.A two-dimensional RGB image of a frame, as shown in Figure2, is the top view of the corresponding 6-layer point cloud. Figure 2(a) is the top view of the original point cloud, and Figure 2(b) is the top view of the point cloud from the lower to the upper 1-5 layers. When the point cloud of the target object is projected to the top view, the size change is very small, and the target objects occupy different spaces in the top view, which avoids the problem of target occlusion.Figure 2
Top view of point cloud of a frame.
(a)(b)


### 2.1.3. Feature Extraction

This chapter adopts the feature extraction network based on FPN, with the size of480×1590×3 front view and size of image is 700×800×6 as the input of the network, feature extraction is carried out to generate a high-resolution feature map. The structure of FPN feature extraction network is shown in Figure 3.Figure 3
Structure of feature extraction network.The feature extraction network based on FPN is composed of encoder and decoder. The encoder is based on VGG-16 network, reducing the number of channels and using the first four convolution layers. The decoder is divided into three layers from bottom to top. Each layer samples the output of the previous layer and fuses it with the corresponding layer of the encoder, and then uses3×3. Finally, the feature extraction network outputs a high-resolution feature map with the same size as the input data. These high-resolution feature maps combine the low-level detail information and high-level semantic information and significantly improve the detection effect of small target objects.


### 2.1.4. Candidate Area Generation

The function of the candidate region generation network is to generate candidate frames that may contain target objects after processing and merging the image output from the feature extraction network and the point cloud feature map.(1) Feature Fusion. If the feature tensor is extracted directly from the high dimensional feature map, the storage of data and the calculation of RPN network will be greatly increased. Therefore, the full resolution feature map output from the FPN-based feature extraction network needs to be transmitted through 1×1 and reduces the dimension of convolution layer to reduce parameters and computation. Then, adjust the size of the image and point cloud feature map. The pregenerated 3D prior frame is mapped to the adjusted image and point cloud feature map to obtain two regions of interest (ROI). The feature tensor is extracted from the corresponding feature map using the region of interest, and then the bilinear longitude of the feature tensor is 3×3 is adjusted to obtain the feature vector of equal length.(2) Candidate Area Generation. Firstly, the processed feature tensor is fused by pixels, and then the fused feature is tensor by RPN network to generate the target candidate box, and the target candidate box is classified and regression predicted. Finally, NMS method is used to process the generated 3D candidate box and select the best 3D candidate box. RPN method not only has good performance in 2D target detection but also has excellent performance in 3D target detection. The network structure of RPN is shown in Figure 4.Figure 4
Network structure of RPN.The RPN method takes the feature map output by the convolution layer as the input and outputs a series of candidate boxes that may contain the target object. Take an image feature map as an example. First, a size of3×3, and then generate preset k rectangular boxes with fixed size and aspect ratio on each pixel corresponding to the convolution kernel (i.e., sliding window) (generally k=3, threeaspectratios×threescales), namely the anchor box. Deploying a priori box in advance can narrow the search scope of the target object and speed up the convergence of the model. The three aspect ratios of a priori frame are generally 1 : 1, 1 : 2, and 2 : 1, and the three scales are generally 128×128, 256×256, and 512×512. After convolution of upsampling and downsampling, the characteristic maps of three different scales are classified and regressed. Compared with the selective search method, the RPN method only extracts the features of the feature map once, which greatly reduces the complexity of the feature map network and improves the speed of the whole target detection network.Regression prediction outputs the results in the form of (tx,ty,tz,dx,dy,anddz), where the coordinates of the central point of the tx,ty,andtz 3D prediction frame dx,dy,anddz are the length, width, and height of the 3D candidate frame on the x, y, and z axes, respectively, where (tx and ty) are sampled at an interval of 0.5 m through the point cloud data, tz is determined by the height of the sensor from the ground, and (dx,dy,anddz) are determined by the clustering of the targets in the training sample.


### 2.1.5. Object Detection

(1) 3D Bounding Box Coding. There are 8 regression points of 3D bounding box, and there are mainly 3 coding methods for 3D bounding box, as shown in Figure 5.Figure 5
Encoding method of 3D prediction frame.For the three coding methods in the figure, (a) is the coding method of MV3D algorithm, which is too miscellaneous; (b) the encoding method of axis aligned algorithm is easy to cause prediction frame drift. This chapter selects the coding method (c) through 10 dimensions (2×thevectorof4+2) represents the 3D prediction frame, which realizes the dimensionality reduction processing of coding and effectively reduces the amount of parameters and operations.(2) Forecast Box Generation. The number of 3D candidate frames generated by the candidate region generation network is one order of magnitude lower than that of 3D prior frames, so the 3D candidate frames are adjusted and fused with the original feature map. The fused characteristic crops are predicted by using the full connection layer, and the regression information, direction estimation, and category classification of each candidate box are output. Then NMS method is used to remove redundant 3D prediction frames, and finally 3D candidate frames with high confidence are output. When calculating the 3D candidate box regression, filter the 3D background box (that is, the 3D candidate box that does not contain the target). By calculating the IoU value of the projection area of the 3D candidate box and the real boundary box on the top view of the point cloud, if the IoU value is less than 0.3, it is regarded as the 3D background box, and if the IoU value is greater than 0.5, it is the 3D candidate box containing the vehicle target object. Then NMS method is used to remove redundant 3D candidate boxes.


### 2.1.6. Loss Function

The loss function in this chapter is mainly divided into two parts, positioning loss and classification loss. The location loss adopts smooth L1 function, and the classification loss adopts cross entropy function.Smooth L1 function, as shown in equation (1):
(1)Lclass=∑j=1Nyjlogsj,where y is the vector of the real label; s is the vector of network prediction; i is the number of categories of the target object.Softmax function, as shown in equation (2):
(2)Lreg=lobj0.5x2,x<1lobjx−0.5,x>1,where lobj is whether a feature point is a positive sample. If it is a positive sample, the value is 1, otherwise it is 0.


## 2.1.1. AVOD Algorithm Framework

The network structure of sensor fusion target detection algorithm based on AVOD model is shown in Figure1. The sensor fusion algorithm based on AVOD model is mainly divided into two stages. The first stage is composed of feature extraction network and candidate region generation network, and the second stage is 3D target detection network.Figure 1
AVOD algorithm network framework.In the first stage, the point cloud data is preprocessed to generate a point cloud top view and a 3D prior frame. Two same feature extraction networks are used for feature extraction to obtain image feature map and point cloud feature map. Two kinds of characteristic graphs pass through1×1, respectively. The convolution layer is dimensionally reduced and trimmed. After adjusting the size of the feature map, the 3D prior frame is mapped to the adjusted feature map and fused with the features in the prior frame area to generate the feature crop. After the feature tensor is fused, it is input into the whole convolution layer to generate the candidate box, and the candidate box with high confidence is retained by NMS method. In the second stage, the 3D target detection network first fuses the candidate frames with the adjusted feature map, and then classifies and regresses the candidate frames to obtain the category and location information of the 3D prediction frames.


## 2.1.2. Data Preprocessing

(1) Generation of 3D Prior Box. The initial prior box generates one of the input data used to generate the network in the candidate area. First, select −40,40×0,70×point cloud data within the range of [0, 2.5] (i.e., 40 meters to the left and right of the center of the lidar coordinate system, 70 meters in front, and 0 to 2.5 meters in the vertical direction); then, a priori boxes in horizontal and vertical directions are generated in each dimension; finally, empty prior frames are filtered out to obtain nonempty 3D prior frames.(2) Point Cloud Data Projection. Before inputting point cloud data into the network, it is necessary to preprocess the point cloud data to meet the needs of feature extraction network. Project the original three-dimensional point cloud data onto the two-dimensional plane, that is, project the point cloud data onto the top view. First, set the resolution of point cloud data to 0.1 M per pixel. Then, select [-40, 40] the point cloud data within the range of [0, 70] that is projected onto the top view, and the resolution is 700×800 black and white images. In order to increase the information content of the data in the top view of the point cloud, the point cloud data information in the range of [0, 2.5] in the vertical direction is divided into five layers, and the point cloud data information of different layers is projected to the resolution of 700×800 point cloud top view. Finally, it forms 700×800×600 with the top view of the original point cloud, as one of the input data of the feature extraction network.A two-dimensional RGB image of a frame, as shown in Figure2, is the top view of the corresponding 6-layer point cloud. Figure 2(a) is the top view of the original point cloud, and Figure 2(b) is the top view of the point cloud from the lower to the upper 1-5 layers. When the point cloud of the target object is projected to the top view, the size change is very small, and the target objects occupy different spaces in the top view, which avoids the problem of target occlusion.Figure 2
Top view of point cloud of a frame.
(a)(b)


## 2.1.3. Feature Extraction

This chapter adopts the feature extraction network based on FPN, with the size of480×1590×3 front view and size of image is 700×800×6 as the input of the network, feature extraction is carried out to generate a high-resolution feature map. The structure of FPN feature extraction network is shown in Figure 3.Figure 3
Structure of feature extraction network.The feature extraction network based on FPN is composed of encoder and decoder. The encoder is based on VGG-16 network, reducing the number of channels and using the first four convolution layers. The decoder is divided into three layers from bottom to top. Each layer samples the output of the previous layer and fuses it with the corresponding layer of the encoder, and then uses3×3. Finally, the feature extraction network outputs a high-resolution feature map with the same size as the input data. These high-resolution feature maps combine the low-level detail information and high-level semantic information and significantly improve the detection effect of small target objects.


## 2.1.4. Candidate Area Generation

The function of the candidate region generation network is to generate candidate frames that may contain target objects after processing and merging the image output from the feature extraction network and the point cloud feature map.(1) Feature Fusion. If the feature tensor is extracted directly from the high dimensional feature map, the storage of data and the calculation of RPN network will be greatly increased. Therefore, the full resolution feature map output from the FPN-based feature extraction network needs to be transmitted through 1×1 and reduces the dimension of convolution layer to reduce parameters and computation. Then, adjust the size of the image and point cloud feature map. The pregenerated 3D prior frame is mapped to the adjusted image and point cloud feature map to obtain two regions of interest (ROI). The feature tensor is extracted from the corresponding feature map using the region of interest, and then the bilinear longitude of the feature tensor is 3×3 is adjusted to obtain the feature vector of equal length.(2) Candidate Area Generation. Firstly, the processed feature tensor is fused by pixels, and then the fused feature is tensor by RPN network to generate the target candidate box, and the target candidate box is classified and regression predicted. Finally, NMS method is used to process the generated 3D candidate box and select the best 3D candidate box. RPN method not only has good performance in 2D target detection but also has excellent performance in 3D target detection. The network structure of RPN is shown in Figure 4.Figure 4
Network structure of RPN.The RPN method takes the feature map output by the convolution layer as the input and outputs a series of candidate boxes that may contain the target object. Take an image feature map as an example. First, a size of3×3, and then generate preset k rectangular boxes with fixed size and aspect ratio on each pixel corresponding to the convolution kernel (i.e., sliding window) (generally k=3, threeaspectratios×threescales), namely the anchor box. Deploying a priori box in advance can narrow the search scope of the target object and speed up the convergence of the model. The three aspect ratios of a priori frame are generally 1 : 1, 1 : 2, and 2 : 1, and the three scales are generally 128×128, 256×256, and 512×512. After convolution of upsampling and downsampling, the characteristic maps of three different scales are classified and regressed. Compared with the selective search method, the RPN method only extracts the features of the feature map once, which greatly reduces the complexity of the feature map network and improves the speed of the whole target detection network.Regression prediction outputs the results in the form of (tx,ty,tz,dx,dy,anddz), where the coordinates of the central point of the tx,ty,andtz 3D prediction frame dx,dy,anddz are the length, width, and height of the 3D candidate frame on the x, y, and z axes, respectively, where (tx and ty) are sampled at an interval of 0.5 m through the point cloud data, tz is determined by the height of the sensor from the ground, and (dx,dy,anddz) are determined by the clustering of the targets in the training sample.


## 2.1.5. Object Detection

(1) 3D Bounding Box Coding. There are 8 regression points of 3D bounding box, and there are mainly 3 coding methods for 3D bounding box, as shown in Figure 5.Figure 5
Encoding method of 3D prediction frame.For the three coding methods in the figure, (a) is the coding method of MV3D algorithm, which is too miscellaneous; (b) the encoding method of axis aligned algorithm is easy to cause prediction frame drift. This chapter selects the coding method (c) through 10 dimensions (2×thevectorof4+2) represents the 3D prediction frame, which realizes the dimensionality reduction processing of coding and effectively reduces the amount of parameters and operations.(2) Forecast Box Generation. The number of 3D candidate frames generated by the candidate region generation network is one order of magnitude lower than that of 3D prior frames, so the 3D candidate frames are adjusted and fused with the original feature map. The fused characteristic crops are predicted by using the full connection layer, and the regression information, direction estimation, and category classification of each candidate box are output. Then NMS method is used to remove redundant 3D prediction frames, and finally 3D candidate frames with high confidence are output. When calculating the 3D candidate box regression, filter the 3D background box (that is, the 3D candidate box that does not contain the target). By calculating the IoU value of the projection area of the 3D candidate box and the real boundary box on the top view of the point cloud, if the IoU value is less than 0.3, it is regarded as the 3D background box, and if the IoU value is greater than 0.5, it is the 3D candidate box containing the vehicle target object. Then NMS method is used to remove redundant 3D candidate boxes.


## 2.1.6. Loss Function

The loss function in this chapter is mainly divided into two parts, positioning loss and classification loss. The location loss adopts smooth L1 function, and the classification loss adopts cross entropy function.Smooth L1 function, as shown in equation (1):
(1)Lclass=∑j=1Nyjlogsj,where y is the vector of the real label; s is the vector of network prediction; i is the number of categories of the target object.Softmax function, as shown in equation (2):
(2)Lreg=lobj0.5x2,x<1lobjx−0.5,x>1,where lobj is whether a feature point is a positive sample. If it is a positive sample, the value is 1, otherwise it is 0.


## 2.2. AVOD Advantages

AVOD algorithm is actually developed on the basis of MV3D method. Through the analysis of MV3D and AVOD algorithm, the improvement of AVOD is shown in the following aspects:(i)
Network input: the network input of MV3D is the aerial view of point cloud, the front view of point cloud and image, while the input of AVOD is only the aerial view and image, which simplifies the network model and improves the detection speed(ii)
Feature extraction network: MV3D selects VGG-16 network for feature extraction, and AVOD selects RPN structure for feature extraction, as shown in Figure3. We can make full use of the feature map of different scales to obtain the full resolution feature map, so AVOD has higher detection accuracy for small target objects(iii)
Fusion strategy: MV3D adopts the feature fusion strategy of deep fusion, and AVOD uses the early fusion strategy to fuse the two feature maps to extract candidate regions, which can improve the detection performance of small targets. In the process of feature fusion, AVOD performs convolution dimensionality reduction on the feature map, reducing the amount of calculation on the original basis(iv)
Coding method: MV3D uses 8 vertex coordinates to describe the position and size of the 3D bounding box, which needs a 24 dimensional vector to represent. AVOD uses the bottom and height to limit the shape of the 3D bounding box, plus the coordinates of four vertices to determine the position. A 10 dimensional vector is sufficient, as shown in Figure5


## 2.3. AVOD Optimization Algorithm

### 2.3.1. 3D Anchor Box Generation

In AVOD model,k (K=2) clustering centers are randomly generated by k-means as the size of anchor box. The selection of K value in the algorithm and the randomness of K initial clustering centers will affect the size of anchor box, and ultimately affect the accuracy of detection. Improve this: use the k-means++ method to cluster, and use the elbow method to select the optimal K value. Finally, cluster the original data into K groups of height, width, and length data as the anchor frame size. The specific steps are as follows:(1) extract the height, width, and length of objects in the data as clustering data points; (2) randomly select a point from the cluster data point set as the first cluster center; (3) calculate the distance between each data point and the existing clustering center, and use the elbow method to calculate the clustering error; (4) select the points with larger distance as the new clustering center; (5) repeat steps (2) and (3) draw the variation curve between clustering error and K value (the range of K value is generally 1 ~ 9), and then select the best K value; (6) The cluster center when extracting the best K value is used as the anchor frame size.


### 2.3.2. Feature Extraction Network

In the feature extraction network, the depth of the network is directly related to the effect of feature extraction. VGG-16 network in AVOD algorithm removes the full connection layer, with a total of 13 layers, and the parameter quantity reaches14.7×107, and memory consumption reached 15.2 MB. And in VGG network 3×3, the receptive field obtained by convolution kernel of is too single, which is not conducive to feature extraction of multiple size targets. Therefore, the algorithm in this paper has been improved. GoogleNet network with inception V1 is used for feature extraction. Compared with VGG-16 network, it is optimized from two aspects of network depth and width, which is conducive to extracting a variety of features. In the optimization algorithm, the full connection layer and auxiliary classifier in googleNet network are removed, and only the convolution layer, pooling layer, and inception structure are used for feature extraction. The network structure is shown in Figure 6. Figure 7 shows the structure of inception V1, using with different sizes 1×1,3×3,and5×5; convolution kernel obtains different receptive field features, that is, features of different scales, and then enhances the effect of feature extraction by fusing features of different scales. In addition, 1 is also introduced in inception V1 1×1; convolution is used to reduce the dimension, which reduces the amount of calculation. The improved feature extraction network has reached 22 layers, and the network is widened through inception structure, with a parameter of about 5.8×107, which is 1/3 of VGG network parameters. The memory consumption is about 6 MB, which is 2/5 of VGG network.Figure 6
GoogleNet network with inception V1.Figure 7
Inception structure.Using the improved AVOD algorithm of k-means + + and googleNet, the efficiency and accuracy in simple, medium, and difficult animation design have been improved, the average accuracy of BEV detection will also be greatly improved, and the efficiency of 3D animation design will also be improved. On the basis of the above improvements, the average accuracy of detection will be further improved after introducing attention mechanism for feature fusion. Compared with the original AVOD algorithm, the optimized AVOD algorithm has more advantages, and it has also more application prospects.


### 2.3.3. Feature Fusion Based on Attention Mechanism

In recent years, attention mechanism has been widely used in deep learning tasks. Attention mechanism can obtain the difference of the importance of each part of the input characteristic matrix, so as to give different weights, extract more critical and differentiated information, and make the model make more accurate judgments.In the feature fusion stage, AVOD algorithm simply connects the image features at the channel level, without considering the differences between the image and the point cloud features. This simple fusion method will greatly affect the accuracy of target detection. Therefore, a feature fusion method based on attention mechanism is proposed, and its structure is shown in Figure8.Figure 8
Loss changes.Firstly, the obtained image and the BEV feature of point cloud are analyzed2×2. Maximize pool operation and reuse 1×1; the convolution and activation function generates the scale factor of image feature and BEV feature and performs the sum operation according to the scale factor to generate the fused feature for the subsequent generation of detection frame. Sigmoid function is selected as the activation function, and the scale factor is
(3)p=11+e−z,where z is the result of convolution. According to Formula (3), the final calculation is the range of p from 0 to 1.


## 2.3.1. 3D Anchor Box Generation

In AVOD model,k (K=2) clustering centers are randomly generated by k-means as the size of anchor box. The selection of K value in the algorithm and the randomness of K initial clustering centers will affect the size of anchor box, and ultimately affect the accuracy of detection. Improve this: use the k-means++ method to cluster, and use the elbow method to select the optimal K value. Finally, cluster the original data into K groups of height, width, and length data as the anchor frame size. The specific steps are as follows:(1) extract the height, width, and length of objects in the data as clustering data points; (2) randomly select a point from the cluster data point set as the first cluster center; (3) calculate the distance between each data point and the existing clustering center, and use the elbow method to calculate the clustering error; (4) select the points with larger distance as the new clustering center; (5) repeat steps (2) and (3) draw the variation curve between clustering error and K value (the range of K value is generally 1 ~ 9), and then select the best K value; (6) The cluster center when extracting the best K value is used as the anchor frame size.


## 2.3.2. Feature Extraction Network

In the feature extraction network, the depth of the network is directly related to the effect of feature extraction. VGG-16 network in AVOD algorithm removes the full connection layer, with a total of 13 layers, and the parameter quantity reaches14.7×107, and memory consumption reached 15.2 MB. And in VGG network 3×3, the receptive field obtained by convolution kernel of is too single, which is not conducive to feature extraction of multiple size targets. Therefore, the algorithm in this paper has been improved. GoogleNet network with inception V1 is used for feature extraction. Compared with VGG-16 network, it is optimized from two aspects of network depth and width, which is conducive to extracting a variety of features. In the optimization algorithm, the full connection layer and auxiliary classifier in googleNet network are removed, and only the convolution layer, pooling layer, and inception structure are used for feature extraction. The network structure is shown in Figure 6. Figure 7 shows the structure of inception V1, using with different sizes 1×1,3×3,and5×5; convolution kernel obtains different receptive field features, that is, features of different scales, and then enhances the effect of feature extraction by fusing features of different scales. In addition, 1 is also introduced in inception V1 1×1; convolution is used to reduce the dimension, which reduces the amount of calculation. The improved feature extraction network has reached 22 layers, and the network is widened through inception structure, with a parameter of about 5.8×107, which is 1/3 of VGG network parameters. The memory consumption is about 6 MB, which is 2/5 of VGG network.Figure 6
GoogleNet network with inception V1.Figure 7
Inception structure.Using the improved AVOD algorithm of k-means + + and googleNet, the efficiency and accuracy in simple, medium, and difficult animation design have been improved, the average accuracy of BEV detection will also be greatly improved, and the efficiency of 3D animation design will also be improved. On the basis of the above improvements, the average accuracy of detection will be further improved after introducing attention mechanism for feature fusion. Compared with the original AVOD algorithm, the optimized AVOD algorithm has more advantages, and it has also more application prospects.


## 2.3.3. Feature Fusion Based on Attention Mechanism

In recent years, attention mechanism has been widely used in deep learning tasks. Attention mechanism can obtain the difference of the importance of each part of the input characteristic matrix, so as to give different weights, extract more critical and differentiated information, and make the model make more accurate judgments.In the feature fusion stage, AVOD algorithm simply connects the image features at the channel level, without considering the differences between the image and the point cloud features. This simple fusion method will greatly affect the accuracy of target detection. Therefore, a feature fusion method based on attention mechanism is proposed, and its structure is shown in Figure8.Figure 8
Loss changes.Firstly, the obtained image and the BEV feature of point cloud are analyzed2×2. Maximize pool operation and reuse 1×1; the convolution and activation function generates the scale factor of image feature and BEV feature and performs the sum operation according to the scale factor to generate the fused feature for the subsequent generation of detection frame. Sigmoid function is selected as the activation function, and the scale factor is
(3)p=11+e−z,where z is the result of convolution. According to Formula (3), the final calculation is the range of p from 0 to 1.


## 3. Application of Animation Design Based on AVOD Optimization Algorithm

### 3.1. Animation Design of Surface Ships Based on Optimized AVOD

An optimized AVOD multisensor information fusion sensing method is proposed. By building an experimental platform and making local data sets, the sensing method and obstacle avoidance algorithm of surface unmanned craft are experimentally verified, and the results are analyzed [26]. Aiming at the multisensor fusion perception experiment of surface unmanned craft, the three-dimensional data set of the ship in KITTI format is made, and the data set is used to train the target detection network, and then the performance of the target tracking method and the target detection network are evaluated according to the target tracking evaluation index and the three-dimensional target detection evaluation index, respectively. For the ship track prediction experiment, collect the navigation data of obstacle ships at different times as the data set, train the RNN-LSTM track prediction network, and propose the track prediction performance index to evaluate the prediction performance of the track prediction network. Finally, a real ship experimental platform is built, and dynamic obstacle avoidance experiments under four collision avoidance scenarios are designed according to COLREGs to verify the effectiveness of the autonomous dynamic obstacle avoidance method proposed in this paper.


#### 3.1.1. Experimental Platform and Environment

The real ship verification platform is a 7.5-meter-long and 1.2-meter-wide hydraulic jetting surface unmanned boat. The sensors carried by the boat are three-dimensional laser radar, webcam, and SBG integrated inertial navigation. The real-time sensing information collected by the sensors can be transmitted back to the shore-based monitoring platform through wireless data transmission and image transmission, which is convenient for remote control and heading status monitoring. Among them, the three-dimensional laser radar is installed at the front end of the central axis of the unmanned craft, about 1.5 m away from the water surface; The camera is installed directly below the lidar, which can obtain the sea surface image in real-time through RTSP protocol and transmit it to the shore based monitoring system through wireless image transmission to realize real-time monitoring. They-axis direction of SBG inertial navigation is consistent with the bow direction. High precision positioning information can be obtained through dual GPS antennas, and low error obstacle position information can be obtained in combination with radar sensing information. Jeston Xavier is the processor used in the unmanned boat experimental platform in this paper. The CPU of this processor is an 8-core ARM architecture. The GPU adopts 512 CUDA Volta. The single precision floating-point performance is 1.3TFLOPS at 20 W power, and the computational performance is as high as 30tops at 30 W power, which meets the computational requirements of autonomous obstacle avoidance of surface unmanned boats. In order to ensure the information collection ability and waterproof ability of the processor, an industrial computer platform based on Xavier is built. The platform extends the information collection interface of Xavier through switches and hubs and uses aviation plug and waterproof glue to ensure the safety of the interface.


#### 3.1.2. Result Analysis

The local data set is randomly divided into training set, verification set, and test set according to the ratio of 4 : 1 : 1, and the batch training method is used to train the network. Set the batch size to 8, train 80000 iterations, and save the training results every 1000 iterations. The optimization algorithm is used to update the network weight, and the phased decay learning rate is used to train the network to prevent over fitting.Figure8 shows the change of the average loss value of the verification set every 1000 iterations in the network training stage. From the figure, we can see that the loss value of the verification set continues to decline during the network training process, showing obvious convergence. At the beginning of training, it can be seen that the loss value is at a high-level. With the increase of training time, the loss decreases significantly, and the network gradually approaches the fitting from under fitting. In the later stage of training, the loss value decreased slowly and fluctuated in a small range, and finally stabilized at about 0.07, indicating that the network training has tended to converge.This paper uses category accuracy to measure the classification performance of the three-dimensional target detection module, 3DAP to measure the bounding box prediction performance of the detection network, and AOS to measure the orientation prediction performance of the detection network. The results are shown in Figure9. Close to the change trend of loss value, the changes of these three indicators with the number of iteration steps show a process of significant improvement of indicators in the early training process and slow fitting in the later training process, which is in line with the normal law of network training. As can be seen from Figure 9, since the three-dimensional target detection module in this paper only detects ship classes, the classification accuracy has reached a high performance in the early stage of training, and the accuracy in the later stage is stable at about 98%, indicating that the classifier of the three-dimensional target detection module has good performance. Combined with Figures 8 and 9, it can be seen that the decline of loss value corresponds to the rise of AOS and 3DAP indicators. When the loss value converges, the values of AOS and 3DAP also tend to be stable, which verifies the effectiveness of the loss function design. After iterating to 80000 steps, the final AOS value is stable at about 88%, and the 3DAP value is stable at about 76%, which meets the accuracy requirements of 3D target detection in the process of dynamic obstacle avoidance.Figure 9
Changes in evaluation indicators of detection network.The trained network parameters are applied to the real ship detection, and the test set data is used as the input of the target detection module. The final visualization results are shown in Figure10. Among them, Figure 10(a) shows the visualization results of two-dimensional image target detection, showing the two-dimensional detection frame coordinate information, type information, and detection confidence score of obstacle targets in the image coordinate system; Figure 10(b) shows the visualization results of 3D laser point cloud target detection. It can be seen that the 3D detection box accurately frames the range of obstacle target point cloud, reflecting the accuracy of AVOD ship target detection; Figure 10(c) shows the visualization results of the projection of the three-dimensional detection frame into the image coordinate system under the point cloud coordinate system. It can be seen that the projection range basically covers the location of the obstacle target, reflecting the reliability of the coordinate conversion matrix obtained by the joint calibration of the camera and radar.Figure 10
Visualization of 3D target detection results.
(a)
Image 2D bbox(b)
Point cloud 3D bbox(c)
Image 3D bboxThe data set used in the target tracking experiment is the local data set collected by the real ship, with a total of 1493 frames, including three continuous tracking processes in different time periods. The experimental results obtained from the test of local data sets reflect the high tracking accuracy and accuracy of the tracking module and show that the performance of the three-dimensional target tracking node is sufficient to meet the needs of dynamic obstacle avoidance. It can be seen that when the obstacle target is far away from the lidar, and the hull occasionally shakes under the influence of wind and waves, missed detection may occur due to too little point cloud information in the process of target detection. In the case of missed detection, the target tracking module uses the tracking frame generated by Kalman filter to replace the missing detection frame. It ensures the continuity of obstacle perception.


### 3.2. Vehicle Animation Design Based on Optimized AVOD Multisensor Information Fusion

#### 3.2.1. Data Acquisition

Auto target detection is carried out on the auto driving scene data set KITTI [27]. The data set contains real images and point cloud data of urban, rural, and highway scenes, with a maximum of 15 cars and 30 pedestrians in each scene. According to the different degrees of occlusion and truncation, the scene is divided into three levels: simple, medium, and difficult. The data set consists of 7481 training images, 7518 test images, and corresponding point cloud data, with a total of 80256 labeled objects. 7481 training samples were divided into training set and verification set, each containing 3712 and 3769 samples. The experimental platform configuration of this paper is shown in Table 1.Table 1
Parameters of experimental equipment.
Software and hardwareConfigOperating systemUbuntu 16.04Memory16 GBGPUNVIDIA Tesla K80GPU acceleratorCUDA10.1 CUDNN8.0Optimize AVOD frameworkTensorflow 1.14Programing languagePython 3.6


#### 3.2.2. Parameter Training and Setting

In the training process of generating three-dimensional anchor frame, the 9th, 10th, and 11th parameters of vehicle annotation information in all training data (i.e. height (h), width (w), and length (l) of three-dimensional objects) are extracted as clustering data points, and k-means++ method is used for clustering, and Euclidean distance is used as clustering distance formula. The elbow method is used to evaluate the clustering effect, and the bestK value is determined by observing the variation curve of the clustering error MSSE of all samples with the number of clusters K. The calculation formula of MSSE is
(4)MSSE=∑i=1K∑p=Cip−mi2.The change curve ofMSSE value with K value is shown in Figure 11. When K<3, the decrease range of MSSE is large with the increase of K. When K>3, the decrease of MSSE will decrease sharply. Therefore, 3 is the best K value of k-means++ clustering, that is, the vehicle annotation information in training can be clustered into three groups of height, width, and length data, which are (1.495, 1.563, and 3.343), (1.526, 1.614, and 3.856), (1.565, 1.671, and 4.392), respectively. Figure 11 shows the three-dimensional anchor box generated by the clustering results in the image.Figure 11
Change curve ofMSSE in k-means++ clustering algorithm.


#### 3.2.3. Analysis of Experimental Results

From the experimental results of the improved AVOD algorithm, we can see that for such a complex scene with many vehicles and occlusion, all vehicles can be accurately identified. Using the improved AVOD algorithm of k-means++ and googleNet, the average accuracy of detection in simple, medium, and difficult tasks has been improved. The average accuracy of BEV detection has been improved by 2.08%, 0.34%, and 1.56%, respectively, and the average accuracy of 3D detection has been improved by 9.26%, 2.43%, and 9%, respectively; Based on the above improvements, after introducing the attention mechanism for feature fusion, the average accuracy of detection in simple, medium, and difficult tasks is further improved. Compared with the original AVOD algorithm, the average accuracy of BEV detection is improved by 2.75%, 1.23%, and 2%, respectively, and the average accuracy of 3D detection is improved by 9.08%, 7.7%, and 9.14%, respectively.


## 3.1. Animation Design of Surface Ships Based on Optimized AVOD

An optimized AVOD multisensor information fusion sensing method is proposed. By building an experimental platform and making local data sets, the sensing method and obstacle avoidance algorithm of surface unmanned craft are experimentally verified, and the results are analyzed [26]. Aiming at the multisensor fusion perception experiment of surface unmanned craft, the three-dimensional data set of the ship in KITTI format is made, and the data set is used to train the target detection network, and then the performance of the target tracking method and the target detection network are evaluated according to the target tracking evaluation index and the three-dimensional target detection evaluation index, respectively. For the ship track prediction experiment, collect the navigation data of obstacle ships at different times as the data set, train the RNN-LSTM track prediction network, and propose the track prediction performance index to evaluate the prediction performance of the track prediction network. Finally, a real ship experimental platform is built, and dynamic obstacle avoidance experiments under four collision avoidance scenarios are designed according to COLREGs to verify the effectiveness of the autonomous dynamic obstacle avoidance method proposed in this paper.


### 3.1.1. Experimental Platform and Environment

The real ship verification platform is a 7.5-meter-long and 1.2-meter-wide hydraulic jetting surface unmanned boat. The sensors carried by the boat are three-dimensional laser radar, webcam, and SBG integrated inertial navigation. The real-time sensing information collected by the sensors can be transmitted back to the shore-based monitoring platform through wireless data transmission and image transmission, which is convenient for remote control and heading status monitoring. Among them, the three-dimensional laser radar is installed at the front end of the central axis of the unmanned craft, about 1.5 m away from the water surface; The camera is installed directly below the lidar, which can obtain the sea surface image in real-time through RTSP protocol and transmit it to the shore based monitoring system through wireless image transmission to realize real-time monitoring. They-axis direction of SBG inertial navigation is consistent with the bow direction. High precision positioning information can be obtained through dual GPS antennas, and low error obstacle position information can be obtained in combination with radar sensing information. Jeston Xavier is the processor used in the unmanned boat experimental platform in this paper. The CPU of this processor is an 8-core ARM architecture. The GPU adopts 512 CUDA Volta. The single precision floating-point performance is 1.3TFLOPS at 20 W power, and the computational performance is as high as 30tops at 30 W power, which meets the computational requirements of autonomous obstacle avoidance of surface unmanned boats. In order to ensure the information collection ability and waterproof ability of the processor, an industrial computer platform based on Xavier is built. The platform extends the information collection interface of Xavier through switches and hubs and uses aviation plug and waterproof glue to ensure the safety of the interface.


### 3.1.2. Result Analysis

The local data set is randomly divided into training set, verification set, and test set according to the ratio of 4 : 1 : 1, and the batch training method is used to train the network. Set the batch size to 8, train 80000 iterations, and save the training results every 1000 iterations. The optimization algorithm is used to update the network weight, and the phased decay learning rate is used to train the network to prevent over fitting.Figure8 shows the change of the average loss value of the verification set every 1000 iterations in the network training stage. From the figure, we can see that the loss value of the verification set continues to decline during the network training process, showing obvious convergence. At the beginning of training, it can be seen that the loss value is at a high-level. With the increase of training time, the loss decreases significantly, and the network gradually approaches the fitting from under fitting. In the later stage of training, the loss value decreased slowly and fluctuated in a small range, and finally stabilized at about 0.07, indicating that the network training has tended to converge.This paper uses category accuracy to measure the classification performance of the three-dimensional target detection module, 3DAP to measure the bounding box prediction performance of the detection network, and AOS to measure the orientation prediction performance of the detection network. The results are shown in Figure9. Close to the change trend of loss value, the changes of these three indicators with the number of iteration steps show a process of significant improvement of indicators in the early training process and slow fitting in the later training process, which is in line with the normal law of network training. As can be seen from Figure 9, since the three-dimensional target detection module in this paper only detects ship classes, the classification accuracy has reached a high performance in the early stage of training, and the accuracy in the later stage is stable at about 98%, indicating that the classifier of the three-dimensional target detection module has good performance. Combined with Figures 8 and 9, it can be seen that the decline of loss value corresponds to the rise of AOS and 3DAP indicators. When the loss value converges, the values of AOS and 3DAP also tend to be stable, which verifies the effectiveness of the loss function design. After iterating to 80000 steps, the final AOS value is stable at about 88%, and the 3DAP value is stable at about 76%, which meets the accuracy requirements of 3D target detection in the process of dynamic obstacle avoidance.Figure 9
Changes in evaluation indicators of detection network.The trained network parameters are applied to the real ship detection, and the test set data is used as the input of the target detection module. The final visualization results are shown in Figure10. Among them, Figure 10(a) shows the visualization results of two-dimensional image target detection, showing the two-dimensional detection frame coordinate information, type information, and detection confidence score of obstacle targets in the image coordinate system; Figure 10(b) shows the visualization results of 3D laser point cloud target detection. It can be seen that the 3D detection box accurately frames the range of obstacle target point cloud, reflecting the accuracy of AVOD ship target detection; Figure 10(c) shows the visualization results of the projection of the three-dimensional detection frame into the image coordinate system under the point cloud coordinate system. It can be seen that the projection range basically covers the location of the obstacle target, reflecting the reliability of the coordinate conversion matrix obtained by the joint calibration of the camera and radar.Figure 10
Visualization of 3D target detection results.
(a)
Image 2D bbox(b)
Point cloud 3D bbox(c)
Image 3D bboxThe data set used in the target tracking experiment is the local data set collected by the real ship, with a total of 1493 frames, including three continuous tracking processes in different time periods. The experimental results obtained from the test of local data sets reflect the high tracking accuracy and accuracy of the tracking module and show that the performance of the three-dimensional target tracking node is sufficient to meet the needs of dynamic obstacle avoidance. It can be seen that when the obstacle target is far away from the lidar, and the hull occasionally shakes under the influence of wind and waves, missed detection may occur due to too little point cloud information in the process of target detection. In the case of missed detection, the target tracking module uses the tracking frame generated by Kalman filter to replace the missing detection frame. It ensures the continuity of obstacle perception.


## 3.1.1. Experimental Platform and Environment

The real ship verification platform is a 7.5-meter-long and 1.2-meter-wide hydraulic jetting surface unmanned boat. The sensors carried by the boat are three-dimensional laser radar, webcam, and SBG integrated inertial navigation. The real-time sensing information collected by the sensors can be transmitted back to the shore-based monitoring platform through wireless data transmission and image transmission, which is convenient for remote control and heading status monitoring. Among them, the three-dimensional laser radar is installed at the front end of the central axis of the unmanned craft, about 1.5 m away from the water surface; The camera is installed directly below the lidar, which can obtain the sea surface image in real-time through RTSP protocol and transmit it to the shore based monitoring system through wireless image transmission to realize real-time monitoring. They-axis direction of SBG inertial navigation is consistent with the bow direction. High precision positioning information can be obtained through dual GPS antennas, and low error obstacle position information can be obtained in combination with radar sensing information. Jeston Xavier is the processor used in the unmanned boat experimental platform in this paper. The CPU of this processor is an 8-core ARM architecture. The GPU adopts 512 CUDA Volta. The single precision floating-point performance is 1.3TFLOPS at 20 W power, and the computational performance is as high as 30tops at 30 W power, which meets the computational requirements of autonomous obstacle avoidance of surface unmanned boats. In order to ensure the information collection ability and waterproof ability of the processor, an industrial computer platform based on Xavier is built. The platform extends the information collection interface of Xavier through switches and hubs and uses aviation plug and waterproof glue to ensure the safety of the interface.


## 3.1.2. Result Analysis

The local data set is randomly divided into training set, verification set, and test set according to the ratio of 4 : 1 : 1, and the batch training method is used to train the network. Set the batch size to 8, train 80000 iterations, and save the training results every 1000 iterations. The optimization algorithm is used to update the network weight, and the phased decay learning rate is used to train the network to prevent over fitting.Figure8 shows the change of the average loss value of the verification set every 1000 iterations in the network training stage. From the figure, we can see that the loss value of the verification set continues to decline during the network training process, showing obvious convergence. At the beginning of training, it can be seen that the loss value is at a high-level. With the increase of training time, the loss decreases significantly, and the network gradually approaches the fitting from under fitting. In the later stage of training, the loss value decreased slowly and fluctuated in a small range, and finally stabilized at about 0.07, indicating that the network training has tended to converge.This paper uses category accuracy to measure the classification performance of the three-dimensional target detection module, 3DAP to measure the bounding box prediction performance of the detection network, and AOS to measure the orientation prediction performance of the detection network. The results are shown in Figure9. Close to the change trend of loss value, the changes of these three indicators with the number of iteration steps show a process of significant improvement of indicators in the early training process and slow fitting in the later training process, which is in line with the normal law of network training. As can be seen from Figure 9, since the three-dimensional target detection module in this paper only detects ship classes, the classification accuracy has reached a high performance in the early stage of training, and the accuracy in the later stage is stable at about 98%, indicating that the classifier of the three-dimensional target detection module has good performance. Combined with Figures 8 and 9, it can be seen that the decline of loss value corresponds to the rise of AOS and 3DAP indicators. When the loss value converges, the values of AOS and 3DAP also tend to be stable, which verifies the effectiveness of the loss function design. After iterating to 80000 steps, the final AOS value is stable at about 88%, and the 3DAP value is stable at about 76%, which meets the accuracy requirements of 3D target detection in the process of dynamic obstacle avoidance.Figure 9
Changes in evaluation indicators of detection network.The trained network parameters are applied to the real ship detection, and the test set data is used as the input of the target detection module. The final visualization results are shown in Figure10. Among them, Figure 10(a) shows the visualization results of two-dimensional image target detection, showing the two-dimensional detection frame coordinate information, type information, and detection confidence score of obstacle targets in the image coordinate system; Figure 10(b) shows the visualization results of 3D laser point cloud target detection. It can be seen that the 3D detection box accurately frames the range of obstacle target point cloud, reflecting the accuracy of AVOD ship target detection; Figure 10(c) shows the visualization results of the projection of the three-dimensional detection frame into the image coordinate system under the point cloud coordinate system. It can be seen that the projection range basically covers the location of the obstacle target, reflecting the reliability of the coordinate conversion matrix obtained by the joint calibration of the camera and radar.Figure 10
Visualization of 3D target detection results.
(a)
Image 2D bbox(b)
Point cloud 3D bbox(c)
Image 3D bboxThe data set used in the target tracking experiment is the local data set collected by the real ship, with a total of 1493 frames, including three continuous tracking processes in different time periods. The experimental results obtained from the test of local data sets reflect the high tracking accuracy and accuracy of the tracking module and show that the performance of the three-dimensional target tracking node is sufficient to meet the needs of dynamic obstacle avoidance. It can be seen that when the obstacle target is far away from the lidar, and the hull occasionally shakes under the influence of wind and waves, missed detection may occur due to too little point cloud information in the process of target detection. In the case of missed detection, the target tracking module uses the tracking frame generated by Kalman filter to replace the missing detection frame. It ensures the continuity of obstacle perception.


## 3.2. Vehicle Animation Design Based on Optimized AVOD Multisensor Information Fusion

### 3.2.1. Data Acquisition

Auto target detection is carried out on the auto driving scene data set KITTI [27]. The data set contains real images and point cloud data of urban, rural, and highway scenes, with a maximum of 15 cars and 30 pedestrians in each scene. According to the different degrees of occlusion and truncation, the scene is divided into three levels: simple, medium, and difficult. The data set consists of 7481 training images, 7518 test images, and corresponding point cloud data, with a total of 80256 labeled objects. 7481 training samples were divided into training set and verification set, each containing 3712 and 3769 samples. The experimental platform configuration of this paper is shown in Table 1.Table 1
Parameters of experimental equipment.
Software and hardwareConfigOperating systemUbuntu 16.04Memory16 GBGPUNVIDIA Tesla K80GPU acceleratorCUDA10.1 CUDNN8.0Optimize AVOD frameworkTensorflow 1.14Programing languagePython 3.6


### 3.2.2. Parameter Training and Setting

In the training process of generating three-dimensional anchor frame, the 9th, 10th, and 11th parameters of vehicle annotation information in all training data (i.e. height (h), width (w), and length (l) of three-dimensional objects) are extracted as clustering data points, and k-means++ method is used for clustering, and Euclidean distance is used as clustering distance formula. The elbow method is used to evaluate the clustering effect, and the bestK value is determined by observing the variation curve of the clustering error MSSE of all samples with the number of clusters K. The calculation formula of MSSE is
(4)MSSE=∑i=1K∑p=Cip−mi2.The change curve ofMSSE value with K value is shown in Figure 11. When K<3, the decrease range of MSSE is large with the increase of K. When K>3, the decrease of MSSE will decrease sharply. Therefore, 3 is the best K value of k-means++ clustering, that is, the vehicle annotation information in training can be clustered into three groups of height, width, and length data, which are (1.495, 1.563, and 3.343), (1.526, 1.614, and 3.856), (1.565, 1.671, and 4.392), respectively. Figure 11 shows the three-dimensional anchor box generated by the clustering results in the image.Figure 11
Change curve ofMSSE in k-means++ clustering algorithm.


### 3.2.3. Analysis of Experimental Results

From the experimental results of the improved AVOD algorithm, we can see that for such a complex scene with many vehicles and occlusion, all vehicles can be accurately identified. Using the improved AVOD algorithm of k-means++ and googleNet, the average accuracy of detection in simple, medium, and difficult tasks has been improved. The average accuracy of BEV detection has been improved by 2.08%, 0.34%, and 1.56%, respectively, and the average accuracy of 3D detection has been improved by 9.26%, 2.43%, and 9%, respectively; Based on the above improvements, after introducing the attention mechanism for feature fusion, the average accuracy of detection in simple, medium, and difficult tasks is further improved. Compared with the original AVOD algorithm, the average accuracy of BEV detection is improved by 2.75%, 1.23%, and 2%, respectively, and the average accuracy of 3D detection is improved by 9.08%, 7.7%, and 9.14%, respectively.


## 3.2.1. Data Acquisition

Auto target detection is carried out on the auto driving scene data set KITTI [27]. The data set contains real images and point cloud data of urban, rural, and highway scenes, with a maximum of 15 cars and 30 pedestrians in each scene. According to the different degrees of occlusion and truncation, the scene is divided into three levels: simple, medium, and difficult. The data set consists of 7481 training images, 7518 test images, and corresponding point cloud data, with a total of 80256 labeled objects. 7481 training samples were divided into training set and verification set, each containing 3712 and 3769 samples. The experimental platform configuration of this paper is shown in Table 1.Table 1
Parameters of experimental equipment.
Software and hardwareConfigOperating systemUbuntu 16.04Memory16 GBGPUNVIDIA Tesla K80GPU acceleratorCUDA10.1 CUDNN8.0Optimize AVOD frameworkTensorflow 1.14Programing languagePython 3.6


## 3.2.2. Parameter Training and Setting

In the training process of generating three-dimensional anchor frame, the 9th, 10th, and 11th parameters of vehicle annotation information in all training data (i.e. height (h), width (w), and length (l) of three-dimensional objects) are extracted as clustering data points, and k-means++ method is used for clustering, and Euclidean distance is used as clustering distance formula. The elbow method is used to evaluate the clustering effect, and the bestK value is determined by observing the variation curve of the clustering error MSSE of all samples with the number of clusters K. The calculation formula of MSSE is
(4)MSSE=∑i=1K∑p=Cip−mi2.The change curve ofMSSE value with K value is shown in Figure 11. When K<3, the decrease range of MSSE is large with the increase of K. When K>3, the decrease of MSSE will decrease sharply. Therefore, 3 is the best K value of k-means++ clustering, that is, the vehicle annotation information in training can be clustered into three groups of height, width, and length data, which are (1.495, 1.563, and 3.343), (1.526, 1.614, and 3.856), (1.565, 1.671, and 4.392), respectively. Figure 11 shows the three-dimensional anchor box generated by the clustering results in the image.Figure 11
Change curve ofMSSE in k-means++ clustering algorithm.


## 3.2.3. Analysis of Experimental Results

From the experimental results of the improved AVOD algorithm, we can see that for such a complex scene with many vehicles and occlusion, all vehicles can be accurately identified. Using the improved AVOD algorithm of k-means++ and googleNet, the average accuracy of detection in simple, medium, and difficult tasks has been improved. The average accuracy of BEV detection has been improved by 2.08%, 0.34%, and 1.56%, respectively, and the average accuracy of 3D detection has been improved by 9.26%, 2.43%, and 9%, respectively; Based on the above improvements, after introducing the attention mechanism for feature fusion, the average accuracy of detection in simple, medium, and difficult tasks is further improved. Compared with the original AVOD algorithm, the average accuracy of BEV detection is improved by 2.75%, 1.23%, and 2%, respectively, and the average accuracy of 3D detection is improved by 9.08%, 7.7%, and 9.14%, respectively.


## 4. Conclusion

In this paper, AVOD multisensor fusion target detection algorithm is improved. Aiming at the problems of inaccurate 3D anchor frame, large amount of feature extraction, and insufficient feature fusion, this paper proposes an optimized AVOD algorithm using k-means++ algorithm to generate 3D anchor frame, which improves the clustering effect and the learning ability of the model to the data set, uses googleNet network of inception model for feature extraction, and references attention mechanism for fusion. The main achievements are as follows:(i)
The basic concept of AVOD algorithm is introduced. It is considered that AVOD algorithm is widely used at present, but there are still shortcomings, especially the problems of low clustering efficiency, insufficient depth of feature extraction network, and occupying a lot of memory. Therefore, other methods must be introduced to improve the existing AVOD algorithm(ii)
Based on AVOD algorithm, an optimized AVOD algorithm of googleNet network using k-means ++ instead of k-means and introducing inception model is proposed. This algorithm has more advantages than AVOD algorithm. Two animation design cases using optimized AVOD algorithm are introduced



---

*Source: 9683939-2022-09-22.xml*