CN114419467A - Training method and device for target detection model of rotating ship and storage medium - Google Patents

Training method and device for target detection model of rotating ship and storage medium Download PDF

Info

Publication number
CN114419467A
CN114419467A CN202111598964.7A CN202111598964A CN114419467A CN 114419467 A CN114419467 A CN 114419467A CN 202111598964 A CN202111598964 A CN 202111598964A CN 114419467 A CN114419467 A CN 114419467A
Authority
CN
China
Prior art keywords
ship
training
detection model
angle
rotating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111598964.7A
Other languages
Chinese (zh)
Inventor
周翊民
吴相栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to CN202111598964.7A priority Critical patent/CN114419467A/en
Publication of CN114419467A publication Critical patent/CN114419467A/en
Priority to PCT/CN2022/140069 priority patent/WO2023116631A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a training method, a training device and a storage medium for a target detection model of a rotating ship. The training method comprises the following steps: preprocessing and angle labeling processing are carried out on the original rotating ship image to obtain a ship labeling image; setting the rotation triggering probability of the current training wheel according to the rotation loss condition after the previous training, and performing data enhancement processing according to the ship label image to obtain a ship enhancement image; inputting the ship enhanced image into a target detection model of a rotating ship to be trained to obtain a predicted value; calculating a loss function value of the current training wheel according to the predicted value and a real value corresponding to the ship marking image; and updating the model parameters of the target detection model of the rotating ship to be trained according to the loss function values, and finishing the current round of training. Dynamic data enhancement is carried out in the training process through loss feedback, the problem of sample imbalance is solved, the data enhancement is targeted, and the data enhancement efficiency is improved.

Description

