Ocean ship heading detection method based on angle coding and heading intersection-combination loss

By introducing angle coding and bandwing and comparison loss functions in the pupae to the detection algorithm, the problem of periodic periodic periodicity and insufficient evaluation standards of the shipbuilding to detect the detection of the test, which significantly enhances the accuracy and robustness of the detection.

CN118587277BActive Publication Date: 2025-01-24SANYA SCI & EDUCATION INNOVATION PARK WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411067518.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2025-01-24
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

In the prior art, the ship heading detection algorithm cannot fully cover the possible orientation of the ship, resulting in limited detection performance. When approaching the junction of 360 degrees and 0 degrees, the rotation cross-section ratio evaluation standard cannot effectively evaluate the regression performance.

Method used

Proposal a marine ship cricket that is based on an angle -based coding and the losses of the losses to the detection algorithm, encodes the angle of the angle of the angle encoder by designing the ship's coding to solve the angle of the angle. The item improves rotation and is compared with the loss function to ensure that the gradient optimization direction under the boundary conditions is correct.

Benefits of technology

It effectively solves the problem of angular periodicity and insufficient evaluation standards, and improves the accuracy and robustness of ship heading detection. The experiment verified that the mAP50 index on the FGSD data set reached 88.45%, and the ship heading prediction accuracy increased to 96.17%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587277B_ABST
    Figure CN118587277B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of artificial intelligence and image analysis technology, and provides a method for detecting the bow direction of an ocean ship based on angle coding and orientation intersection-over-intersection loss, comprising the steps of: S1, collecting a ship detection data set, constructing a training set, a validation set and a test set; S2, expanding the data volume of the training set by data preprocessing and random enhancement; S3, constructing a ship bow detection model based on angle coding and orientation intersection-over-intersection loss; S4, inputting the expanded training set into the detection model, training the model using the orientation intersection-over-intersection loss function, updating the detection model through the back propagation algorithm, and selecting the ocean ship bow detection model; S5, testing the detection performance of the model through the test set. The present invention obtains an ocean ship bow detection model based on angle coding and orientation intersection-over-intersection loss with stronger feature learning ability by using the orientation intersection-over-intersection loss function to supervise the training process of the model, and has the advantages of solving the angle periodicity problem and accurately measuring the boundary conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of artificial intelligence and image analysis, and in particular relates to a method for detecting the heading of an ocean ship based on angle coding and orientation intersection-over-combination ratio loss. Background Art

[0002] Ship heading detection technology is a key link in marine monitoring and navigation systems. It is used to determine the specific direction of a ship and is of great significance for ship trajectory prediction, port entry and exit monitoring, and maritime traffic management. Compared with traditional ship target detection technology, ship heading detection not only requires high-precision target positioning and classification, but also requires accurate identification of the ship's head direction. This task is very challenging due to its high complexity. In the existing technology, most ship detection algorithms can only output angles within a range of 180 degrees, which cannot fully cover the possible directions of the ship, resulting in limited performance in practical applications.

[0003] In addition, attempts to expand the output angle range of the detection algorithm to 360 degrees to increase the accuracy of heading determination face the problem of angle periodicity and the problem that the existing Rotation Intersection over Union (RIoU) evaluation criterion cannot effectively evaluate the regression performance when approaching the intersection of 360 degrees and 0 degrees. These limitations significantly reduce the accuracy and robustness of ship heading detection. In response to the above challenges, a new algorithm is urgently needed that can effectively overcome the angle boundary limitations and achieve accurate and robust detection in the full angle range. Summary of the invention

[0004] The purpose of the present invention is to provide a method for detecting the heading of an ocean ship based on angle coding and orientation intersection-and-division loss, aiming to solve the technical problems existing in the prior art identified in the background technology. The present invention proposes an algorithm for detecting the heading of an ocean ship based on angle coding and orientation intersection-and-division loss, aiming to solve the problems of angle periodicity and insufficient evaluation criteria existing in the prior art.

[0005] The present invention is implemented in this way: a method for detecting the heading of an ocean ship based on angle coding and orientation intersection-over-combination ratio loss, the method comprising:

[0006] S1. Collect the ship detection data set and obtain the required original ship image x i and its corresponding label y i , divide the training set, validation set and test set into proportional quantities, which are used for subsequent model training, validation and evaluation respectively, where the training set is recorded as B is the number of images in the training set;

[0007] S2. Perform data preprocessing and online data enhancement on the training set images so that each image in the training set generates M different enhanced images. The number of images in the training set after expansion is B*M, denoted as

[0008] S3, constructing an ocean ship heading detection model based on angle coding and orientation intersection-combination ratio loss;

[0009] S4, the training set The image is input into the ocean ship heading detection model based on angle coding and orientation intersection-over-union loss, the ocean ship heading detection model is trained by using the orientation intersection-over-union loss function, the ocean ship heading detection model is updated by the back propagation algorithm, and the optimal ocean ship heading detection model is selected by using the validation set in S1;

[0010] S5. Use the test set in S1 to test the recognition performance of the ocean ship bow detection model to obtain the final model recognition accuracy. When the model recognition accuracy reaches the set threshold, the image to be recognized is input into the ship image ocean ship bow detection model for recognition; otherwise, return to S3 until the model recognition accuracy reaches the set threshold.

[0011] As a further solution of the present invention, S2 performs preprocessing and online data enhancement on the input image, and finally obtains an expanded training set, which is recorded as

[0012] Wherein, M is less than the number of types of image enhancement strategies.

[0013] As a further solution of the present invention, the image enhancement strategy includes:

[0014] BaseAugment, which only normalizes the image;

[0015] SimAugment, which performs random color distortion and Gaussian blur in sequence, and may perform an additional sparse image warping operation at the end of the sequence;

[0016] AutoAugment, which means automatic enhancement;

[0017] RandAugment, which means random augmentation;

[0018] TrivialAugment, that is, randomly selecting an image enhancement operation each time, and then randomly determining the enhancement amplitude of the randomly selected image enhancement operation, and enhancing the image;

[0019] RandomErasing randomly erases a rectangular area from an image without changing the original label of the image.

[0020] As a further solution of the present invention, the image enhancement strategy described in S2 includes one or more combinations of the following operations: normalizing the image, performing random color distortion and Gaussian blur in sequence, automatic enhancement, random enhancement, randomly selecting an image enhancement operation each time, and then randomly determining the enhancement amplitude of the randomly selected image enhancement operation, and enhancing the image, and randomly erasing a rectangular area from the image without changing the original label of the image.

[0021] As a further solution of the present invention, the ocean ship heading detection model based on angle coding and orientation intersection-over-intersection loss in S3 is composed of a ship heading inspection network, a loss function, and an encoder;

[0022] The angle parameter θ of the truth box e Converted into angle code by heading encoder This is then encoded with the predicted angle Prediction box Rbox pred And the truth box Rbox gt Calculate the intersection-over-union loss function and optimize the network parameters;

[0023] During the inference phase, the angle encoding of the predicted box Then it is converted into the angle prediction result θ by the decoder d , and the prediction box pred constitute the final test results.

[0024] As a further solution of the present invention, the orientation intersection-over-union loss function L described in S4 is HIoU The overall calculation formula is:

[0025] L HIoU =L overlap +λ center L center +λ shape L shape +λ θ L θ

[0026] Among them, λ center , shape With λ θ A weight parameter to balance different penalty loss items.

[0027] When the ship heading angle encoder is used for angle encoding, the overall loss function for training the ship heading detection network proposed by the present invention is:

[0028] Loss = L cls +λ HIoU L HIoU +λ BDAC LBDAC

[0029] Among them, L cls represents the classification loss function, λ HIoU With λ BDAC The modulation coefficient is used to balance the I / O loss and the angle coding loss.

[0030] The beneficial effects of the present invention are:

[0031] 1. Solution to the angle periodicity problem: By designing a bow angle encoder to encode the angle, the angle periodicity problem caused by the boundary of the definition domain is effectively solved, and the continuity of the bow angle prediction under boundary conditions is maintained, thereby improving the accuracy of the prediction.

[0032] 2. Accurate measurement of boundary conditions: In view of the problem that the rotational intersection-over-union loss function is difficult to measure the difference between the true value box and the predicted box in boundary conditions, an orientation intersection-over-union loss function is proposed, and the RIoU loss function is improved by adding a penalty loss term to ensure the correct guidance of the gradient optimization direction under boundary conditions, thereby improving training efficiency and detection accuracy.

[0033] 3. Experimental verification and performance improvement: The effectiveness of the proposed method was verified through ablation experiments and comparative tests on the FGSD dataset. Compared with the baseline model RTMDet-R, a 3.17% improvement was achieved in the mAP50 indicator. In addition, the mAP50 indicator of the proposed method on the FGSD dataset reached 88.45%, the accuracy of ship heading prediction was improved to 96.17%, and the mAP50:95 was improved to 63.3% and 29.2% on the OHD-SJTU-S and OHD-SJTU-L datasets, respectively, showing the ability to accurately identify and locate ships in complex environments or facing multiple types of ships, as well as the accurate recognition performance of ship heading. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is an overall flow chart of a method for detecting the heading of an ocean ship based on angle coding and orientation intersection-combination ratio loss according to the present invention;

[0035] Figure 2 This is a network framework diagram for detecting the ship heading of the present invention;

[0036] Figure 3 Schematic diagram of the minimum circumscribed rectangle of the true value box and the prediction box of the present invention.

[0037] Figure 4 Schematic diagram of the minimum circumscribed rectangle problem of the true value box and the prediction box of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0039] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.

[0040] like Figure 2 As shown, the present invention proposes a method for detecting the heading of an ocean ship based on angle coding and orientation intersection-over-intersection loss, which is applied to the task of detecting the heading of an ocean ship. The detailed steps of the method are as follows:

[0041] S1: Collect the ship detection dataset and get the ship image x i and its corresponding label y i In this embodiment, the FGSD dataset is selected. The FGSD dataset is a high-resolution dataset designed for ship detection. It contains 636 large-size images with a standardized sampling distance of 1 meter pixel resolution. The size of these images can show a complete port. The dataset covers 5274 annotated targets belonging to 20 different categories. The dataset is divided into 424 images for training and 212 images for testing. The training set is denoted as B is the number of images in the training set.

[0042] S2: Construct a data preprocessing and random enhancement module to expand the data volume of the training set, and input the training set images in step S1 into the data preprocessing and random enhancement module for online data enhancement. In the data preprocessing module, the images in the data set will be cut through a sliding window of 1024×1024 pixels and a step size of 200 pixels, and uniformly adjusted to a size of 1024×1024 pixels for training and testing. In addition, in view of the different annotation methods of the bow target in different data sets, they are uniformly converted into the bow target representation method defined in the present invention. In the random enhancement module, the input image is first randomly flipped horizontally, and then six commonly used image enhancement strategies for the current visual task are selected, including (1) BaseAugment (only normalize the image); (2) SimAugment (random color distortion and Gaussian blur are performed in sequence, and additional sparse image distortion operations may be performed at the end of the sequence); (3) AutoAugment (automatic enhancement); (4) RandAugment (random enhancement); (5) TrivialAugment (randomly select an image enhancement operation each time, then randomly determine the enhancement amplitude of the randomly selected image enhancement operation, and enhance the image); (6) RandomErasing (randomly erase a rectangular area from the image without changing the original label of the image). That is, given an image in the training set, M (6≥M≥0) strategies randomly selected from the above six strategies are used to enhance the image, and finally the expanded training set is obtained, denoted as In this embodiment, M is 4.

[0043] S3: Construct a ship heading detection model based on angle coding and orientation intersection loss. The model structure is as follows: Figure 1 As shown. During the training phase, the angle parameter θ of the ground truth box e Converted into angle code by heading encoder This is then encoded with the predicted angle Prediction box Rbox pred And the truth box Rbox gt Calculate the orientation intersection-over-union loss function to optimize the network parameters. In the inference phase, the angle encoding of the prediction box Then it is converted into the angle prediction result θ by the decoder d , and the prediction box pred constitute the final test results.

[0044] The bow direction angle coder (Bow Direction Angle Code, BDAC) used in the present invention is used to encode the angle of the bow direction of the ship, and obtains more information by calculating the cosine value of an angle under different phase shift conditions, so as to obtain accurate prediction of the bow direction angle of the ship.

[0045] S4: The training set in S2 The image is input into the detection model constructed in step S3, and the model is trained by the orientation intersection-over-union loss function which combines the intersection-over-union loss, the center point penalty loss term, the shape penalty loss term, the angle penalty loss term and the angle encoding loss term. The detection model is updated by the back propagation algorithm, and the model with the best recognition accuracy on the verification set in step S1 is selected as the final trained detection model.

[0046] The loss function is used to train the model, towards the intersection-over-union loss function L HIoU The overall calculation formula is:

[0047] L HIoU =L overlap +λ center L center +λ shape L shape +λ θ L θ

[0048] Among them, λ center , shape With λ θ A weight parameter to balance different penalty loss items.

[0049] When the ship heading angle encoder is used for angle encoding, the overall loss function for training the ship heading detection network proposed by the present invention is:

[0050] Loss = L cls +λ HIoU L HIoU +λ BDAC L BDAC

[0051] Among them, L cls represents the classification loss function, λ HIoU With λ BDAC The modulation coefficient is used to balance the I / O loss and the angle coding loss.

[0052] S5: Input the test set images of S1 into the trained detection model, and compare the predicted category output by the model with the real category to obtain the final recognition accuracy. When the model recognition accuracy reaches the set threshold, the image to be recognized is input into the bow detection model for recognition; otherwise, return to S3 until the model recognition accuracy reaches the set threshold.

[0053] Figure 1 The workflow of the ship heading detection network training and reasoning phase is shown. In the training phase, the angle parameter θ of the ground truth box is eConverted into angle code by heading encoder This is then encoded with the predicted angle Prediction box Rbox pred And the truth box Rbox gt The total loss function is calculated to optimize the network parameters. In the inference phase, the angle encoding of the predicted box Then it is converted into the angle prediction result θ by the decoder d , and the prediction box pred constitute the final test results.

[0054] The bow direction angle coder (Bow Direction Angle Code, BDAC) used in the present invention is used to encode the angle of the bow direction of the ship, and obtains more information by calculating the cosine value of an angle under different phase shift conditions, so as to obtain accurate prediction of the bow direction angle of the ship.

[0055] In BDAC, the formula for encoding the ship's heading angle is as follows:

[0056]

[0057] in, is the nth set of true value frame angle encoding obtained by encoding, for n = 1, 2, 3, ..., N step , N step is the number of phase shifts, θ e is the ship heading angle value to be encoded in the true value box.

[0058] In BDAC, the formula for decoding the ship's heading angle is as follows:

[0059]

[0060] Among them, the arctan2 function is a specific implementation in the deep learning framework. is the predicted nth group of ship heading angle codes, for n = 1, 2, 3, ..., N step ,θ d The decoded ship heading angle value is obtained. BDAC predicts multiple cosine values ​​through phase shift coding to determine the ship heading angle, which solves the ambiguity problem when a single cosine value is used to determine the ship heading, and further solves the periodicity problem of the ship heading angle.

[0061] The loss function used in the present invention combines the intersection-over-union loss, the center point penalty loss term, the shape penalty loss term, the angle penalty loss term and the angle encoding loss term.

[0062] The intersection-over-union loss uses RIoU as an intuitive indicator to measure the overlap between the predicted box and the true value box, which is closely consistent with the evaluation standard, ensuring the consistency of the evaluation and training process, and directly affecting the improvement of network performance and accuracy. The overlap loss calculation formula is as follows:

[0063] L overlap =1-RIoU(Rbox gt ,Rbox pred )

[0064] Among them, RIoU represents the derivable RIoU loss function, Rbox gt With Rbox pred Represent the true value box and the predicted box respectively.

[0065] The center point penalty loss term allows the network to be optimized even when the prediction box and the true value box do not intersect. In order to maintain scale invariance and ensure that the model gives the same importance when processing objects of different scales, the minimum enclosing rectangle diagonal between the prediction box and the true value box is introduced as a normalization factor. The calculation formula of the center point loss term is as follows:

[0066]

