Unmanned aerial vehicle ocean small ship target detection method based on fusion framework
By introducing foreground area assembly technology and expanded detection layers into UAV ocean target detection, the problem of low efficiency and low accuracy in small target detection from the UAV perspective is solved, and efficient and stable ocean small vessel target detection is achieved.
Patent Information
- Application Number
- CN202411033671.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-30
AI Technical Summary
In the detection of ocean targets from the perspective of UAVs, small targets account for a high proportion. The existing technology requires multiple local area detections, which is time-consuming and has a great impact on the setting of hyperparameters, resulting in unstable detection results.
Foreground area assembly technology is introduced to splice local target area blocks into an image, so that the local detector only needs one inference. An extended detection layer and feature fusion enhancement module are designed in the target detection model to generate high-resolution feature maps to improve small-scale detection. Target detection accuracy.
It greatly reduces the detection time consumption, improves the recognition rate and detection accuracy, and the model is highly scalable and suitable for different types of small target detection tasks.
Smart Images

Figure CN118658086A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning algorithms and target detection technology, and specifically to a method for detecting small marine vessels using an unmanned aerial vehicle (UAV) based on a fusion framework. Background Art
[0002] The rapid development of deep learning has greatly accelerated progress in the field of computer vision. Object detection methods can be categorized into single-stage and two-stage models based on the object detection process. Compared to single-stage models, two-stage models add a step to extract candidate regions and generate candidate bounding boxes. The second stage primarily refines the candidate bounding boxes generated in the first stage and classifies the objects. Single-stage object detection algorithms eliminate the time-consuming and complex process of extracting candidate regions, resulting in faster inference speed than multi-stage object detectors. This often comes at the cost of reduced accuracy.
[0003] Compared to general scenes, drone-based object detection often involves small objects. The drone's flight altitude creates a greater distance from the target, while the flexible gimbal provides a wide and varied field of view. These factors contribute to a high proportion of small objects in drone aerial images, and the overall small size of the objects. Objects are categorized by size based on the MS COCO dataset's definition criteria: objects smaller than 32×32 pixels are considered small, and objects larger than 96×96 pixels are considered large. Small and medium-sized objects make up the vast majority of drone-based datasets, while the proportion of large objects is negligible compared to general scenes, accounting for 5.53% in VisDrone and only 1.39% in the UAVDT dataset. Small vessels are particularly prominent in marine object detection.
[0004] Currently, most solutions to these problems require multiple inferences during local region detection, which is time-consuming. Furthermore, many methods require additional network structures to generate local region blocks. Furthermore, most of these methods rely on a series of hyperparameter settings, and the selection of these parameters significantly influences the extraction results, making the overall detection performance unstable. Summary of the Invention
[0005] To address the multiple inferences required for local region detection, this paper introduces foreground region assembly technology, splicing extracted local target region blocks into a single image. This allows the local target detector to perform only a single inference, significantly reducing time consumption. Furthermore, to enhance the representation of small target features, an extended detection layer is introduced into the target detection model, within which a feature fusion enhancement module (FFA) is designed. This yields high-resolution feature maps richer in critical information, enabling better small target detection.
[0006] To achieve the above object, the present invention provides the following technical solutions: A method for detecting small marine vessels using a UAV based on a fusion framework, comprising the following steps: S1) Process the global dataset of small-target marine ship images taken by drones to obtain the required original drone-taken images and its corresponding category label The global data set is divided into training set, validation set and test set according to the proportion of the number, which are used for subsequent training, validation and evaluation of the model respectively. The training set is recorded as , B is the number of images in the training set; S2) Perform online data augmentation on the images in the training set so that each image in the training set generates different enhanced images, the number of images after the training set is expanded is , recorded as ; S3) Build a UAV-based ocean small vessel target detection model based on a “global-local” fusion framework; S4) The training set The image is input into the global detector. SimOTA positive and negative sample matching is used in the global detector training process. The regression loss of the global detector adopts GIOU loss, and the classification loss is calculated using FocalLoss loss function. The global detector is updated through the back-propagation algorithm, and the optimal global detector is selected using the validation set in step S1).
[0007] S5) The output of the global detector is processed through NMS to generate a set of global prediction results, and a corresponding series of detection frames are separated. At the same time, considering the deviation of the prediction results of the global detector and avoiding serious overlap of the final foreground area, the foreground area blocks are extracted based on the prediction of the global detector; S6) A series of foreground region blocks are obtained by the foreground region extraction method of S5). To save inference time, a foreground region assembly module is used to assemble the foreground region blocks into an image, which is input into a local detector to perform local foreground region block detection. S7) The validation set and test set in step S1) and the data-enhanced training set in step S2) are combined with the foreground region assembly module in step S6) to generate the training set, validation set, and test set required for the local detector, and named as the local training set. Local validation set and local test set; using local training set Train the local detector; select the best local detector through the local validation set; S8) The optimal global detector and local detector selected by steps S4) and S7) are tested on the global test set and the local test set respectively, and the global prediction result R1 and the local prediction result R2 of the test are subjected to NMS processing to obtain the result of target detection of small ocean vessels in the "global-local" fusion framework.
[0008] As a further technical solution of the present invention, in step S2), the input image is cropped to 640*640 pixels and then randomly flipped horizontally, and then the image is enhanced using the image enhancement strategy, and finally the expanded training set is obtained, which is recorded as .
[0009] As a further technical solution of the present invention, the image enhancement strategy in step 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 its enhancement amplitude and enhancing the image, and randomly erasing a rectangular area from the image without changing the original label of the image.
[0010] As a further technical solution of the present invention, the target detection model is composed of a global detector , local detector , foreground area extraction and foreground region assembly composition: The target detection model consists of a global detector The YOLOX-M model pre-trained on the COCO dataset is used as the basis for global target detection of marine ship images. Specifically, the global detector It consists of the backbone feature network extraction CSPDarknet and FFA small target detection extension layer, feature fusion module PAFPN and decoupled detection head Decoupled Head. Its core point is the extraction of small targets in the extension layer part, Generate a larger resolution feature map from the shallow layer of the backbone network As a basis, As a key source of supplementary information, the designed feature fusion enhancement module FFA is obtained.
[0011] As a further technical solution of the present invention, SimOTA in step S4) is a matching strategy method that achieves the lowest cost of assigning Anchor Point to GTBoxes. The cost includes Iou loss and classification loss. The cost formula is: ; Where, The loss cost of each sample and each GT is The classification loss between each sample and each GT, The regression loss between each sample and each GT.
[0012] As a further technical solution of the present invention, in step S4), GIOU loss is an indicator used to measure the similarity or dissimilarity between two geometric shapes, and is usually used to calculate the distance or difference between two geometric shapes. The advantage of GIOU over IOU is that it more accurately captures the position and size differences between target boxes, and has better performance for low overlap. The GIOU formula is as follows: ; In the formula, is the intersection-union ratio of two rectangular boxes, is the minimum circumscribed rectangle of the two rectangles, and U is the rubber area of the two rectangles; according to The formula shows that when two rectangles A and B completely overlap, IoU=1 and =0, GIoU=1; when the two boxes do not overlap, IoU=0, when A and B are infinitely apart, GIoU=-1, so -1<=GIoU<=1, so set .
[0013] As a further technical solution of the present invention, in step S4), classification cross entropy loss is a commonly used loss function that uses the cross entropy between the probability distribution output by the model and the actual label as loss to train the classification model, and is generally used in multi-category classification tasks; Cross entropy loss for two-category (binary classification) case: ; Cross entropy loss for multi-class cases: ; in, and represent the probability distribution of true labels and model outputs, respectively, and Represents the probability of the true label and the i-th category output by the model respectively; Focal Loss is a loss function used to solve the problem of class imbalance. It is particularly effective when dealing with extremely unbalanced data sets. Its advantage is that it can focus on the training of difficult samples. By reducing the weight of easy-to-classify samples, the model pays more attention to those difficult-to-classify samples, thereby improving the performance of the model in the case of class imbalance. The introduction of this loss function helps to improve the model's ability to identify minority classes, thereby performing better when dealing with unbalanced data. Suppose the probability of the model output is , the true label is , the number of categories is C, and the calculation formula of Focal Loss is as follows: ; in, is the value of the i-th category of the true label is the probability of the i-th category predicted by the model, It is an adjustable parameter, usually a positive number, used to adjust the balance between easy-to-classify samples and difficult samples. It can make the model pay more attention to samples that are difficult to classify, C is the number of categories; Focal Loss is mainly introduced by The term is used to reduce the weight of easy-to-classify samples, so that the model pays more attention to samples that are difficult to classify.
[0014] As a further technical solution of the present invention, in step S5), the method for extracting the foreground area block is as follows: First, the detection box that has not been clustered Select the detection frame A with the smallest area, and then traverse the other detection frames B∈ , find the area block C that can cover both detection frame A and detection frame B; if the sum of the areas of detection frame A and detection frame B is larger than the area of area block C, then merge detection frame A and detection frame B, replace detection frame A with area block C, and at the same time Remove the detection box B, and after traversal, add the detection box A to the final foreground area block result Repeat the above steps until all the initial detection boxes are Complete clustering; this method can more efficiently extract high-quality foreground area blocks.
[0015] As a further technical solution of the present invention, in step S6), the assembly method includes: adjusting the scale and assembling the regional blocks using a rectangular block assembly method; The scale adjustment includes the following steps: First calculate each foreground area block The average size of the objects contained : ; According to the scale classification standard of the MS COCO dataset, the main scale categories of the objects contained in the foreground area blocks are determined, and then different scales are used to classify the objects. For resizing, the settings are as follows: .
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. High Recognition Rate: This invention is specifically designed for marine vessel detection. Since vessels captured by drones are typically small objects, the detection expansion layer in this invention incorporates an additional feature layer compared to other methods. This larger feature layer is closer to the underlying information and can easily capture small object information. SimOTA positive and negative sample matching is used to facilitate model learning of sufficient feature information. The addition of the small target expansion layer effectively suppresses background noise.
[0017] 2. Strong scalability: The YOLOX-M based on the present invention relies on the Yolo target detection ecosystem, and its principles are highly universal. According to actual needs, appropriate training data can be selected and applied to different types of small target detection tasks.
[0018] 3. Reasonable data structure: The present invention designs a discriminative label smoothing term and a discriminative supervised contrast loss to learn a more compact and reasonable data structure; thereby, a model for UAV marine small vessel target detection based on a "global-local" fusion framework with stronger salient feature capture capabilities is trained. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 The flowchart of a method for detecting small marine vessels using a UAV based on a fusion framework in an embodiment of the present invention is shown.
[0020] Figure 2 This is a demonstration diagram of the random enhancement module in an embodiment of the present invention.
[0021] Figure 3 Schematic diagram of UAV marine small vessel target detection based on fusion framework in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, 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 only used to explain the present invention and are not intended to limit the present invention.
[0023] This embodiment uses the detection of small targets of ocean vessels as a scenario to explain in detail a small target enhanced detection model based on a “global-local” fusion framework provided by the present invention.
[0024] See also Figure 1 As an embodiment of the present invention, a method for detecting small marine vessels using a UAV based on a fusion framework is provided, the method comprising the following steps: S1) Process the global dataset of small-target marine ship images taken by drones to obtain the required original drone-taken images and its corresponding category label The global data set is divided into training set, validation set and test set according to the proportion of the number, which are used for subsequent training, validation and evaluation of the model respectively. The training set is recorded as , B is the number of images in the training set; The captured image contains a ship target, and the category label refers to the annotation label of the ship target. In this embodiment, the training set, the validation set, and the test set are divided according to the ratio of 8:1:1.
[0025] S2) Perform online data augmentation on the images in the training set so that each image in the training set generates M different augmented images. The number of images in the augmented training set is , recorded as ; In this embodiment, step S2) crops the input image to 640*640 pixels and then randomly flips it horizontally. Then, the image enhancement strategy is used to enhance the image, and finally the expanded training set is obtained, which is recorded as In this embodiment, M is 4, such as Figure 2 shown.
[0026] Among them, the image enhancement strategy 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 its enhancement amplitude and enhancing the image, and randomly erasing a rectangular area from the image without changing the original label of the image.
[0027] S3) Construct a UAV marine small vessel target detection model based on the “global-local” fusion framework. The model structure is as follows Figure 3 shown.
[0028] In this embodiment, the target detection model is composed of a global detector , local detector , foreground area extraction and foreground region assembly composition: The target detection model consists of a global detector The YOLOX-M model pre-trained on the COCO dataset is used as the basis for global target detection of marine ship images. Specifically, the global detector It consists of the backbone feature network extraction CSPDarknet and FFA small target detection extension layer, the feature fusion module PAFPN and the decoupled detection head Decoupled Head.
[0029] S4) The training set The image is input into the global detector. SimOTA positive and negative sample matching is used in the global detector training process. The regression loss of the global detector adopts GIOU loss, and the classification loss is calculated using FocalLoss loss function. The global detector is updated through the back-propagation algorithm, and the optimal global detector is selected using the validation set in step S1).
[0030] In this embodiment, the feature map of the ocean vessel image is obtained after feature extraction. Size .in, The feature fusion network PAFPN extracts three-layer features based on the backbone network CSPDarknet, which are obtained through two fusion paths: top-down and bottom-up. The number of channels is 8c, 4c, and 2c respectively. The larger resolution feature map of the shallow layer of the backbone network As a basis, As a key source of supplementary information, the designed feature fusion enhancement module FFA is obtained. Compared with the original feature map , It has the same large size, but contains richer semantic and local details. The feature map is the shallow feature extracted by the backbone network, and its features are relatively rough. Therefore, it is passed through a CSP module for feature refinement and channel expansion to generate , the number of channels is . The generation process can be mathematically expressed as: ; in, Represents 2x upsampling, using nearest neighbor interpolation. From the upper two layers 、 After fusion operation, it is obtained With the same size, the upsampling operation is achieved Ensure the same size. The results are fed into a layered decoupling head to obtain regression and classification predictions. Valid anchor points and positive samples are determined by matching positive and negative samples, and then the classification and regression losses are calculated.
[0031] SimOTA in step S4) is a matching strategy method that achieves the lowest cost of assigning anchor points to GTBoxes. The cost includes Iou loss and classification loss. The cost formula is: ; Where, The loss cost of each sample and each GT is The classification loss between each sample and each GT, The regression loss between each sample and each GT.
[0032] Categorical cross entropy loss is a commonly used loss function that uses the cross entropy between the probability distribution of the model output and the actual label as the loss to train classification models. It is usually used in multi-category classification tasks. Cross entropy loss for two-category (binary classification) case: ; Cross entropy loss for multi-class cases: ; in, and represent the probability distribution of true labels and model outputs, respectively, and Represents the probability of the true label and the i-th category output by the model respectively; In this embodiment, the classification loss adopts Focal Loss, which is a loss function used to solve the problem of class imbalance. It is particularly effective when dealing with extremely unbalanced data sets. Suppose the probability of the model output is , the true label is , the number of categories is C, and the calculation formula of Focal Loss is as follows: ; in: is the value of the i-th category of the true label is the probability of the i-th category predicted by the model. It is an adjustable parameter, usually a positive number, used to adjust the balance between easy-to-classify samples and difficult samples. It can make the model pay more attention to samples that are difficult to classify, and C is the number of categories. Focal Loss is mainly introduced by The term is used to reduce the weight of easy-to-classify samples, so that the model pays more attention to samples that are difficult to classify.
[0033] The regression loss uses the GIOU loss, which is a metric used to measure the similarity or dissimilarity between two geometric shapes. It is usually used to calculate the distance or difference between two geometric shapes. The advantage of GIOU over IOU is that it more accurately captures the position and size differences between target boxes and has better performance in cases with low overlap.
[0034] The formula is as follows: ; In the formula, is the intersection-union ratio of two rectangular boxes, is the minimum circumscribed rectangle of the two rectangles, and U is the rubber area of the two rectangles. The formula shows that when two rectangles A and B completely overlap, IoU=1 and =0, GIoU=1. When the two boxes do not overlap, IoU=0, and when A and B are infinitely apart, GIoU = -1, so -1 <= GIoU <=1. Therefore, set .
[0035] The loss function is used to calculate the loss, and the optimizer and direction propagation are then updated. The model is continuously optimized during the training process. The validation set from step S1 is used to select the optimal global ocean ship detection model.
[0036] S5) The output of the global detector is processed through NMS to generate a set of global prediction results, and a corresponding series of detection frames are separated. At the same time, considering the deviation of the prediction results of the global detector and avoiding serious overlap of the final foreground area, the foreground area blocks are extracted based on the prediction of the global detector; In this embodiment, the method for extracting the foreground area block is as follows: first, the detection frame that has not been clustered is extracted. Select the detection frame A with the smallest area, and then traverse the other detection frames B∈ , find the area block C that can cover both detection frame A and detection frame B; if the sum of the areas of detection frame A and detection frame B is larger than the area of area block C, then merge detection frame A and detection frame B, replace detection frame A with area block C, and at the same time Remove the detection box B, and after traversal, add the detection box A to the final foreground area block result Repeat the above steps until all the initial detection boxes are Complete clustering; this method can more efficiently extract high-quality foreground area blocks.
[0037] S6) A series of foreground region blocks are obtained by the foreground region extraction method of S5). To save inference time, a foreground region assembly module is used to assemble the foreground region blocks into an image, which is input into a local detector to perform local foreground region block detection. In this embodiment, the assembly process primarily involves two steps: 1. Resizing blocks containing objects of varying sizes is relatively scaled according to specific rules to balance the scales of each block, ensuring that small and medium-sized objects, which are difficult to detect, occupy a larger pixel share. Using a rectangular block assembly method for block assembly allows for efficient and rational arrangement of image blocks, minimizing the generation of unused space and ensuring a sufficient effective share of foreground blocks in the assembled image.
[0038] The scale adjustment includes the following steps: First calculate each foreground area block The average size of the objects contained : ; According to the scale classification standard of the MS COCO dataset, the main scale categories of the objects contained in the foreground area blocks are determined, and then different scales are used to classify the objects. For resizing, the settings are as follows: .
[0039] S7) The validation set and test set in step S1) and the data-enhanced training set in step S2) are combined with the foreground region assembly module in step S6) to generate the training set, validation set, and test set required for the local detector, and named as the local training set. Local validation set and local test set; using local training set Train the local detector; select the best local detector through the local validation set; S8) The optimal global detector and local detector selected by steps S4) and S7) are tested on the global test set and the local test set respectively, and the global prediction result R1 and the local prediction result R2 of the test are subjected to NMS processing to obtain the result of target detection of small ocean vessels in the "global-local" fusion framework.
[0040] The present invention reconstructs the two core modules of regional foreground extraction and regional foreground assembly on the "global-local" basic model. The present invention overcomes the multiple inferences during local area detection and introduces foreground area assembly technology to splice the extracted local target area blocks into an image, so that the local target detector only needs to perform one inference, which greatly reduces time consumption and enables the model to have higher recognition accuracy and faster inference speed.
[0041] This invention builds upon the "global-local" basic model by introducing an extended detection layer to enhance the detection of small marine vessels. The extended detection layer's primary purpose is to generate a high-resolution feature map rich with key semantics and detail information through a designed feature fusion enhancement module (FFA), without changing the input image resolution. This enhances the representation of small objects at this layer, resulting in a relatively smaller receptive field, facilitating their recognition.
[0042] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.
[0043] It should be understood that those skilled in the art can improve or transform the principles of the present invention and the above description, or apply the method provided by the present invention to similar aerial image recognition tasks, and all such improvements and transformations should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for detecting small marine vessels using a UAV based on a fusion framework, characterized in that: The method comprises the following steps: S1) Process the global dataset of small marine target ship images taken by drones to obtain the required original drone images and its corresponding category label The global data set is divided into training set, validation set and test set according to the proportion, 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 online data augmentation on the images of the training set so that each image in the training set generates M different augmented images. The number of images in the augmented training set is B*M, denoted as ; S3) Construct a UAV marine small vessel target detection model based on the "global-local" fusion framework; S4) The training set The image is input into the global detector. SimOTA positive and negative sample matching is used in the global detector training process. The regression loss of the global detector adopts GIOU loss, and the classification loss is calculated using Focal Loss loss function. The global detector is updated through the back propagation algorithm, and the optimal global detector is selected using the validation set in step S1). S5) The output of the global detector is processed through NMS to generate a set of global prediction results, a corresponding series of detection frames are separated, and foreground area blocks are extracted based on the prediction of the global detector; S6) obtaining a series of foreground area blocks by the foreground area extraction method of step S5), assembling the foreground area blocks by using a foreground area assembly module to form an image, inputting the image into a local detector, and performing detection of the local foreground area blocks; S7) The validation set and test set in step S1) and the data-enhanced training set in step S2) are assembled by the foreground region assembly module in step S6) to generate the training set, validation set and test set required by the local detector, and named as the local training set Local validation set and local test set; using local training set Train the local detector; select the best local detector through the local validation set; S8) The optimal global detector and local detector selected by steps S4) and S7) are tested on the global test set and the local test set respectively, and the global prediction result R1 and the local prediction result R2 of the test are processed by NMS to obtain the result of target detection of small ocean vessels in the "global-local" fusion framework.
2. According to the method of claim 1, the method is characterized in that: Step S2) The input image is cropped to 640*640 pixels and randomly flipped horizontally. Then, the image is enhanced using the image enhancement strategy. Finally, the expanded training set is obtained, which is recorded as .
3. The method for detecting small marine vessels by unmanned aerial vehicle based on fusion framework according to claim 2 is characterized in that: The image enhancement strategy in step 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 its enhancement amplitude and enhancing the image, and randomly erasing a rectangular area from the image without changing the original label of the image.
4. The method for detecting small marine vessels by unmanned aerial vehicle based on fusion framework according to claim 3 is characterized in that: The target detection model consists of a global detector , local detector , foreground area extraction and foreground region assembly composition: The object detection model consists of a global detector The YOLOX-M model pre-trained on the COCO dataset is used as the basis, global detector It consists of the backbone feature network extraction CSPDarknet and FFA small target detection extension layer, feature fusion module PAFPN and decoupled detection head Decoupled Head.
5. The method for detecting small marine vessels using a UAV based on a fusion framework according to claim 1 is characterized in that: SimOTA in step S4) is a matching strategy method, which realizes the lowest cost of assigning Anchor Point to GTBoxes. The cost includes Iou loss and classification loss. The formula of cost is: ; In the formula, The loss cost per sample and per GT is The classification loss between each sample and each GT, The regression loss between each sample and each GT.
6. The method for detecting small marine vessels using a drone based on a fusion framework according to claim 1 is characterized in that: In step S4), GIOU loss is an indicator used to measure the similarity or dissimilarity between two geometric shapes, and is used to calculate the distance or difference between two geometric shapes. The GIOU formula is as follows: ; In the formula, is the intersection-and-union ratio of two rectangular boxes, is the minimum circumscribed rectangle of the two rectangles, and U is the rubber area of the two rectangles; according to The formula shows that when two rectangles A and B completely overlap, IoU=1 and =0, GIoU=1; when the two boxes do not overlap, IoU=0, when A and B are infinitely separated, GIoU=-1, so -1<=GIoU<=1, so set .
7. The method for detecting small marine vessels using a drone based on a fusion framework according to claim 1 is characterized in that: In step S4), classification cross entropy loss is a commonly used loss function, which uses the cross entropy between the probability distribution of the model output and the actual label as the loss, and is used to train the classification model, and is usually used in multi-category classification tasks; Cross entropy loss for the two-class case: ; Cross entropy loss for multi-class cases: ; in, and Represent the probability distribution of the true label and model output, respectively. and Represent the probability of the true label and the i-th category output by the model respectively; Focal Loss is a loss function used to solve the problem of class imbalance. Suppose the probability of the model output is , the true label is , the number of categories is C, and the calculation formula of Focal Loss is as follows: ; in, is the value of the i-th category of the true label is the probability of the i-th category predicted by the model, is an adjustable parameter and C is the number of categories.
8. The method for detecting small marine vessels using a UAV based on a fusion framework according to claim 1 is characterized in that: In step S5), the method for extracting the foreground area block is as follows: First, the detection box that has not been clustered Select the detection box A with the smallest area, and then traverse the other detection boxes B∈ , find the area block C that can cover both the detection box A and the detection box B; If the sum of the areas of detection frame A and detection frame B is greater than the area of region block C, then detection frame A and detection frame B are merged, and detection frame A is replaced by region block C. Remove the detection box B from the foreground area, and add the detection box A to the final foreground area block result after traversal. Repeat the operation until all initial detection boxes Clustering is complete.
9. The method for detecting small marine vessels using a drone based on a fusion framework according to claim 1 is characterized in that: In step S6), the assembly method includes: adjusting the scale and assembling the regional blocks by using a rectangular block assembly method; The scale adjustment includes the following steps: First, calculate each foreground area block The average size of the objects contained : ; According to the scale classification standard of the MS COCO dataset, the main scale categories of the objects contained in the foreground area blocks are determined, and then different scales are divided into To adjust the size, set it up as follows: 。
Citation Information
Patent Citations
Occluded pedestrian re-identification and retrieval method based on multi-feature collaboration and semantic perception
CN114842512A
Image salient object segmentation method and apparatus based on reciprocal attention between foreground and background
US20200372660A1
Cited By
Efficient training data set labeling method based on multi-class insect images
CN119152318A
Multi-target tracking method for visual guidance of unmanned aerial vehicle
CN121527125A
Unmanned aerial vehicle video identification method and device, electronic equipment and storage medium
CN121600449A