Training method and device for target detection model of rotating ship and storage medium
Technical Field
The invention belongs to the technical field of computer vision, and particularly relates to a training method, a training device, a computer-readable storage medium and computer equipment for a target detection model of a rotating ship.
Background
Unmanned Aerial Vehicle (UAV) has simple structure, is convenient for maintain and convenient to carry, carries out a plurality of advantages such as task efficiency height and strong reliability, and it can take off and land anytime and anywhere, and the operation flexibility is strong, can satisfy the demand of various emergency tasks, is fit for patrolling and examining the flexibility of department such as harbour, fishing ground, tourism district. Compared with the synthetic aperture radar image used for ship identification in the past, the optical image from the unmanned aerial vehicle has more detailed information and an obvious geometric structure, and is more intuitive and easy to understand. Compared with a satellite picture, the cloud and fog interference received under the visual angle of the unmanned aerial vehicle is less, more effective characteristics can be extracted by the target imaging more clearly, and the unmanned aerial vehicle inspection mode is more suitable for flexible inspection tasks in specific areas. But simultaneously, in the unmanned aerial vehicle visual angle, the direction that sea ship target exists is indefinite and big aspect ratio characteristic, uses general method can not realize high accuracy quick identification.
At present, the detection task of the rotating target is mainly divided into two categories, namely a five-parameter method (angle-based method) and an eight-parameter method (angular point-based method). The main research direction is to consider the generation improvement of an anchor frame and a boundary frame, the feature alignment, the extraction of rotation invariant features and the like. In the directed bounding box generation aspect, a method is induced to extract OBB recommendations using a generative probability model, for each recommendation region, its location, size and direction is determined by searching for local maximum likelihood. Researchers also design fast rotating bounding box estimation algorithms to generate ground truth values of rotating bounding boxes from arbitrary segmented data sets, and estimate the rotation angles and sizes of bounding boxes with segmentation (masks) by ellipse fitting to train rotation angle regression models. In addition, feature matching is a key task of target detection, and it is a common way to design an optimization function with regularization to control feature representation before and after rotation mapping. Aiming at the field of rotating target detection, a recently common mode is to construct an independent rotation invariant layer on the basis of a convolutional neural network architecture, or to the rotation characteristic of a target in an aerial image, a learning device for rotating an interest region is designed to replace a traditional horizontal interest region and extract a rotation invariant feature from an RoI.
The ship detection task in the current aerial image faces the problem of data imbalance, the data set is few, angle information is involved, and sufficient sample data is difficult to provide. The general data enhancement method has a general effect for the special scene, mainly has a good optimization effect for the scale direction, but is difficult to meet the requirement of data enhancement on angle information in the scene.
Disclosure of Invention
(I) technical problems to be solved by the invention
The technical problem solved by the invention is as follows: the problem of data imbalance in the training process of the target detection model of the rotating ship is solved.
(II) the technical scheme adopted by the invention
A method of training a rotating vessel target detection model, the method comprising:
preprocessing and angle labeling processing are carried out on the original rotating ship image to obtain a ship labeling image;
setting the rotation triggering probability of the current training wheel according to the rotation loss condition after the previous training, and performing data enhancement processing according to the ship label image to obtain a ship enhancement image;
inputting the ship enhanced image into a target detection model of a rotating ship to be trained to obtain a predicted value;
calculating a loss function value of the current training wheel according to the predicted value and a real value corresponding to the ship marking image;
and updating the model parameters of the target detection model of the rotating ship to be trained according to the loss function values, and finishing the current round of training.
Preferably, the method for setting the rotation triggering probability of the current training round according to the rotation loss condition after the last round of training comprises the following steps:
after the previous round of training is finished, judging whether rotation loss unbalance exists or not;
if the rotation loss unbalance exists, setting the rotation triggering probability of the current training wheel to be a first preset value; and if the rotation loss unbalance does not exist, setting the rotation triggering probability of the current training wheel to be a second preset value.
Preferably, the method for inputting the ship enhanced image into the rotating ship target detection model to be trained to obtain the predicted value comprises the following steps:
after the ship enhanced image is input into a target detection model of a rotating ship to be trained, convolution characteristic graphs of different levels are obtained;
performing rotation feature alignment operation on the convolution feature map of each level to obtain a convolution region after feature alignment;
and determining the center coordinate, the width, the height and the angle of the prediction frame according to the convolution area after the features are aligned to be used as a prediction value.
Preferably, the method for performing a rotation feature alignment operation on the convolution feature map of each hierarchy to obtain a feature-aligned convolution region includes:
traversing a plurality of angles, and calculating the response value of a feature map region of a preset anchor frame, which is determined in the convolution feature map, in the feature map region corresponding to the target true value under each angle channel;
and calculating to obtain the convolution area after the features are aligned according to the angle corresponding to the maximum response value.
Preferably, the real values are the center coordinate, the width, the height and the angle corresponding to the real frame of the ship labeling image, and the method for calculating the loss function value of the current training wheel according to the predicted value and the real value corresponding to the ship labeling image comprises the following steps:
and calculating a first loss value based on an angle distance, a second loss value based on angle classification and a third loss value based on a category according to the central coordinate, the width, the height and the angle corresponding to the real frame and the central coordinate, the width, the height and the angle of the prediction frame, wherein the first loss value, the second loss value and the third loss value form the loss function value.
Preferably, the method of calculating the first loss value based on the angular distance includes:
calculating according to the central coordinate, width, height and angle corresponding to the real frame and the central coordinate, width, height and angle of the prediction frame to obtain the intersection ratio of the real frame and the prediction frame;
calculating to obtain a weight parameter based on an angle distance according to the angle of the real frame, the angle of the prediction frame and the length-width ratio of the real frame;
and calculating to obtain the first loss value according to the weight parameter based on the angle distance and the intersection ratio.
Preferably, the method for calculating the second loss value based on the angle classification includes:
and calculating to obtain a second loss value according to the angle of the real frame and the angle of the prediction frame.
The application also discloses rotary ship target detection model's trainer, trainer includes:
the preprocessing unit is used for preprocessing and angle labeling processing the original rotating ship image to obtain a ship labeling image;
the data enhancement unit is used for setting the rotation triggering probability of the current training wheel according to the rotation loss condition after the previous training, and performing data enhancement processing according to the ship marking image to obtain a ship enhancement image;
the data input unit is used for inputting the ship enhanced image into a rotating ship target detection model to be trained to obtain a predicted value;
the loss calculation unit is used for calculating a loss function value of the current training wheel according to the predicted value and a real value corresponding to the ship marking image;
and the parameter updating unit is used for updating the model parameters of the target detection model of the rotating ship to be trained according to the loss function values to complete the current round of training.
The application also discloses a computer readable storage medium, which stores a training program of the rotating ship target detection model, and the training program of the rotating ship target detection model is executed by a processor to realize the training method of the rotating ship target detection model.
The application also discloses a computer device, which comprises a computer readable storage medium, a processor and a training program of the rotating ship target detection model stored in the computer readable storage medium, wherein the training program of the rotating ship target detection model realizes the training method of the rotating ship target detection model when being executed by the processor.
(III) advantageous effects
The invention discloses a training method and a training device for a target detection model of a rotating ship, which have the following technical effects compared with the prior art:
the method adopts a new data enhancement strategy, and performs dynamic data enhancement in the training process through loss feedback, so that the problem of sample imbalance is solved, the data enhancement is targeted, and the data enhancement efficiency is improved.
Meanwhile, the method designs a module based on angle channel switching and angle distance aiming at the feature alignment problem of one-stage target detection, so that the accurate extraction of the image features related to the angle is realized, and the classification loss is reduced through the learning of the angle distance.
In addition, the discretization angle classification method of the angle distance converts the angle range of 180 degrees into 180 classification dimensions for processing, so that the regression problem of the angle information is converted into a classification problem, and the discontinuity of the boundary can be successfully avoided. And meanwhile, the IOU at the pixel level is calculated as a loss function, so that the influence factors of the IOU are considered in the loss calculation process, a more accurate matching scoring mechanism is obtained, the training process is optimized, the rotation angle difference is considered and used as a weight optimization loss function, and the detection precision of the ship target is improved.
Drawings
FIG. 1 is a general flowchart of a training method of a target detection model of a rotating ship according to a first embodiment of the present invention;
FIG. 2 is a general block diagram of a target detection model of a rotating ship according to a first embodiment of the present invention;
FIG. 3 is a schematic block diagram of a training apparatus for a target detection model of a rotating ship according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Before describing in detail the various embodiments of the present application, the inventive concepts of the present application are first briefly described: in the prior art, a ship detection task in an aerial image faces a data imbalance problem, a few data sets are involved, angle information is involved, sufficient sample data is difficult to provide, and a general data enhancement method is difficult to meet the data enhancement requirement of the angle information in the scene. After original image data are labeled, the rotation triggering probability of the current wheel is calculated according to the rotation loss condition after the previous round of training, namely, the rotation triggering probability in data enhancement in each round of training process is dynamically adjusted by introducing a loss feedback mechanism, data enhancement in the aspect of angle information is performed more specifically, the data enhancement efficiency is improved, the problem of unbalanced samples is solved, and then the obtained ship enhanced image is input into a to-be-trained rotary ship target detection model as a training sample to perform model training, so that the detection efficiency of the model is improved.
Specifically, as shown in fig. 1, the training method of the target detection model of the rotating ship according to the first embodiment includes the following steps:
and step S10, preprocessing and angle labeling processing are carried out on the original rotating ship image to obtain a ship labeling image.
Step S20, setting the rotation triggering probability of the current training wheel according to the rotation loss condition after the previous training, and performing data enhancement processing according to the ship label image to obtain a ship enhanced image;
step S30, inputting the ship enhanced image into a rotating ship target detection model to be trained to obtain a predicted value;
step S40, calculating a loss function value of the current training wheel according to the predicted value and a real value corresponding to the ship marking image;
and step S50, updating the model parameters of the target detection model of the rotating ship to be trained according to the loss function values, and finishing the training of the current round.
Specifically, before model training, ship image data of relevant scenes are acquired and angle labeling is carried out. And carrying out information annotation on the ship image data according to the angle coordinate and the target inclination angle. The target coordinate and angle expression used is (x, y, w, h, theta), where theta is defined by a long edge, i.e., an angle passing from the horizontal direction to the first long edge in the counterclockwise direction, and the value range is 0-180 °. The data set used for the ship image data is the HRSC2016, which is a ship inspection data set with a large aspect ratio and an arbitrary direction range. The data set contains two scenarios (marine vessel and offshore vessel) with 15 object classes. The size of each image ranges from 300 × 300 to 1500 × 900. The data set had 1061 images, 436 for training, 181 for verification, and 444 for testing.
In step S20, the ship annotation image required for each round of training is enhanced by splicing the 4 pictures through random scaling, random cropping, random rotation and random arrangement to form a new image, i.e. a ship enhanced image. Wherein the enhancement effect is controlled by setting a trigger probability for each enhancement mode. In the embodiment, a loss feedback mechanism is introduced, various losses are calculated once after each epoch is trained in the training process, and the contribution value of each loss is judged. If the angular loss contribution is small or large (determined by setting a threshold) after an epoch is trained, that is, the rotational loss is determined to be unbalanced, the triggering probability of the rotational enhancement is adjusted in the data enhancement process, that is, the triggering probability of the rotational enhancement is set to a first predetermined value, so that the data imbalance problem is alleviated to a certain extent. If the rotation loss is determined not to be unbalanced, data enhancement is performed according to the originally set trigger probabilities, that is, the rotation trigger probability is set to a second predetermined value. Illustratively, if too low, the rotation trigger probability is adjusted up to 50%, and if too high, it is adjusted down to 50%. This adjustment ratio can be set as desired.
If not, the current trigger probability is not changed, and the next step is directly carried out according to the current trigger probability value
Further, a target detection model of the rotating ship to be trained takes YOLOv5 as a basic framework, and a CSP structure and a Focus structure are introduced on the basis of Darknet53 to form a basic Backbone. For better extraction of fusion features, the structure of Spatial Pyramid Pooling layer (SPP) and FPN + PAN is introduced. In the SPP module, a plurality of pooling cores are used to perform a pooling operation on the input feature map, and then a concat operation is performed on feature maps processed by different pooling cores. The FPN is a top-down structure, and the feature information of a high layer is transmitted and fused in an up-sampling mode to obtain a feature map for prediction. At the same time, a bottom-up feature pyramid module containing two PAN structures is added to the FPN, which can convey location features. The combination of the FPN and the feature pyramid structure containing PAN performs parameter aggregation on different detection layers from different backbone layers, thereby further improving the feature extraction capability of the model. The rotating ship target detection model is further provided with a rotating characteristic alignment module, the rotating characteristic alignment module is used for evaluating the response strength of each characteristic area and a target real area by switching angle channels and adopting a maximum pooling method, and then a characteristic alignment effect aiming at an angle value is obtained through angle interpolation, so that the subsequently extracted characteristics can be more matched with the rotating ship target.
Specifically, as shown in fig. 2, after the ship enhanced image is input to the rotating ship target detection model to be trained, a convolution operation is performed to construct a multilayer convolution feature map, and a rotation feature alignment operation is performed for all convolution feature maps of different levels: and aiming at the pixel points in the image, the conventional feature extraction area can be judged through the preset anchor frame matching. The embodiment is improved on the basis, the angle channel values are switched aiming at a specific pixel point under a specific anchor frame matching state, a corresponding characteristic diagram area is calculated aiming at each angle channel value, the corresponding characteristic diagram area is compared with the characteristic diagram area corresponding to the target true value, a plurality of direction values with responses larger than a threshold value are obtained, and the direction channel value with the strongest response is used as the corresponding angle of characteristic alignment. And calculating deviation weights of the target truth value and the prediction result on the feature map according to the angle information after the features are aligned, and integrating the deviation weights into convolution calculation to perform feature extraction. The determination process and the feature extraction process of the convolution region after feature alignment refer to the following formulas:
Figure BDA0003432526520000071
Y(p)=W(r)·X(L)
wherein p is a coordinate position for operation, w and h are respectively the width and height of a rotating frame, R is a convolution kernel radius, R (theta) is an angle rotation matrix, an Mp operation is used to obtain an angle value with the strongest response to a true value of a current operation position, and a convolution region L with aligned features is obtained by calculating the strongest response angle. W (r) represents the convolution operation, x (l) represents the region of the feature map where the convolution operation is performed, and y (p) represents the extracted features.
Further, regarding the convolution region L after feature alignment as an anchor frame, combining the region covered by the true value frame and the coverage of the current anchor frame, the offset between the two frames can be calculated, and the coordinates of the two frames are calculated to obtain the coordinates of the current prediction frame, where the formula is as follows:
tx=(x-xa)/wa,ty=(y-ya)/ha
tw=log(w/wa),th=log(h/ha)
tθ=(θ-θa)·π/180
t'x=(x'-xa)/wa,t'y=(y'-ya)/ha
t'w=log(w'/wa),t'h=log(h'/ha)
t'θ=(θ'-θa)·π/180
LCSL=FL(θ,θ')
wherein x, y, w, h, theta respectively represent the center coordinate, width, height and angle of the true value frame; x ', y ', w ', h ', θ ' respectively represent the center coordinates, width, height and angle of the prediction box; x is the number ofa,ya,wa,haaRespectively, the center coordinates, width, height and angle of the anchor frame, and the symbols t, t' both represent the offset. FL represents Focal length, LCSLRepresenting the second loss value brought by the angle classification method itself.
Further, the Intersection-over-unity ratio (IOU) is adjusted according to the weight parameter of the calculated angle distance, so as to obtain the first loss value, and the specific calculation process is as follows.
Considering the angle information of the rotating target, how to obtain the accurate frame regression loss is a key research direction for improving the detection effect. Currently, commonly used frame loss functions are IOU, GIOU, CIOU and DIOU, but the frame loss functions are only suitable for horizontal frame detection and cannot obtain accurate rotation IOU. In order to design better frame regression loss, the first embodiment improves the PIOU method to design the loss function of the rotating target detection task.
The calculation of the IOU is to evaluate the degree of overlap of the two borders,since the rotated bounding box (OBB) and the intersection region are composed of pixels in the image space, their areas are approximated to the number of internal pixels. Since the OBB and intersection regions are made up of pixels in image space, their area is approximated by the number of interior pixels. In this embodiment, the true value frame and the prediction frame are respectively represented by b and b ', where b is a rotation boundary frame determined by the values x, y, w, h, and θ in the above formula, and similarly b ' is a rotation boundary frame determined by the values x ', y ', w ', h ', and θ ' in the above formula. To determine a point pi,jRelative position (inside or outside) to the bounding box OBB, the binary constraint is defined as follows:
Figure BDA0003432526520000081
wherein d isijIs a point pi,jL between central coordinates (x, y) of OBB2Norm distance, w, h is the width and height of the bounding box, dwAnd dhRespectively the distance d in the horizontal direction and the vertical direction.
Setting the intersection range of the true value box b and the prediction box b' as follows:
Figure BDA0003432526520000091
the union range is as follows:
Figure BDA0003432526520000092
the intersection-to-union ratio (IOU) of a pair of bounding boxes (b, b') is expressed as:
Figure BDA0003432526520000093
where PIOU is greater than the threshold of 0.5, b' is considered as a positive sample bounding box pair (the match of this pair of bounding boxes is considered as a positive sample).
PIOU can well represent the degree of overlap of two OBBs, but cannot calculate their angular difference. In the whole rotating target detection task, in order to make full use of the angle information of the target, the angle information is integrated into the PIOU method, so that the regression direction can be guided more accurately. And constructing a weight parameter sensitive to the angular distance, and introducing angle information of a rotating object in calculation so as to improve the PIOU loss. The weight parameter may be expressed as:
Figure BDA0003432526520000094
wherein R is the aspect ratio of the real frame, θbAnd thetab’The true angle and the predicted angle are the true angle and the predicted angle, respectively.
So the rotation perception PIoU loss, i.e. the first loss value based on angular distance, can be expressed as:
Figure BDA0003432526520000095
where M represents all bounding box pairs that are positive samples.
Meanwhile, the extracted features after feature alignment are used for class training, namely, the step of obtaining a third loss value L based on the class through simple feature map matching and using cross entropy loss for learning class features in an adjustment modelcls(pn,tn)。
The loss function value formed from the first loss value, the second loss value, and the third loss value is as follows:
Figure BDA0003432526520000096
wherein N in the above formula represents the number of anchor frames, objnIs a binary value (obj)n1 denotes foreground, objn0 for background, background no regression). b. b' are the true value box and the prediction box, respectively. Thetan、θ’nThe true angle and the predicted angle are respectively represented. t is tnAs a tag of an object, pnFor each type of probability distribution calculated using Sigmoid function. Hyper-parametric lambda1,λ2,λ3The control trade-off is by default {1,0.5,1 }.
Dividing the obtained ship enhanced image data into a training set and a test set according to the ratio of about 9:1, inputting the training set data and initial parameters into the constructed target detection model, and performing forward calculation. And training by using a back propagation algorithm and gradient descent update network weight until loss parameters in the network converge to obtain the minimum error, wherein the Adam optimizer is used for gradient optimization.
Further, different hyper-parameters are set, a scene is focused on an inspection task of the unmanned aerial vehicle on the offshore shore, and the task has certain requirements on real-time performance. The invention selects a one-stage detection frame YOLOv5l as a reference, and adds the methods of the dynamic data enhancement method, the angle classification idea, the feature alignment and the like into the training process. Compared with the known advanced models such as the RoI transform, R2CNN and the like, the method provided by the invention has the advantages that the overall performance is very outstanding under the condition of simultaneously considering the detection precision and the detection speed, the periodic problem of angle regression is avoided, and meanwhile, the method has high real-time performance and extremely high detection precision, and is suitable for being applied to inspection scenes with high similar real-time performance.
As shown in fig. 3, the second embodiment further discloses a training device for a target detection model of a rotating ship, which includes a preprocessing unit 100, a data enhancement unit 200, a data input unit 300, a loss calculation unit 400, and a parameter update unit 500. The preprocessing unit 100 is used for preprocessing and angle labeling processing the original rotating ship image to obtain a ship labeling image; the data enhancement unit 200 is configured to set a rotation triggering probability of a current training wheel, perform data enhancement processing according to a ship label image, and obtain a ship enhancement image; the data input unit 300 is used for inputting the ship enhanced image into a target detection model of the rotating ship to be trained to obtain a predicted value; the loss calculating unit 400 is used for calculating a loss function value of the current training wheel according to the predicted value and the real value corresponding to the ship marking image; the parameter updating unit 500 is configured to update the model parameters of the target detection model of the rotating ship to be trained according to the loss function values, and complete the current round of training.
Specifically, the data enhancement unit 200 is further configured to determine whether there is rotation loss imbalance after the previous round of training is completed; if the rotation loss unbalance exists, setting the rotation triggering probability of the current training wheel to be a first preset value; and if the rotation loss unbalance does not exist, setting the rotation triggering probability of the current training wheel to be a second preset value.
Further, the loss calculating unit 400 is further configured to calculate a first loss value based on the angle distance, a second loss value based on the angle classification, and a third loss value based on the category according to the center coordinate, the width, the height, and the angle corresponding to the real frame and the center coordinate, the width, the height, and the angle of the prediction frame, where the first loss value, the second loss value, and the third loss value constitute a loss function value.
The third embodiment also discloses a computer readable storage medium, wherein a training program of the rotating ship target detection model is stored in the computer readable storage medium, and the training program of the rotating ship target detection model is executed by a processor to realize the training method of the rotating ship target detection model.
Further, the fourth embodiment also discloses a computer device, which comprises, on a hardware level, as shown in fig. 4, a processor 12, an internal bus 13, a network interface 14, and a computer-readable storage medium 11. The processor 12 reads a corresponding computer program from the computer-readable storage medium and then runs, forming a request processing apparatus on a logical level. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices. The computer-readable storage medium 11 stores thereon a training program of a rotating ship target detection model, which when executed by a processor implements the above-described method of training a rotating ship target detection model.
Computer-readable storage media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
Although a few embodiments of the present invention have been shown and described, it would be appreciated by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the claims and their equivalents, and that such changes and modifications are intended to be within the scope of the invention.

Claims (10)

1. A training method for a rotating ship target detection model is characterized by comprising the following steps:
preprocessing and angle labeling processing are carried out on the original rotating ship image to obtain a ship labeling image;
setting the rotation triggering probability of the current training wheel according to the rotation loss condition after the previous training, and performing data enhancement processing according to the ship label image to obtain a ship enhancement image;
inputting the ship enhanced image into a target detection model of a rotating ship to be trained to obtain a predicted value;
calculating a loss function value of the current training wheel according to the predicted value and a real value corresponding to the ship marking image;
and updating the model parameters of the target detection model of the rotating ship to be trained according to the loss function values, and finishing the current round of training.
2. The method for training a rotating ship target detection model according to claim 1, wherein the method for setting the rotation triggering probability of the current training wheel according to the rotation loss condition after the previous training comprises the following steps:
after the previous round of training is finished, judging whether rotation loss unbalance exists or not;
if the rotation loss unbalance exists, setting the rotation triggering probability of the current training wheel to be a first preset value; and if the rotation loss unbalance does not exist, setting the rotation triggering probability of the current training wheel to be a second preset value.
3. The method for training the rotating ship target detection model according to claim 2, wherein the method for inputting the ship enhanced image into the rotating ship target detection model to be trained to obtain the predicted value comprises the following steps:
after the ship enhanced image is input into a target detection model of a rotating ship to be trained, convolution characteristic graphs of different levels are obtained;
performing rotation feature alignment operation on the convolution feature map of each level to obtain a convolution region after feature alignment;
and determining the center coordinate, the width, the height and the angle of the prediction frame according to the convolution area after the features are aligned to be used as a prediction value.
4. The method for training the rotating ship target detection model according to claim 3, wherein the method for performing the rotating feature alignment operation on the convolution feature map of each level to obtain the feature-aligned convolution region comprises:
traversing a plurality of angles, and calculating the response value of a feature map region of a preset anchor frame, which is determined in the convolution feature map, in the feature map region corresponding to the target true value under each angle channel;
and calculating to obtain the convolution area after the features are aligned according to the angle corresponding to the maximum response value.
5. A method for training a rotating vessel target detection model according to claim 3, wherein the real values are the center coordinates, width, height and angle corresponding to the real frame of the vessel labeling image, and the method for calculating the loss function value of the current training wheel according to the predicted value and the real value corresponding to the vessel labeling image comprises:
and calculating a first loss value based on an angle distance, a second loss value based on angle classification and a third loss value based on a category according to the central coordinate, the width, the height and the angle corresponding to the real frame and the central coordinate, the width, the height and the angle of the prediction frame, wherein the first loss value, the second loss value and the third loss value form the loss function value.
6. A method for training a rotating vessel target detection model according to claim 5, wherein the method for calculating the first loss value based on angular distance comprises:
calculating according to the central coordinate, width, height and angle corresponding to the real frame and the central coordinate, width, height and angle of the prediction frame to obtain the intersection ratio of the real frame and the prediction frame;
calculating to obtain a weight parameter based on an angle distance according to the angle of the real frame, the angle of the prediction frame and the length-width ratio of the real frame;
and calculating to obtain the first loss value according to the weight parameter based on the angle distance and the intersection ratio.
7. A method for training a rotating vessel target detection model according to claim 6, wherein the method for calculating the second loss value based on angle classification comprises:
and calculating to obtain a second loss value according to the angle of the real frame and the angle of the prediction frame.
8. A training apparatus for a rotating ship target detection model, the training apparatus comprising:
the preprocessing unit is used for preprocessing and angle labeling processing the original rotating ship image to obtain a ship labeling image;
the data enhancement unit is used for setting the rotation triggering probability of the current training wheel, and carrying out data enhancement processing according to the ship marking image to obtain a ship enhancement image;
the data input unit is used for inputting the ship enhanced image into a rotating ship target detection model to be trained to obtain a predicted value;
the loss calculation unit is used for calculating a loss function value of the current training wheel according to the predicted value and a real value corresponding to the ship marking image;
and the parameter updating unit is used for updating the model parameters of the target detection model of the rotating ship to be trained according to the loss function values to complete the current round of training.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a training program of a rotating vessel object detection model, which when executed by a processor implements the method of training the rotating vessel object detection model according to any one of claims 1 to 7.
10. A computer device, characterized in that the computer device comprises a computer-readable storage medium, a processor and a training program of a rotating vessel object detection model stored in the computer-readable storage medium, the training program of the rotating vessel object detection model, when executed by the processor, implementing the method of training of the rotating vessel object detection model according to any one of claims 1 to 7.
CN202111598964.7A 2021-12-24 2021-12-24 Training method and device for target detection model of rotating ship and storage medium Pending CN114419467A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111598964.7A CN114419467A (en) 2021-12-24 2021-12-24 Training method and device for target detection model of rotating ship and storage medium
PCT/CN2022/140069 WO2023116631A1 (en) 2021-12-24 2022-12-19 Training method and training apparatus for rotating-ship target detection model, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111598964.7A CN114419467A (en) 2021-12-24 2021-12-24 Training method and device for target detection model of rotating ship and storage medium

Publications (1)

Publication Number Publication Date
CN114419467A true CN114419467A (en) 2022-04-29

Family

ID=81268880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111598964.7A Pending CN114419467A (en) 2021-12-24 2021-12-24 Training method and device for target detection model of rotating ship and storage medium

Country Status (2)

Country Link
CN (1) CN114419467A (en)
WO (1) WO2023116631A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114842365A (en) * 2022-07-04 2022-08-02 中国科学院地理科学与资源研究所 Unmanned aerial vehicle aerial photography target detection and identification method and system
CN116052094A (en) * 2023-03-07 2023-05-02 浙江华是科技股份有限公司 Ship detection method, system and computer storage medium
CN116309696A (en) * 2022-12-23 2023-06-23 苏州驾驶宝智能科技有限公司 Multi-category multi-target tracking method and device based on improved generalized cross-over ratio
WO2023116631A1 (en) * 2021-12-24 2023-06-29 中国科学院深圳先进技术研究院 Training method and training apparatus for rotating-ship target detection model, and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117611966A (en) * 2023-10-31 2024-02-27 仲恺农业工程学院 Banana identification and pose estimation method based on Yolov7 rotating frame
CN117437595A (en) * 2023-11-27 2024-01-23 哈尔滨航天恒星数据***科技有限公司 Fishing boat boundary crossing early warning method based on deep learning
CN117789041B (en) * 2024-02-28 2024-05-10 浙江华是科技股份有限公司 Ship defogging method and system based on atmospheric scattering priori diffusion model

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019028725A1 (en) * 2017-08-10 2019-02-14 Intel Corporation Convolutional neural network framework using reverse connections and objectness priors for object detection
CN113468968B (en) * 2021-06-02 2023-04-07 中国地质大学(武汉) Remote sensing image rotating target detection method based on non-anchor frame
CN113536936B (en) * 2021-06-17 2022-10-11 中国人民解放军海军航空大学航空作战勤务学院 Ship target detection method and system
CN114419467A (en) * 2021-12-24 2022-04-29 中国科学院深圳先进技术研究院 Training method and device for target detection model of rotating ship and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023116631A1 (en) * 2021-12-24 2023-06-29 中国科学院深圳先进技术研究院 Training method and training apparatus for rotating-ship target detection model, and storage medium
CN114842365A (en) * 2022-07-04 2022-08-02 中国科学院地理科学与资源研究所 Unmanned aerial vehicle aerial photography target detection and identification method and system
CN116309696A (en) * 2022-12-23 2023-06-23 苏州驾驶宝智能科技有限公司 Multi-category multi-target tracking method and device based on improved generalized cross-over ratio
CN116309696B (en) * 2022-12-23 2023-12-01 苏州驾驶宝智能科技有限公司 Multi-category multi-target tracking method and device based on improved generalized cross-over ratio
CN116052094A (en) * 2023-03-07 2023-05-02 浙江华是科技股份有限公司 Ship detection method, system and computer storage medium

Also Published As

Publication number Publication date
WO2023116631A1 (en) 2023-06-29

Similar Documents

Publication Publication Date Title
CN114419467A (en) Training method and device for target detection model of rotating ship and storage medium
TWI762860B (en) Method, device, and apparatus for target detection and training target detection network, storage medium
Chen et al. Efficient and robust 2d-to-bev representation learning via geometry-guided kernel transformer
CN111985376A (en) Remote sensing image ship contour extraction method based on deep learning
CN113191296A (en) Method for detecting five parameters of target in any orientation based on YOLOV5
CN109145747A (en) A kind of water surface panoramic picture semantic segmentation method
WO2023019875A1 (en) Vehicle loss detection method and apparatus, and electronic device and storage medium
JP7439153B2 (en) Lifted semantic graph embedding for omnidirectional location recognition
US20230121534A1 (en) Method and electronic device for 3d object detection using neural networks
CN111783523A (en) Remote sensing image rotating target detection method
CN113177503A (en) Arbitrary orientation target twelve parameter detection method based on YOLOV5
Fan et al. A novel sonar target detection and classification algorithm
CN115578416A (en) Unmanned aerial vehicle target tracking method, system, medium and electronic equipment
Song et al. Fine-grained object detection in remote sensing images via adaptive label assignment and refined-balanced feature pyramid network
Xiao et al. FDLR-Net: A feature decoupling and localization refinement network for object detection in remote sensing images
CN113128564B (en) Typical target detection method and system based on deep learning under complex background
CN116912675B (en) Underwater target detection method and system based on feature migration
CN113610178A (en) Inland ship target detection method and device based on video monitoring image
CN113536920A (en) Semi-supervised three-dimensional point cloud target detection method
CN115937520A (en) Point cloud moving target segmentation method based on semantic information guidance
Zhou et al. LEDet: localization estimation detector with data augmentation for ship detection based on unmanned surface vehicle
CN110895680A (en) Unmanned ship water surface target detection method based on regional suggestion network
CN112926480B (en) Multi-scale and multi-orientation-oriented aerial photography object detection method and system
CN114758202B (en) Short wave infrared ship detection method and system based on semantic perception feature enhancement
RU2776814C1 (en) Method and electronic device for detecting three-dimensional objects using neural networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination