Ship image detection and recognition prediction method and electronic device

By improving the SSD algorithm and combining it with ResNet-50 and PANet feature fusion networks, and using transposed convolution and Focal Loss/CIOU loss functions, the shortcomings of the SSD algorithm in feature extraction and localization accuracy are addressed, resulting in higher detection accuracy and faster model convergence.

CN116229227BActive Publication Date: 2025-11-11SHANGHAI OCEAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310222437.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2025-11-11
Estimated Expiration
2043-03-09

AI Technical Summary

Technical Problem

In existing ship image detection technologies, the SSD algorithm needs improvement in detecting features at different scales, has insufficient feature extraction capabilities, an imbalance in the ratio of easy and difficult samples during model training, and insufficient localization accuracy.

Method used

An improved SSD multi-scale feature fusion method is adopted, which replaces the VGG-16 underlying network with a ResNet-50 residual network and combines it with a PANet feature fusion network. Transposed convolution is used instead of feature upsampling, and Focal Loss and CIOU localization loss function are used for training.

Benefits of technology

The improved algorithm enhances feature extraction capabilities, detection accuracy, and localization accuracy, increases mAP value, and outperforms the original algorithm and RetinaNet algorithm under different IOU values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116229227B_ABST
    Figure CN116229227B_ABST
Patent Text Reader

Abstract

This invention discloses a ship image recognition and prediction method. The method inputs an image of a navigating ship into a trained prediction model and outputs the predicted trajectory of the ship. The processing steps of the prediction model for the output ship image include: inputting the output ship image into a feature extraction backbone network for feature extraction to obtain a first output feature; passing the first output feature through a feature fusion network to enhance feature extraction and output a prediction feature layer; generating prior boxes on each prediction feature layer and feeding these prior boxes into a predictor for classification and regression prediction; and performing non-maximum suppression processing on the multiple detection boxes output by the predictor to remove duplicate and redundant detection boxes before outputting the predicted position of the ship. The feature fusion network is based on PANet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent navigation and port safety management technology, and specifically relates to a ship image detection, recognition and prediction method and electronic equipment. Background Technology

[0002] While ships equipped with AIS can understand each other's navigation dynamics and operational intentions, thus achieving collision avoidance, this method can only detect ships that have the equipment installed and activated; therefore, it is a passive detection method. Other commonly used active ship image detection and recognition technologies include radar technology, visible light imaging technology based on traditional algorithms, and visible light imaging technology based on deep learning algorithms. Among these, radar-based ship detection is easily affected by environmental factors such as navigation weather and electromagnetic signals. Visible light imaging-based detection technology, under ideal weather conditions, can achieve an observation range of up to 30 km. Furthermore, because visible light sensors acquire far more detailed information than radar and infrared detection technologies, they are more suitable for effectively detecting close-range targets. Summary of the Invention

[0003] One embodiment of the present invention discloses a ship image detection and recognition method based on improved SSD multi-scale feature fusion. The obtained image of a navigating ship is input into a trained prediction model, which outputs the predicted trajectory of the navigating ship. The prediction model processes the output ship image based on the SSD (single shot multibox detector) algorithm, including:

[0004] The output ship image is input into the feature extraction backbone network for feature extraction to obtain the first output feature;

[0005] The first output feature is processed by a feature fusion network to enhance feature extraction, and the output prediction feature layer is generated.

[0006] Prior boxes are generated on each prediction feature layer, and these prior boxes are fed into the predictor for classification and regression prediction.

[0007] Non-maximum suppression is applied to the multiple detection boxes output by the predictor to remove duplicate and redundant detection boxes before outputting the predicted position of the ship. Attached Figure Description

[0008] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:

[0009] Figure 1 A flowchart of a ship image detection and recognition method according to one embodiment of the present invention.

[0010] Figure 2 An SSD network structure diagram according to one embodiment of the present invention.

[0011] Figure 3 A schematic diagram of the transpose convolution process according to one embodiment of the present invention.

[0012] Figure 4 A schematic diagram of DIOU bounding box regression according to one embodiment of the present invention.

[0013] Figure 5 A schematic diagram comparing the training loss results of the algorithm according to one embodiment of the present invention.

[0014] Figure 6 A schematic diagram comparing the changes in mAP values ​​according to one embodiment of the present invention.

[0015] Figure 7 A comparison chart of the recognition performance of detection algorithms according to embodiments of the present invention. Detailed Implementation

[0016] Currently, traditional algorithms for visible light image detection generally use histogram of gradients (HOG) and scale-invariant feature extraction (SIFT) as feature extractors, feeding the obtained features into classifiers such as support vector machines (SVM) or Adaboost for classification. However, HOG and SIFT are manual feature extraction methods, which often consume significant human resources when applied to object detection. Furthermore, the features extracted by these algorithms have poor robustness, are computationally complex, and are difficult to meet real-time detection requirements. With the rapid development of computer hardware and convolutional neural networks, deep learning-based algorithms have been widely used in image detection and classification tasks. These algorithms offer significant improvements over traditional algorithms in both detection accuracy and speed.

[0017] Deep learning detection algorithms are mainly divided into two categories: single-stage and two-stage.

[0018] Two-stage detection algorithms primarily use algorithms such as Selective Search or Edge Boxes to select candidate regions (Region Proposals) from the input feature map that may contain the target object. The results are then fed into the backbone network for classification and regression prediction, and the output is the detection result after adjustment. Representative algorithms include the R-CNN series, R-FCN, and Mask R-CNN.

[0019] Single-stage algorithms, which skip the candidate region generation stage and directly obtain the target classification result and location information, are fast in detection but have low accuracy, especially for small targets. Representative algorithms include SSD (single shot multibox detector), YOLO series, and RetinaNet.

[0020] Deep learning-based object detection can fully utilize the vast amounts of ship data collected at sea, effectively learning its features and applying them to maritime transportation and management, demonstrating excellent generalization capabilities. For example, according to published documents, a single-stage ship detection algorithm based on an improved VGG backbone network adds an alternating connection structure of asynchronous convolution and max pooling layers to the VGG network, minimizing the loss of image information during feature dimensionality reduction. Another document addresses ship detection in complex water environments, using the Darkent-53 network model as the YOLOv3 algorithm backbone, replacing the original NMS algorithm with the Soft-NMS algorithm, and incorporating the FT algorithm to further refine local details of ship images, resulting in more accurate proposal predictions. Yet another document addresses the weakness of SSD in detecting small targets, proposing an improved SSD object detection algorithm using the DenseNet network and feature fusion, organically combining low-level visual features and high-level semantic features in the network structure to enhance the model's feature extraction capabilities.

[0021] In summary, while improvements have been made to the network structure of two-stage detection algorithms, the large network model size still hinders their ability to achieve high-efficiency real-time detection. Single-stage algorithms, lacking a pre-selection box generation stage, suffer from reduced detection accuracy. However, with advancements in detection algorithms, improvements to the feature extraction network structure and the incorporation of feature fusion have led to single-stage detection algorithms achieving accuracy comparable to or even exceeding that of two-stage algorithms. Therefore, the existing technologies have the following limitations:

[0022] 1. The SSD (single shot multibox detector) algorithm needs improvement in detecting features at different scales; 2. Its feature extraction capability for targets at different scales needs to be strengthened.

[0023] 3. During model training, the ratio of easy to difficult samples is unbalanced;

[0024] 4. The positioning is not accurate enough in ship target identification.

[0025] According to one or more embodiments, a ship image detection and recognition method involves a ship image detection prediction model, the construction and training process of which includes the following parts.

[0026] I. Data and Processing. The training dataset used was the Seaship7000 ship dataset released in 2018. Seaship7000 was collected from Hengqin Island, Zhuhai, with images extracted from port surveillance videos. The resolution was 1920×1080, and it included six types of ships: ore carriers, bulk cargo carriers, general cargo ships, container ships, fishing boats, and passenger ships. The labelimg tool was used to label the distributed dataset. After labeling, XML files were generated for the corresponding bounding box positions and category parameters of the images, which were used by the algorithm model to parse them. The ship dataset contains 7000 images. Statistical analysis was performed on the various types of ship targets. A total of 9221 target ships were labeled in the dataset. The data was divided into training and test sets in an 8:2 ratio, and then 10% of the training set was selected as the validation set.

[0027] For ship targets, they generally need to be covered by narrow rectangular detection boxes. Appropriate prior boxes help speed up training and improve detection accuracy. K-means clustering is used to statistically analyze all ground truth bounding boxes in the dataset. Furthermore, during training with the improved YOLOv3 algorithm, a series of data augmentation techniques are employed, including image flipping, random cropping, proportional scaling, translation, rotation, deformation scaling, color gamut transformation, and mosaic enhancement. These data augmentations expand the ship data, helping to improve the algorithm model's generalization ability to detect ships in other scenarios. Therefore, data augmentation of the dataset is necessary.

[0028] II. An improved SSD multi-scale feature fusion method, specifically including:

[0029] 1) This embodiment of the invention adopts an improved SSD algorithm, using ResNet50 as the underlying network for feature extraction, which improves the gradient vanishing problem during propagation; PANet feature fusion is performed on the outputs of the 2nd, 3rd, and 4th residual layers of the residual network, and deconvolution is used to replace upsampling in feature fusion to enhance feature extraction capability; finally, the output feature layer P5 is convolved twice to obtain smaller prediction feature layers P6 and P7 respectively.

[0030] The improved algorithm flow is as follows Figure 1As shown, the ship image is fed into the backbone feature network for initial feature extraction. To better utilize the detailed and semantic information in the features, the output features from the backbone network are passed through a fusion network, and then a prediction feature layer is output. Prior boxes are then generated on each prediction feature layer, and these prior boxes are fed into the predictor for classification and regression prediction. The same target may have multiple detection boxes after regression prediction, therefore, non-maximum suppression (NMS) is required to remove duplicate and redundant detection boxes.

[0031] 2) PANet-based network structure. PANet is an upgraded feature fusion network structure based on feature pyramids. Deep features focus on the overall object and have rich semantic information, while shallow features focus on the object's details. The original feature fusion network FPN only implements simple top-down unidirectional feature fusion, while PANet adds a bottom-up fusion path, transmitting information from shallow layers to deeper layers, while reducing the number of convolutional layers required for information flow from deep to shallow layers. The improved SSD network structure is shown below. Figure 2 As shown.

[0032] Figure 2 In the diagram, Conv1 represents the result of the first convolution of the image, C2, C3, C4, and C5 are the outputs of the backbone feature network, Conv2d represents the convolutional processing, 1×1 and 3×3 represent the kernel size, and s1 and s2 represent the convolution stride; P3, P4, P5, P6, and P7 represent the predicted feature layers output after feature fusion. Figure 2 As shown, the outputs C3, C4, and C5 of the backbone feature network are first subjected to 1×1 convolutions to change the number of channels in the output feature map. The convolutional outputs are then deconvolved to obtain a feature map twice the original size, which is then fused with the feature map from the previous layer after the channel count was changed, achieving top-down feature fusion. This helps improve the semantic information of the current layer. The feature map after the first fusion is first subjected to a 3×3 convolution with a stride of 1 to enhance feature extraction, then downsampled by a 3×3 convolution with a stride of 2, and finally fused a second time with the feature map from the next layer after the first fusion, achieving bottom-up feature fusion. This further improves the detection capability of the current layer for detailed information. The feature maps P3, P4, and P5 after the two fusions are used as the output of the prediction feature layer, while P6 and P7 are obtained by performing one convolution and two convolution downsampling operations on P5, respectively.

[0033] 3) Transposed Convolution. The original FPN network structure uses nearest-neighbor interpolation for upsampling, which is the simplest interpolation algorithm. When the image is enlarged, missing pixels are generated by directly using the nearest existing color, essentially copying the neighboring pixels, resulting in noticeable jagged edges. Although nearest-neighbor interpolation is fast, it disrupts the gradient relationships of pixels in the original image. Therefore, this invention uses transposed convolution (also called deconvolution) instead. Transposed convolution is actually a special type of convolution that can achieve image enlargement by controlling parameters such as padding, stride, and outpadding. Compared to nearest-neighbor interpolation upsampling, since the kernel of transposed convolution is also learnable, less information is lost in the feature map. Figure 3 This is a schematic diagram of a deconvolution process. The blue part represents the input feature map, the gray part represents the convolution kernel, and the green part represents the output feature map. The formulas for calculating the input and output are as follows:

[0034] o=(i-1)×stride+k-2padding+outpaddin (1)

[0035] In the formula, o is the size of the output feature matrix, i is the size of the input feature matrix, stride is the stride, k is the kernel size, padding is the number of zeros padded in the input feature map, and outpadding is the number of zeros padded in the output feature map. In this algorithm, stride is in the range of 1-3, k is in the range of 2-3, padding is in the range of 1-3, and outpadding is in the range of 1-3.

[0036] 4) Regression loss and classification loss.

[0037] An excellent regression localization loss should consider three geometric parameters: overlap area, center point distance, and aspect ratio (between predicted and ground truth boxes). As shown in equations (4) and (5), the original SSD algorithm uses smoothL1 loss as the regression loss. This loss cannot well reflect the three factors mentioned above. Therefore, this invention uses CIOU loss to replace the smoothL1 loss in the original algorithm. First, the IOU value is the intersection-union ratio between the prior box and the ground truth box, as shown in equation (2), where A and B are the prior box and the ground truth box, respectively.

[0038]

[0039] The IOU value effectively reflects the degree of overlap between bounding boxes and is scale-invariant. However, when two boxes do not intersect, their loss is zero, preventing backpropagation of the loss. CIOU, building upon IOU and DIOU, further considers the aspect ratio similarity between boxes. Its loss function is calculated as follows:

[0040]

[0041]

[0042]

[0043] In the formula, a is the weight function, v is the function that measures the similarity between the aspect ratio of the predicted box and the ground truth box, and b, b gt These are the center points of the predicted bounding box and the ground truth bounding box, respectively. h and w are the height and width of the predicted bounding box, respectively. gt w gt ρ represents the height and width of the ground truth bounding box, ρ represents the Euclidean distance between the two center points, and c is the diagonal distance of the smallest closure region that can simultaneously contain both the predicted and ground truth bounding boxes. Figure 4 As shown, d is the distance between the center points of the predicted bounding box and the ground truth bounding box.

[0044] In the ship dataset images used in this embodiment of the invention, there are generally only one or a few targets. Prior boxes with a CIOU value greater than 0.5 with the ground truth bounding boxes are used as positive samples. Therefore, there are relatively few positive samples and a large proportion of negative samples. Furthermore, the vast majority of all samples are easily distinguishable positive or negative, while easily distinguishable samples (i.e., samples with high confidence) have very little effect on improving the model. The model should primarily focus on those difficult-to-distinguish samples, and the loss calculation should minimize the proportion of loss for these easily distinguishable samples among all samples. Therefore, the Focal loss function is introduced as the classification loss function.

[0045]

[0046] In the formula, a and r are two hyperparameters. a is the loss weight used to balance the imbalance between positive and negative samples, and r is used to balance the loss between difficult and easy samples. p is the prediction probability. After using this classification loss function, the model will pay more attention to the difficult positive and difficult negative samples in the prior bounding box, and less attention to the easy positive and easy negative samples.

[0047] Therefore, the beneficial effects of the embodiments of the present invention include:

[0048] (1) Applying a bidirectional feature fusion structure in the feature extraction network and replacing upsampling with deconvolution that better preserves feature information is more conducive to combining high semantic information and detailed information, thereby enhancing feature extraction capabilities.

[0049] (2) Using Focal Loss classification loss function and CIOU localization loss function can make the localization effect more accurate and the recognition accuracy higher.

[0050] (3) Replacing the original underlying network VGG-16 with the Resnet-50 residual network can effectively alleviate the problems of gradient explosion and gradient vanishing during backpropagation.

[0051] (4) According to the ship image detection and recognition method proposed in this invention, compared with the original algorithm on the ship dataset, the mAP is improved by 2.3 percentage points when the IOU is 0.5; when the IOU is 0.75, the mAP is improved by 9.1 percentage points; and when the IOU is from 0.5 to 0.95, with an interval of 0.05, the average mAP is improved by 6.7 percentage points.

[0052] Table 1 presents a comparative analysis and experimental results of the image recognition prediction method according to the embodiments of the present invention and existing algorithms.

[0053] Table 1 Comparison of average accuracy of algorithms

[0054]

[0055] The following example illustrates the comparative results of an implementation experiment of the ship image detection and recognition method proposed in this invention.

[0056] This experiment used a ship dataset captured in Zhuhai Port, containing six types of vessels: ore carriers, bulk carriers, general cargo ships, container ships, fishing boats, and tourist boats, totaling 7000 images. The LabelImg tool was used to annotate the dataset, recording the ship category and the pixel coordinates of the top-left and bottom-right corners of the target, generating an annotation file.

[0057] The experimental setup was as follows: Windows 64-bit operating system, AMD Ryzen 7 5800H CPU, 3.2GHz, GeForce RTX 3060 Laptop GPU, 6GB VRAM; software environment included PyCharm 20.1, Python 3.8.8, torch 1.9.0+cu111, CUDA 11.1, and CUDNN v8.0.5.

[0058] During training, the batch size was set to 4, the momentum for faster convergence was set to 0.9, the learning rate was 0.001, and the learning rate decay coefficient was set to 0.0005 to prevent overfitting. Training was iterated for 25 epochs. This study will compare the performance of the traditional SSD algorithm, the RetinaNet algorithm, and the improved algorithm from three aspects: training convergence speed, detection accuracy (using average precision, AP) as the evaluation metric, and localization effect.

[0059] Figure 5This chart compares the training loss results of the original algorithm, the RetinaNet algorithm, and the improved algorithm. The horizontal axis represents the number of training iterations, and the vertical axis represents the training loss. Figure 5 It can be seen that the original algorithm has a large loss at the beginning of training, reaching nearly 6. With increasing iterations, the loss gradually decreases, eventually dropping to 1.78 by the 25th epoch. While the loss still shows a downward trend, it gradually levels off. The RetinaNet algorithm has a loss of 2.35 at the beginning of training, which drops to 0.44 after 25 epochs, at which point the loss stops decreasing. The improved algorithm has a smaller loss at the beginning of training, at 1.09, and by the 17th epoch, the loss has hovered around 0.14, indicating convergence. This demonstrates that the improved algorithm converges faster in terms of model training speed.

[0060] Figure 6 A diagram comparing the mAP values ​​of the algorithms is shown. The graph compares the mAP values ​​of the original algorithm, RetinaNet algorithm, and improved algorithm when the IOU is 0.5. The horizontal axis represents the number of iterations, and the vertical axis represents the mAP value. As can be seen from the graph, when the improved algorithm and RetinaNet algorithm are trained to the 10th epoch, the mAP values ​​tend to stabilize, with peak values ​​of 0.953 and 0.932 respectively; while the original algorithm's mAP value only stabilizes at the 19th epoch, with a peak value of 0.930. Table 1 compares the average accuracy of the original algorithm, RetinaNet algorithm, and improved algorithm. The comparison shows that when the IOU is taken at intervals of 0.05 from 0.50 to 0.95 to calculate the average accuracy over 10 APs, the improved algorithm improves by 0.067 compared to the original algorithm and by 0.017 compared to the RetinaNet algorithm. Furthermore, the mAP values ​​are improved to varying degrees under different IOU values ​​and different target sizes, which proves that the method of this embodiment has higher detection accuracy than existing algorithms.

[0061] Figure 7 This image compares the detection performance of the original SSD algorithm and the improved algorithm on a dataset for six types of ships. The top half of the smaller image shows the detection results from the original algorithm, and the bottom half shows the results from the improved algorithm. It can be seen that, generally, the improved algorithm has a higher confidence level in identifying the category of the detected target. Figure 7 (a), (b), etc. However, in some cases, the detected confidence level may be lower than that of the original algorithm. This is partly because the detection box covers a more complete and larger target, resulting in the detection box containing more useless information, which in turn affects the prediction of the class confidence level. For example, Figure 7 In (e), the bulk carrier's boom is also within the detection box, resulting in more redundant information within the detection box. Furthermore, the target box localization detected by the original algorithm is not accurate enough. Figure 7(c) and Figure 7 The bounding box in (d) does not completely cover the hull. Finally, the original algorithm does not perform well in detecting some small targets, such as... Figure 7 The original algorithm could not detect the small fishing boats in (f), but the improved algorithm can detect them very well. Figure 7 As can be seen from the comparison of the detection results of the improved algorithm, the detection box of the improved algorithm covers the target more completely and the success rate of detecting small targets is higher, that is, the improved algorithm has a better localization effect.

[0062] In summary, this invention proposes an improved SSD multi-scale feature fusion method for ship image detection and recognition, addressing the inaccuracy of cross-scale prediction in the original SSD algorithm. By replacing the original VGG-16 underlying network with a ResNet-50 residual network, the problems of gradient explosion and vanishing gradients during backpropagation are effectively mitigated. Furthermore, a PANet feature fusion network is added after the backbone network, and the original linear interpolation method for feature upsampling is replaced with transposed convolution, enhancing feature extraction capabilities. Further, Focal loss is used as the classification loss, and CIOU loss is used as the localization loss during backpropagation, respectively addressing the problems of imbalanced easy and difficult sample ratios and insufficient localization accuracy.

[0063] It should be understood that in the embodiments of the present invention, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.

[0064] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0065] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0066] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for ship image recognition and prediction, characterized in that, The acquired images of the sailing vessel are input into the trained prediction model, which outputs the predicted trajectory of the sailing vessel. The processing steps of the prediction model for the output ship images include: The output ship image is input into the feature extraction backbone network for feature extraction to obtain the first output feature; The first output features are enhanced by a feature fusion network to produce a predicted feature layer. This feature fusion network is based on PANet, and its processing includes the following steps: after convolution processing, the output of the feature extraction backbone network is modified to change the number of channels in the output feature map. The output after convolution is upsampled to obtain an enlarged feature map, which is then fused with the feature map from the previous layer after the channel number has been changed. Prior boxes are generated on each prediction feature layer, and these prior boxes are fed into the predictor for classification and regression prediction. Non-maximum suppression is applied to the multiple detection boxes output by the predictor to remove duplicate and redundant detection boxes before outputting the predicted position of the ship. The upsampling is deconvolution, and the formula for calculating deconvolution is: (1) In the formula, o is the size of the output feature matrix, i is the size of the input feature matrix, stride is the stride, k is the kernel size, padding is the number of zeros padded in the input feature map, and outpadding is the number of zeros padded in the output feature map. loss function (3) (4) (5) in, It is a weighting function. It is a function that measures the similarity of the aspect ratio between the predicted bounding box and the ground truth bounding box. Here, h and w are the center points of the predicted bounding box and the ground truth bounding box, respectively, and h and w are the height and width of the predicted bounding box, respectively. , These are the actual height and width of the frame. This represents the calculation of the Euclidean distance between two center points. It is the diagonal distance of the smallest closure region that can simultaneously contain both the predicted bounding box and the ground truth bounding box.

2. The prediction method according to claim 1, characterized in that, The processing of the feature fusion network PANet also includes: The feature map after the first fusion is first subjected to a convolution to enhance feature extraction, then downsampled by another convolution, and finally fused a second time with the feature map from the next layer that has already undergone one fusion. The feature map after the two fusions is used as the output of the prediction feature layer.

3. The prediction method according to claim 1, characterized in that, In distinguishing between positive and negative samples in the training sample set of the prediction model, the Focal loss function is used as the classification loss function: (6) in, and There are two hyperparameters. These are loss weights used to balance the imbalance between positive and negative samples. The loss is used to balance the losses of hard-to-classify and easy-to-classify samples, where p is the prediction probability.

4. The prediction method according to claim 1, characterized in that, Intersection over Union (IoU) of Prior Boxes and Ground Truth Boxes (2) Where A and B are the prior bounding box and the ground truth bounding box, respectively.

5. An electronic device, characterized in that, The electronic device includes a memory; and A processor coupled to the memory, the processor being configured to execute instructions stored in the memory, the processor performing the prediction method as described in any one of claims 1 to 4.

6. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the prediction method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Remote sensing image multi-scale target detection and identification method based on lightweight network

    CN114170526A

  • Infrared image gas leakage and liquid leakage detection method and system based on deep learning

    CN114627052A