[0067] Among them, ρ 2 (·) represents the Euclidean distance calculation formula, X gt With X pred Represent the center points of the true value box and the predicted box, respectively, and c represents the diagonal of the minimum circumscribed rectangle between the predicted box and the true value box, and its calculation process does not participate in the gradient back propagation. Figure 3 As shown in the figure, the blue box represents the true value box, the red box represents the predicted box, and the black box represents the minimum bounding rectangle covering the true value box and the predicted box obtained by using the cv2.minAreaRect function.

[0068] The shape penalty loss term can constrain the width and height of the prediction box separately and has a separate gradient optimization direction. In the boundary case of width and height exchange, it can correctly guide the optimization direction of the network. This paper considers the shape loss of two methods. The calculation formula of method one is as follows:

[0069]

[0070] Among them, w gt With h gt Respectively represent the width and height of the true value box, w pred With h pred Respectively represent the width and height of the prediction box, c w With c h Represents the width and height of the minimum bounding rectangle between the prediction box and the true value box, c w With ch The calculation process does not participate in gradient back propagation.

[0071] The calculation formula of method 2 is as follows:

[0072]

[0073]

[0074] Among them, μ shape is the shape loss modulation parameter, ω w is the width penalty factor, ω h is a high penalty factor.

[0075] like Figure 4 As shown, the blue box represents the true value box, the red box represents the predicted box, and the black box covers the minimum bounding rectangle of the true value box and the predicted box. However, the height c of the minimum bounding rectangle generated in this case is h Less than the height h of the truth box gt , then the ρ in the calculation formula of method 1 may occur 2 (h gt ,h pred ) is greater than a normalizing factor Normalization that affects shape loss. This is because the width and height of the minimum bounding rectangle of a directed box cannot accurately correspond to the width and height of the true box or predicted box, unlike horizontal boxes. Although both methods can impose penalties on boundary conditions where width and height are swapped, method one has limitations under these boundary conditions. Therefore, this chapter uses method two to calculate shape loss. This method uses the maximum value of the width and height of the predicted box and the true box as the normalization factor, and penalizes the deviation between the predicted box and the true box in width and height. The larger the deviation, the heavier the penalty.

[0076] The angle penalty loss term can provide a separate optimization gradient direction for the model to learn the orientation of the ship, so that the model can better learn the directional information of the ship target. At the same time, for the boundary case of angle inversion, the angle penalty loss term can penalize the deviation of the angle parameter between the predicted box and the true value box, so as to guide the network optimization direction. The calculation formula of the angle penalty loss term is as follows:

[0077]

[0078] Among them, θ pred With θ gt are the angle parameters of the predicted box and the true value box, respectively, pred -θ gt| is used to calculate the angle difference, and its value range is [0,2π). When the angle difference is π, the predicted box and the true value box are opposite in angle parameters. The cosine function itself is periodic and can handle the angle periodicity problem well in [0,2π). When the angle difference is close to π, the angle penalty loss term grows exponentially, and α is a hyperparameter that controls the growth rate. The angle penalty term loss reaches its maximum value at the boundary of the angle inversion, which enhances the sensitivity of the loss function to this situation and more accurately captures the deviation of the angle parameter.

[0079] When the ship heading angle encoder is used, the angle encoding loss term can be further calculated for the predicted ship heading angle encoding. From the formula for encoding the ship heading angle, it can be seen that the angle encoding of the truth box The value range of is [-1,1]. In order to make the training more stable, the output features are transformed. The transformation formula is as follows:

[0080]

[0081] in, is the output of the network. This formula can normalize the network output to [-1,1] to obtain a more stable prediction angle encoding

[0082] During the training phase, the gap between the predicted angle encoding and the true angle encoding is calculated to obtain the angle encoding loss term L BDAC , the calculation formula is as follows:

[0083]

[0084] in, is the angle encoding of the ground truth frame, Encoding the predicted angle. It not only provides direct feedback for the accurate prediction of the angle, but also effectively constrains the angle predicted by the model under the boundary conditions of angle inversion through fine error quantization, providing accurate model optimization direction.

[0085] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0086] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0087] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0088] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting the heading of an ocean ship based on angle coding and orientation intersection-over-combination ratio loss, characterized in that: The method comprises: S1. Collect the ship detection data set and obtain the required original ship image x i and its corresponding label y i , divide the training set, validation set and test set into proportional quantities, which are used for subsequent model training, validation and evaluation respectively, where the training set is recorded as B is the number of images in the training set; S2. Perform data preprocessing and online data enhancement on the training set images so that each image in the training set generates M different enhanced images. The number of images in the training set after expansion is B*M, denoted as S3, constructing an ocean ship heading detection model based on angle coding and orientation intersection-combination ratio loss; S4, the training set The image is input into the ocean ship heading detection model based on angle coding and orientation intersection-over-union loss, the ocean ship heading detection model is trained by using the orientation intersection-over-union loss function, the ocean ship heading detection model is updated by the back propagation algorithm, and the optimal ocean ship heading detection model is selected by using the validation set in S1; S5, using the test set in S1 to test the recognition performance of the ocean ship heading detection model, and obtaining the final model recognition accuracy. When the model recognition accuracy reaches the set threshold, the image to be recognized is input into the ship image ocean ship heading detection model for recognition; otherwise, return to S3 until the model recognition accuracy reaches the set threshold; The ocean ship heading detection model based on angle coding and orientation intersection-over-intersection loss in S3 is composed of a ship heading inspection network, a loss function, and an encoder; The angle parameter θ of the truth box e Converted into angle code by heading encoder This is then encoded with the predicted angle Prediction box Rbox pred And the truth box Rbox gt Calculate the intersection-over-union loss function and optimize the network parameters; During the inference phase, the angle encoding of the predicted box Then it is converted into the angle prediction result θ by the decoder d , and the prediction box pred Constitute the final test results; Use the ship heading encoder to encode the angle of the ship's heading. In the ship heading encoder, the formula for encoding the ship heading angle is: in, is the nth set of true value frame angle encoding obtained by encoding, for n = 1, 2, 3, ..., N step , N step is the number of phase shifts, θ e is the ship heading angle value to be encoded in the true value frame; In the ship heading encoder, the formula for decoding the ship heading angle is as follows: Among them, the arctan2 function is a specific implementation in the deep learning framework. is the predicted nth group of ship heading angle codes, for n = 1, 2, 3, ..., N step ,θ d is the decoded ship heading angle value; The orientation intersection-over-union loss function L described in S4 HIoU The overall calculation formula is: L HIoU =L overlap +λ center L center +λ shape L shape +λ θ L θ ; Among them, λ center , shape With λ θ To balance the weight parameters between different penalty loss items; When the ship heading angle encoder is used for angle encoding, the overall loss function used to train the ship heading detection network is: Loss=L cls +λ HIoU L HIoU +λ BDAC L BDAC ; Among them, L cls represents the classification loss function, λ HIoU With λ BDAC The modulation coefficient is used to balance the I / O loss and the angle coding loss.

2. The method according to claim 1, characterized in that: S2 performs preprocessing and online data enhancement on the input image, and finally obtains the expanded training set, which is recorded as Wherein, M is less than the number of types of image enhancement strategies.

3. The method according to claim 2, characterized in that The image enhancement strategy includes: BaseAugment, which only normalizes the image; SimAugment, which performs random color distortion and Gaussian blur in sequence, and performs an additional sparse image warping operation at the end of the sequence; AutoAugment, which means automatic enhancement; RandAugment, which means random augmentation; TrivialAugment, that is, randomly selecting an image enhancement operation each time, and then randomly determining the enhancement amplitude of the randomly selected image enhancement operation, and enhancing the image; RandomErasing randomly erases a rectangular area from an image without changing the original label of the image.

4. The method according to claim 2, characterized in that: The image enhancement strategy described in S2 includes one or more combinations of the following operations: normalizing the image, performing random color distortion and Gaussian blur in sequence, automatic enhancement, random enhancement, randomly selecting an image enhancement operation each time, then randomly determining the enhancement amplitude of the randomly selected image enhancement operation and enhancing the image, and randomly erasing a rectangular area from the image without changing the original label of the image.

Citation Information

Patent Citations

  • Efficient SAR image ship target detection method based on codec

    CN113657252A

  • Remote sensing image target detection method based on angle priority strategy

    CN115131672A