Rotation image detection model training method
By using a rotary enclosure box to constrain and annotate the targets in the image, and combining the rotary frame cross-comparison loss function and the cross-entropy loss function for model training, the problem of large error in the rotation object detection in the prior art is solved, and efficient rotation image detection model training is achieved.
Patent Information
- Application Number
- CN202411870903.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-03-18
AI Technical Summary
In the prior art, the image detection model has large errors when processing the rotation target, and adding the instance segmentation part results in high consumption of computing resources and is difficult to put into use.
By acquiring the ray image, preprocessing and annotating, using the rotary enclosure box to constrain the target, calculate the coordinates and covariance matrix of the center point of the rotary enclosure box, trained as a training sample, and use the rotary entropy loss function and the cross entropy loss function for model training.
Effectively constrain the targets in the image, reduce background parts, improve detection accuracy, reduce computing resource consumption, and improve model training speed and real-time performance.
Smart Images

Figure CN119649015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of radiographic image target detection, and in particular to a training method for a rotation image detection model. Background Art
[0002] With the development of society and economic prosperity, the frequency of people's travel and the scale of express logistics are constantly expanding. Security inspection plays a vital role in maintaining public safety. At present, X-ray scanning is a commonly used technical means in security inspection. It can penetrate the surface of objects and help security inspectors identify potential prohibited items. However, this process not only places high demands on the attention and judgment of security inspectors, but also makes it difficult to maintain long-term concentration. Frequent personnel rotation also increases the burden on human resources.
[0003] In recent years, with the rise of deep learning technology, contraband detection has also made breakthrough progress. The deep learning model can automatically extract image features and learn complex patterns, significantly improving the accuracy and robustness of detection. This not only brings new solutions to security inspections, but also provides a more solid guarantee for public safety.
[0004] However, the objects in the training sample images used for training the image detection model are usually placed regularly, but in actual detection, objects are often placed irregularly. Therefore, the trained detection model ignores the problem of irregular placement of objects when predicting images with rotating objects, resulting in large errors in the model's prediction of irregularly placed objects and objects with serious overlapping interference. In order to solve this problem in the prior art, it is usually necessary to add an instance segmentation part to the image detection model. However, the segmentation model leads to a significant increase in the amount of calculation when training the model, more computing resources are required, and it takes more time on the same hardware, making it difficult to use in practice.
[0005] Therefore, there is an urgent need for a detection model that can accurately identify rotating targets using a small amount of computing resources. Summary of the invention
[0006] In view of the above analysis, an embodiment of the present invention aims to provide a method for training a rotation image detection model, so as to solve the problem that the detection model trained by the existing method cannot accurately identify the rotation target and consumes a lot of resources.
[0007] An embodiment of the present invention provides a training method for a rotation image detection model, the training method comprising:
[0008] Acquire a number of radiographic images, perform preprocessing operations on the number of radiographic images, and mark the category labels of each target in each preprocessed radiographic image and the coordinates of the four corner points of the rotation bounding box;
[0009] Calculate the center point coordinate label and covariance matrix label of the rotation bounding box of each target according to the coordinates of the four corner points of the rotation bounding box of each target; take a ray image and the category label, center point coordinate label and covariance matrix label corresponding to each target marked in the image as a training sample to obtain several training samples; divide the several training samples into a training set and a validation set;
[0010] The preset neural network model is trained for a preset number of iterations using the training set, and a trained rotated image detection model is determined based on the evaluation results of the validation set at the end of each iteration.
[0011] Based on the further improvement of the above training method, the center point coordinates and covariance matrix of the rotation bounding box of each target are calculated by the following formula:
[0012]
[0013] Among them, (x0, y0) represents the coordinates of the center point, (x1, y1), (x2, y2), (x3, y3) and (x4, y4) represent the coordinates of the four corner points, ∑ represents the covariance matrix, k = 1, 2, 3, 4.
[0014] Based on the further improvement of the above training method, the preset neural network model is trained for a preset number of iterations using the training set, and the trained rotation image detection model is determined according to the evaluation result of the validation set at the end of each iteration process, including:
[0015] In each iteration, multiple training samples are randomly selected from the training set, and the multiple training samples are divided into multiple groups. All the training samples in each group are used to train the preset neural network model in turn to obtain the predicted categories, predicted center point coordinates and predicted covariance matrix of all targets in all the training samples in each group;
[0016] Calculate the loss function values of all training samples in the current group, update the weight parameters of the preset neural network model in combination with the preset gradient descent training method, and use the updated preset neural network model to start training the next group of training samples until all groups of training samples have completed training;
[0017] After all groups of training samples have completed training, the preset neural network model obtained in this iteration process is evaluated using samples in the validation set to obtain the evaluation results of this iteration;
[0018] Determine whether the number of iterations meets the preset number of iterations. If so, use the preset neural network model corresponding to the optimal evaluation result as the trained rotation image detection model; if not, continue training for the next iteration process.
[0019] Based on the further improvement of the above training method, the calculation of the loss function value of all training samples in the current group in the preset neural network model includes:
[0020] Calculate the category loss value based on the category labels and predicted categories of all targets in all training samples;
[0021] Calculate the rotation bounding box loss value based on the center point coordinate labels and covariance matrix labels of all targets in all training samples, as well as the predicted center point coordinates and predicted covariance matrix;
[0022] The loss function value is calculated based on the category loss value and the rotation bounding box loss value, as well as the preset category weight value and the rotation bounding box weight value.
[0023] Based on the further improvement of the above training method, the category loss value is calculated by the following formula:
[0024]
[0025] Among them, L BCE represents the category loss value, M represents the number of all targets in all training samples of the current group, N represents the number of categories, and y i,j represents the predicted category value of the i-th category of the j-th target, p i,j Represents the class label value of the i-th class of the j-th target.
[0026] Based on the further improvement of the above training method, the rotation bounding box loss value is calculated by the following formula:
[0027]
[0028] Among them, L ProbIoU represents the rotation bounding box loss value, BD represents the distance function, represents the predicted center point coordinates of the jth target, represents the predicted covariance matrix of the jth target, The center point coordinate label of the jth target, Represents the covariance matrix label of the j-th target.
[0029] Based on the further improvement of the above training method, the loss function value is calculated by the following formula:
[0030] L=ω1L BCE +ω2L ProbIoU ;
[0031] 1 = ω1 + ω2;
[0032] Among them, L represents the loss function value, ω1 represents the preset category weight value, and ω2 represents the preset rotation bounding box weight value.
[0033] Based on the further improvement of the above training method, the preset gradient descent training method is any one of the following:
[0034] Stochastic gradient descent;
[0035] Adam gradient descent algorithm;
[0036] Batch Gradient Descent.
[0037] Based on the further improvement of the above training method, the preset neural network model is any one of the following series models:
[0038] RCNN series;
[0039] YOLO series;
[0040] DINO series;
[0041] DiffusionDet series.
[0042] Based on the further improvement of the above training method, the preprocessing operation includes one or more of the following operations:
[0043] Grayscale;
[0044] Binarization;
[0045] Normalization;
[0046] Zoom;
[0047] Cutting;
[0048] Sharpening;
[0049] Filtering.
[0050] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0051] 1. When making training samples for the rotated image detection model, the image is annotated with a rotating bounding box, which can effectively constrain each target in the image, reduce the background part of the target, make the bounding box of each target clearer, and improve the detection accuracy of each target in the image;
[0052] 2. When training the rotated image detection model, the rotated box intersection-over-union loss function is used to determine the bounding box loss of each target and the cross entropy loss function is used to determine the category loss of each target. This can improve the training speed of the rotated image detection model while ensuring the real-time performance of the rotated image detection model for image detection.
[0053] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The drawings are only for the purpose of illustrating specific embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0055] Figure 1 A flowchart of a method for training a rotation image detection model provided by an embodiment of the present invention;
[0056] Figure 2 A schematic diagram of using a traditional rectangular frame to mark irregularly placed objects provided by an embodiment of the present invention;
[0057] Figure 3 A schematic diagram of using a traditional rectangular frame to mark multiple similar objects placed at an angle provided by an embodiment of the present invention;
[0058] Figure 4 A schematic diagram of using a rotating rectangular bounding box to mark irregularly placed objects provided by an embodiment of the present invention;
[0059] Figure 5 A schematic diagram of using a rotating rectangular bounding box to mark multiple similar objects that are placed at an angle provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0061] A specific embodiment of the present invention discloses a training method for a rotation image detection model, such as Figure 1 As shown, the training method comprises:
[0062] Step S1: obtaining a plurality of radiographic images, performing preprocessing operations on the plurality of radiographic images, and marking the category labels of each target in each preprocessed radiographic image and the coordinates of the four corner points of the rotation bounding box;
[0063] Step S2: Calculate the center point coordinate label and covariance matrix label of the rotation bounding box of each target according to the coordinates of the four corner points of the rotation bounding box of each target; take a ray image and the category label, center point coordinate label and covariance matrix label corresponding to each target marked in the image as a training sample to obtain a plurality of training samples; divide the plurality of training samples into a training set and a validation set;
[0064] Step S3: The preset neural network model is trained for a preset number of iterations using the training set, and a trained rotation image detection model is determined based on the evaluation results of the validation set at the end of each iteration process.
[0065] Specifically, Figure 1 As shown, in step S1, a plurality of radiographic images are first obtained from historical radiographic images, and a preprocessing operation is performed on each radiographic image.
[0066] Preferably, the preprocessing operation includes one or more of the following operations:
[0067] Grayscale;
[0068] Binarization;
[0069] Normalization;
[0070] Zoom;
[0071] Cutting;
[0072] Sharpening;
[0073] Filtering.
[0074] Specifically, grayscale is the process of converting a color image into a grayscale image, which helps reduce the complexity of image processing and storage requirements. Binarization is the process of converting an image into an image containing only two pixel values, which is used to simplify image data and make the image easier to further analyze and process. Normalization is the process of scaling the pixel values of an image to a specific range, such as scaling to a range of 0 to 1. The scale of image data can be adjusted to improve the efficiency and accuracy of analysis and modeling. Scaling and cropping are the process of adjusting the size and content of an image. Scaling changes the resolution and pixel density of an image, while cropping changes the composition and focus of an image, helping to adjust the image to meet analysis and processing requirements. Sharpening is the process of enhancing the edges and contours in an image to make the image look clearer and more vivid. Filtering is the process of processing an image in the frequency domain or spatial domain, adjusting the frequency components of an image to improve image quality or extract useful information to enhance or suppress certain features in the image.
[0075] Specifically, after performing a preprocessing operation on a plurality of radiographic images in step S1, a plurality of preprocessed radiographic images are obtained, and each radiographic image is annotated. During the annotation, a rotating bounding box is used as the bounding box of each target in the radiographic image.
[0076] It is worth noting that if Figure 2 As shown in the figure, irregularly placed objects will cause too much background in the rectangular bounding box when constrained by traditional rectangular boxes. Figure 3 As shown in the figure, when multiple similar objects are placed at an angle, using traditional rectangular boxes to constrain them will cause serious box overlap. Figure 2 and Figure 3 As shown in the figure, if a rectangular bounding box is used as the constraint box of each target for an obliquely placed object, the interference of each target will increase, which will make it difficult to identify the target and the recognition accuracy will be low.
[0077] like Figure 4 and Figure 5 As shown, when the present invention uses a rotating rectangular bounding box to constrain irregularly placed objects and multiple similar objects placed at an angle, the background portion of each target can be reduced, and the intersection portion of two overlapping targets can be reduced, so that each target is effectively constrained and the bounding box of each target is clearer.
[0078] It is worth mentioning that by annotating each radiographic image with a rotating rectangular bounding box, the interference of each target can be effectively reduced, the workload of training the rotated image detection model can be reduced, the speed of training the rotated image detection model can be increased, and the detection speed and recognition accuracy of each target can be improved.
[0079] Specifically, Figure 1 As shown, in step S1, the category of each target in the preprocessed radiographic image is labeled to determine the category label of each target in the form of a one-hot label, such as [0,1,0,0,0,0], indicating that all targets include a total of 6 categories, and this target belongs to the second category.
[0080] Specifically, Figure 4 and Figure 5 As shown, the coordinates of the four corner points of the rotated rectangular bounding box refer to the coordinates of the four corner points of the rotated rectangular bounding box. After marking each target, the coordinates of the four corner points and the category label of each target can be determined.
[0081] Specifically, Figure 1 As shown, in step S2, according to the coordinates of the four corner points of each target obtained in step S1, the center point coordinates and covariance matrix of the rotated bounding box of each target are calculated as the center point coordinate label and covariance matrix label of each target.
[0082] Preferably, the center point coordinates and covariance matrix of the rotation bounding box of each target are calculated by the following formula:
[0083]
[0084] Among them, (x0, y0) represents the coordinates of the center point, (x1, y1), (x2, y2), (x3, y3) and (x4, y4) represent the coordinates of the four corner points, ∑ represents the covariance matrix, k = 1, 2, 3, 4.
[0085] Specifically, in step S2, the category label, center point coordinate label and covariance matrix label of each target in each radiation image are obtained, and a radiation image and the category label, center point coordinate label and covariance matrix label of each target in the image are used as a training sample to obtain several training samples, and the several training samples are divided into a training set and a validation set.
[0086] Specifically, Figure 1 As shown, in step S3, the preset neural network model is trained for a preset number of iterations using the training set obtained in step S2 to obtain a neural network model for each iteration, and at the same time, the neural network model for each iteration is evaluated using the validation set to obtain an evaluation result for each iteration, and the evaluation results of the neural network models for all iterations are compared, and the neural network model corresponding to the optimal evaluation result is used as the trained rotated image detection model.
[0087] Exemplarily, the preset number of iterations is set to 100 in advance, 100 neural network models are obtained, and corresponding evaluation results are obtained at the same time. The 100 evaluation results are compared, and the neural network model with the best evaluation result is selected as the trained rotated image detection model.
[0088] Preferably, the method of training a preset neural network model for a preset number of iterations using a training set and determining a trained rotation image detection model according to an evaluation result of a validation set at the end of each iteration process includes:
[0089] In each iteration, multiple training samples are randomly selected from the training set, and the multiple training samples are divided into multiple groups. All the training samples in each group are used to train the preset neural network model in turn to obtain the predicted categories, predicted center point coordinates and predicted covariance matrix of all targets in all the training samples in each group;
[0090] Calculate the loss function values of all training samples in the current group, update the weight parameters of the preset neural network model in combination with the preset gradient descent training method, and use the updated preset neural network model to start training the next group of training samples until all groups of training samples have completed training;
[0091] After all groups of training samples have completed training, the preset neural network model obtained in this iteration process is evaluated using the samples in the validation set to obtain the evaluation results of this iteration;
[0092] Determine whether the number of iterations meets the preset number of iterations. If so, use the preset neural network model corresponding to the optimal evaluation result as the trained rotation image detection model; if not, continue training for the next iteration process.
[0093] Specifically, at the beginning of each iteration process, multiple training samples are randomly selected from the training set, and the multiple training samples are divided into multiple groups. For example, 10,000 training samples are selected and divided into 10 groups, with 1,000 training samples in each group. The training order of the 10 groups is determined, and each group of training samples is used in turn to train the preset neural network model.
[0094] Specifically, after each group of training samples is input into the preset neural network model, the predicted categories, predicted center point coordinates and predicted covariance matrix of all targets in each group of training samples are obtained, the loss function value of each group of training samples is calculated, and the weight parameters of the preset neural network model are updated according to the loss function value. The updated preset neural network model is used as the preset neural network model for the next group of training samples, and the training process of the next group of training samples is started until all groups of training samples are trained.
[0095] Preferably, the calculation of the loss function values of all training samples in the current group in a preset neural network model includes:
[0096] Calculate the category loss value based on the category labels and predicted categories of all targets in all training samples;
[0097] Calculate the rotation bounding box loss value based on the center point coordinate labels and covariance matrix labels of all targets in all training samples, as well as the predicted center point coordinates and predicted covariance matrix;
[0098] The loss function value is calculated based on the category loss value and the rotation bounding box loss value, as well as the preset category weight value and the rotation bounding box weight value.
[0099] Specifically, determine the category labels and predicted categories of all targets in each group of training samples, and calculate the category loss value using the following formula:
[0100]
[0101] Among them, L BCE represents the category loss value, M represents the number of all targets in all training samples of the current group, N represents the number of categories, and y i,j represents the predicted category value of the i-th category of the j-th target, pi,j Represents the class label value of the i-th class of the j-th target.
[0102] Specifically, determine the center point coordinate labels and covariance matrix labels of all targets in each group of training samples, as well as the predicted center point coordinates and predicted covariance matrix, and calculate the rotation bounding box loss value using the following formula:
[0103]
[0104]
[0105] Among them, L ProbIoU represents the rotation bounding box loss value, BD represents the distance function, represents the predicted center point coordinates of the jth target, represents the predicted covariance matrix of the jth target, The center point coordinate label of the jth target, Represents the covariance matrix label of the j-th target.
[0106] After obtaining the category loss value and the rotation bounding box loss value of each group of training samples, the loss function value is calculated by the following formula:
[0107] L=ω1L BCE +ω2L ProbIoU ;
[0108] 1 = ω1 + ω2;
[0109] Among them, L represents the loss function value, ω1 represents the preset category weight value, and ω2 represents the preset rotation bounding box weight value.
[0110] Specifically, the loss function value corresponding to each group of training samples is calculated, and the weight parameters of the preset neural network model are updated according to the preset gradient descent training method to obtain an updated preset neural network model.
[0111] After all groups of training samples have completed training, the preset neural network model obtained from the last group of training samples is evaluated using the validation set to obtain the evaluation results of this iteration.
[0112] Specifically, the preset neural network model is any one of the following series of models:
[0113] RCNN series;
[0114] YOLO series;
[0115] DINO series;
[0116] DiffusionDet series.
[0117] Specifically, the RCNN series can be RCNN, FastRCNN, FasterRCNN, etc., the YOLO series can be YOLOv1 to YOLOv10, etc., the DINO series can effectively solve the problems of slow training convergence and poor small target detection effect by contrasting denoising training, hybrid query selection method and forward-looking two-layer anchor frame update method, and the DiffusionDet series is a target detection model based on the diffusion model. This framework can detect targets directly from a set of random frames. It formulates target detection as a denoising diffusion process from noise frame to target frame.
[0118] Preferably, the preset gradient descent training method is any one of the following:
[0119] Stochastic gradient descent;
[0120] Adam gradient descent algorithm;
[0121] Batch Gradient Descent.
[0122] Specifically, the stochastic gradient descent (SGD) method has high computational efficiency, strong adaptability, and the ability to jump out of the local minimum, which helps the preset neural network model to jump out of the local minimum and find the optimal solution.
[0123] Specifically, the Adam gradient descent algorithm combines the characteristics of the momentum gradient descent method and the RMSProp algorithm. It updates the model parameters through adaptive learning rate and second-order moment estimation, which can accelerate the convergence speed of the preset neural network model in the gradient descent process and avoid falling into the local optimal solution.
[0124] Specifically, batch gradient descent has stable convergence and can obtain a stable preset neural network model more quickly.
[0125] Specifically, after obtaining the evaluation result of this iteration, the preset neural network model obtained in this iteration process is used to start the training process of the next iteration until the number of iterations meets the preset number of iterations. The evaluation results of the preset number of iterations are compared, and the preset neural network model corresponding to the optimal evaluation result is selected as the trained rotation image detection model.
[0126] Compared with the prior art, a training method for a rotated image detection model provided by an embodiment of the present invention uses a rotating bounding box to annotate the image when making training samples of the rotated image detection model, thereby effectively constraining each target in the image and reducing the background part in the target. The bounding box of each target is also clearer, thereby improving the detection accuracy of each target in the image. At the same time, when training the rotated image detection model, a rotating box intersection-over-union loss function is used to determine the bounding box loss of each target and a cross entropy loss function is used to determine the category loss of each target, which can improve the training speed of the rotated image detection model and ensure the real-time performance of the rotated image detection model for image detection.
[0127] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0128] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A training method for a rotation image detection model, characterized in that: The training method comprises: Acquire a number of radiographic images, perform preprocessing operations on the number of radiographic images, and mark the category labels of each target in each preprocessed radiographic image and the coordinates of the four corner points of the rotation bounding box; Calculate the center point coordinate label and covariance matrix label of the rotation bounding box of each target according to the coordinates of the four corner points of the rotation bounding box of each target; take a ray image and the category label, center point coordinate label and covariance matrix label corresponding to each target marked in the image as a training sample to obtain several training samples; divide the several training samples into a training set and a validation set; The preset neural network model is trained for a preset number of iterations using the training set, and a trained rotated image detection model is determined based on the evaluation results of the validation set at the end of each iteration.
2. The training method according to claim 1, characterized in that: The center point coordinates and covariance matrix of the rotation bounding box of each target are calculated using the following formula: Among them, (x0, y0) represents the coordinates of the center point, (x1, y1), (x2, y2), (x3, y3) and (x4, y4) represent the coordinates of the four corner points, ∑ represents the covariance matrix, k = 1, 2, 3, 4.
3. The training method according to claim 2, characterized in that: The method of using the training set to train the preset neural network model for a preset number of iterations, and determining a trained rotation image detection model according to the evaluation result of the validation set at the end of each iteration process, includes: In each iteration, multiple training samples are randomly selected from the training set, and the multiple training samples are divided into multiple groups. All the training samples in each group are used to train the preset neural network model in turn to obtain the predicted categories, predicted center point coordinates and predicted covariance matrix of all targets in all the training samples in each group; Calculate the loss function values of all training samples in the current group, update the weight parameters of the preset neural network model in combination with the preset gradient descent training method, and use the updated preset neural network model to start training the next group of training samples until all groups of training samples have completed training; After all groups of training samples have completed training, the preset neural network model obtained in this iteration process is evaluated using samples in the validation set to obtain the evaluation results of this iteration; Determine whether the number of iterations meets the preset number of iterations. If so, use the preset neural network model corresponding to the optimal evaluation result as the trained rotation image detection model; if not, continue training for the next iteration process.
4. The training method according to claim 3, characterized in that: The calculation of the loss function values of all training samples in the current group in the preset neural network model includes: Calculate the category loss value based on the category labels and predicted categories of all targets in all training samples; Calculate the rotation bounding box loss value based on the center point coordinate labels and covariance matrix labels of all targets in all training samples, as well as the predicted center point coordinates and predicted covariance matrix; The loss function value is calculated based on the category loss value and the rotation bounding box loss value, as well as the preset category weight value and the rotation bounding box weight value.
5. The training method according to claim 4, characterized in that: The category loss value is calculated using the following formula: Among them, L BCE represents the category loss value, M represents the number of all targets in all training samples of the current group, N represents the number of categories, and y i,j represents the predicted category value of the i-th category of the j-th target, p i,j Represents the class label value of the i-th class of the j-th target.
6. The training method according to claim 4, characterized in that: The rotation bounding box loss value is calculated by the following formula: Among them, L ProbIoU represents the rotation bounding box loss value, BD represents the distance function, represents the predicted center point coordinates of the jth target, represents the predicted covariance matrix of the jth target, The center point coordinate label of the jth target, Denotes the covariance matrix label of the j-th target.
7. The training method according to claim 4, characterized in that: The loss function value is calculated by the following formula: L=ω1L BCE +ω2L ProbIoU ; 1 = ω1 + ω2; Among them, L represents the loss function value, ω1 represents the preset category weight value, and ω2 represents the preset rotation bounding box weight value.
8. The training method according to claim 3, characterized in that: The preset gradient descent training method is any one of the following: Stochastic gradient descent; Adam gradient descent algorithm; Batch Gradient Descent.
9. The training method according to any one of claims 2 to 8, characterized in that: The preset neural network model is any one of the following series of models: RCNN series; YOLO series; DINO series; DiffusionDet series.
10. The training method according to claim 9, characterized in that: The pre-processing operation includes one or more of the following operations: Grayscale; Binarization; Normalization; Zoom; Cutting; Sharpening; Filtering.