ST network-based wading target detection method and device, medium and product
Through the image segmentation and feature fusion method based on the Swin-Transformer network, the accuracy and versatility problems of wading target detection from the perspective of drones are solved, and efficient wading target detection is achieved.
Patent Information
- Application Number
- CN202410295324.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-09-16
AI Technical Summary
Existing water target detection methods from the perspective of drones have shortcomings in detection accuracy and versatility, especially in the face of size, posture changes, shadows and complex backgrounds, the detection accuracy is poor and the versatility is poor.
A wading target detection method based on the Swin-Transformer network is adopted. Through the combination of image segmentation, feature extraction, splicing and short-circuit connection fusion modules, the network is optimized to improve detection accuracy and versatility.
It achieves high-accuracy and high-versatility detection of wading targets from the perspective of drones, can adapt to various scenarios and targets, and improves the stability and effect of detection.
Smart Images

Figure CN120656080A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of water-related target detection, and in particular to a water-related target detection device, medium and product based on ST network. Background Art
[0002] At present, the main methods for detecting wading targets from the perspective of drones include the sliding window detection method, the HOG (Histogram of Oriented Gradient) + SVM (Support Vector Machine) method, and the color and texture analysis method. However, the sliding window detection method is not sensitive to the size and posture changes of wading targets, and is prone to missed detection or false detection, thereby affecting the detection accuracy of wading targets; the HOG + SVM method is easily disturbed by shadows and complex backgrounds, and is difficult to adapt to diverse targets, resulting in not only poor detection accuracy of wading targets but also poor versatility; the color and texture analysis method is difficult to adapt to changeable and complex targets, and also has the problems of poor detection accuracy and poor versatility of wading targets.
[0003] Therefore, how to simultaneously balance the detection accuracy and detection versatility of wading targets from the perspective of drones is a problem that needs to be solved urgently. Summary of the Invention
[0004] The main purpose of this application is to provide a water-related target detection method, device, equipment and readable storage medium based on the ST network, aiming to take into account both the detection accuracy and detection versatility of water-related targets from the perspective of a drone.
[0005] To achieve the above objectives, the present application provides a method for detecting wading targets based on an ST network, wherein the ST network is a Swin-Transformer network, and the Swin-Transformer network includes a newly inserted short-circuit connection fusion module. The method for detecting wading targets based on the ST network includes:
[0006] Performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmentation images;
[0007] Performing feature extraction on each of the wading target segmentation images to obtain a first feature set;
[0008] Performing graphic splicing processing on each feature in the first feature set to obtain a plurality of spliced graphics, and performing feature extraction on each of the spliced graphics to obtain a second feature set;
[0009] fusing the first feature set and the second feature set by the short-circuit connection fusion module to obtain a first feature graph;
[0010] Iteratively optimizing the Swin-Transformer network according to the first feature graph to obtain an optimized Swin-Transformer network;
[0011] The acquired regional image of the water-wading target area to be detected is input into the optimized Swin-Transformer network to obtain the detection result of the water-wading target area to be detected.
[0012] Optionally, the Swin-Transformer network further includes a newly inserted vertical and horizontal cross attention module, and the water target detection method based on the ST network further includes:
[0013] Performing feature dimensionality reduction processing on each of the water-wading target image training samples through the convolutional layer of the Swin-Transformer network to obtain multiple target dimensionality reduction images;
[0014] Extracting features associated with each of the target dimensionality reduction images from each of the long-range dependent features through the vertical and horizontal cross attention module to obtain a second feature map;
[0015] fusing the first feature map and the second feature map to obtain a target feature map;
[0016] According to the target feature map, the Swin-Transformer network is iteratively optimized to obtain an optimized Swin-Transformer network.
[0017] Optionally, the step of fusing the first feature map and the second feature map to obtain a target feature map includes:
[0018] Stacking the first feature map and the second feature map to obtain an initial feature map;
[0019] Regularization is performed on the initial feature map to obtain the target feature map.
[0020] Optionally, the ST network-based water-related target detection method further includes:
[0021] Selecting a wading target image training sample from each of the wading target image training samples as a preselected training sample;
[0022] Inputting the preselected training samples into the Swin-Transformer network to obtain prediction data of the preselected training samples;
[0023] According to the predicted data and the real data corresponding to the pre-selected training samples, the loss function of the Swin-Transformer network is constructed with the Focal-EioU loss function as the construction basis.
[0024] Optionally, the step of performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmented images includes:
[0025] Performing data enhancement processing on the acquired water-wading target image training samples to obtain water-wading target image training samples after data enhancement processing;
[0026] Image segmentation processing is performed on each water-wading target image training sample after data enhancement processing to obtain a plurality of water-wading target segmentation images.
[0027] Optionally, the step of performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmented images further includes:
[0028] Performing image scaling processing on each of the acquired water-wading target image training samples according to a preset image size to obtain each water-wading target image training sample after image scaling processing;
[0029] Image segmentation processing is performed on each wading target image training sample after image scaling processing to obtain a plurality of wading target segmentation images.
[0030] Optionally, the step of performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmented images includes:
[0031] Based on the acquired processing priority of each of the water-wading target image training samples, image segmentation processing is performed on each of the water-wading target image training samples in turn to obtain a plurality of water-wading target segmented images.
[0032] The present application also provides a water-wading target detection device based on an ST network, wherein the ST network is a Swin-Transformer network, and the Swin-Transformer network includes a newly inserted short-circuit connection fusion module. The water-wading target detection device based on the ST network includes:
[0033] An image segmentation module is used to perform image segmentation processing on each acquired wading target image training sample to obtain multiple wading target segmentation images;
[0034] A first feature extraction module is used to extract features from each of the wading target segmentation images to obtain a first feature set;
[0035] a second feature extraction module configured to perform graphic splicing processing on each feature in the first feature set to obtain a plurality of spliced graphics, and perform feature extraction on each of the spliced graphics to obtain a second feature set;
[0036] a feature fusion module, configured to fuse the first feature set and the second feature set through the short-circuit connection fusion module to obtain a first feature map;
[0037] an optimization module, configured to iteratively optimize the Swin-Transformer network according to the first feature map to obtain an optimized Swin-Transformer network;
[0038] The detection module is used to input the acquired regional image of the water-wading target area to be detected into the optimized Swin-Transformer network to obtain the detection result of the water-wading target area to be detected.
[0039] The present application also provides a water-related target detection device based on an ST network, which is a physical device. The water-related target detection device based on an ST network includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the water-related target detection method based on the ST network as described above.
[0040] The present application also provides a medium, which is a computer-readable storage medium, on which is stored a program for implementing a water-related target detection method based on an ST network. The program for implementing a water-related target detection method based on an ST network is executed by a processor to implement the steps of the water-related target detection method based on an ST network as described above.
[0041] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned ST network-based water target detection method.
[0042] The present application provides a water target detection method based on an ST network. The present application first performs image segmentation processing on each acquired water target image training sample to divide each water target image training sample into multiple small image units to obtain multiple water target segmentation images; then performs feature extraction on each water target segmentation image to obtain a first feature set composed of features extracted from each small image unit; then performs graphic splicing processing on each feature in the first feature set to splice and restore each feature in the first feature set into a whole to obtain multiple spliced graphics, and performs feature extraction on each spliced graphics to obtain a second feature set composed of features extracted from the feature whole; then, the first feature set and the second feature set are fused through a short-circuit connection fusion module to ensure the integrity of the features to obtain a first feature map; then, the Swin-Transformer network is iteratively optimized through the first feature map to obtain an optimized Swin-Transformer network; finally, the acquired regional image of the water target area to be detected is input into the optimized Swin-Transformer network to obtain a detection result of the water target area to be detected.
[0043] Therefore, since the present application utilizes the Swin-Transformer network to detect wading targets, and the Swin-Transformer network has good image recognition capabilities and can recognize the content of the input image, so as to analyze and detect the recognized image content, it is only necessary to obtain the regional image of the wading target to complete the detection of the wading target. Therefore, it can be seen that the wading target detection method provided by the present application can be applied to the detection of various wading targets and the detection of wading targets in various scenarios. In other words, the wading target detection method provided by the present application has high versatility. In addition, when the present application iteratively optimizes the Swin-Transformer network through the wading target image training sample, it not only extracts the features of the small image unit, but also extracts the features of the spliced graph obtained by splicing the features of the small image units, that is, the features of the entire feature, and fuses the extracted features through the short-circuit connection fusion module to ensure that there are more and more complete features in the wading target image training sample for iterative optimization of the Swin-Transformer network, thereby improving the accuracy of the optimized Swin-Transformer network for wading target detection.
[0044] In summary, the water-related target detection method provided in this application can simultaneously take into account the detection accuracy and detection versatility of water-related targets from the perspective of a drone. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 A flow chart of the first embodiment of the water-related target detection method based on the ST network of the present application is provided;
[0048] Figure 2 A flow chart of the second embodiment of the water-related target detection method based on the ST network of this application is provided;
[0049] Figure 3 A schematic diagram of the training process of the Swin-Transformer network provided in Example 2 of the present application;
[0050] Figure 4 This is a schematic diagram of the module structure of the ST network-based water-related target detection device according to an embodiment of the present application;
[0051] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the water-related target detection method based on the ST network in the embodiment of the present application.
[0052] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] To make the above-mentioned purposes, features, and advantages of this application more clearly understood, the technical solutions of this application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of this application, not all of them. Based on the embodiments of this application, all other embodiments obtained by persons of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0054] Example 1
[0055] Water-related targets refer to specific goals set in water resource management, flood control, and drainage. These targets are typically used to improve urban and rural flood control and drainage capabilities, thereby reducing the loss of life and property caused by flood disasters. They also aim to ensure the sustainable use of water resources and promote their rational development and protection.
[0056] At present, the main methods for detecting wading targets from the perspective of drones include sliding window detection method, HOG (Histogram of Oriented Gradient) + SVM (Support Vector Machine) method, and color and texture analysis method.
[0057] Among them, the sliding window detection method is to slide a window on the image and then use a classifier at each window position to detect wading targets. However, the sliding window detection method requires enumerating a large number of window positions and sizes, the detection cost is high, and it is not sensitive to the size and posture changes of wading targets, and is prone to missed detection or false detection, thereby affecting the detection accuracy of wading targets; the HOG+SVM method is to use HOG to describe the local gradient direction information of the image, and then use the SVM classifier to detect wading targets. However, the HOG+SVM method is easily disturbed by shadows and complex backgrounds, and is difficult to adapt to diverse targets. Therefore, not only is the detection accuracy of wading targets poor, but the versatility is also poor; the color and texture analysis method is to detect wading targets through color and texture information (such as color histogram or texture features). However, the color and texture analysis method is difficult to adapt to changeable and complex targets, and also has the problems of poor detection accuracy and poor versatility of wading targets.
[0058] Therefore, how to simultaneously balance the detection accuracy and detection versatility of wading targets from the perspective of drones is a problem that needs to be solved urgently.
[0059] The Swin-Transformer network is a deep learning model based on the Transformer structure, which has good computational efficiency and feature extraction capabilities.
[0060] Based on this, this application proposes a first embodiment of a water-related target detection method based on an ST network, please refer to Figure 1 The ST network is a Swin-Transformer network, and the Swin-Transformer network includes a newly inserted short-circuit connection fusion module. The water target detection method based on the ST network includes steps S10 to S60:
[0061] Step S10, performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmentation images;
[0062] It should be noted that performing image segmentation processing on the water-wading target image training samples essentially involves segmenting the water-wading target image training samples from a single image into multiple small image units. When performing image segmentation processing on each water-wading target image training sample, each water-wading target image training sample can be input into the image segmentation layer of the Swin-Transformer network to implement image segmentation processing on each water-wading target image training sample through the image segmentation layer of the Swin-Transformer network. Alternatively, the image segmentation module in a local setting (i.e., a water-wading target detection device based on an ST network) can be used to perform image segmentation processing on each water-wading target image training sample. This embodiment does not specifically limit this.
[0063] In a feasible implementation, step S10 may include step S11:
[0064] Step S11 : performing image segmentation processing on each of the water-wading target image training samples based on the acquired processing priority of each of the water-wading target image training samples, to obtain a plurality of water-wading target segmented images.
[0065] It should be noted that the processing priority is used to characterize the processing priority of the water target image training samples when performing corresponding data processing. The size of the processing priority of the water target image training samples is related to the batch size of the water target image training samples. The larger the batch of the water target image training samples, the greater the processing priority, and vice versa.
[0066] It is understandable that due to the limited computing resources of the Swin-Transformer network, if a large number of wading target image training samples need to be processed at one time, the memory limit of the Swin-Transformer network may be exceeded, resulting in the Swin-Transformer network being unable to train normally, and the gradient of the Swin-Transformer network may also disappear or explode during the back propagation process, thereby affecting the stability of the Swin-Transformer network and the final training effect. Therefore, this embodiment realizes image segmentation processing of each wading target image training sample in sequence according to the processing priority of each wading target image training sample, thereby avoiding the impact of image segmentation processing of each wading target image training sample on the Swin-Transformer network at the same time, which not only ensures the normal training of the Swin-Transformer network, but also ensures the stability of the Swin-Transformer network and the final training effect.
[0067] In other implementations of step S10, if there is no processing priority for each wading target image training sample, the image segmentation processing may be performed on the wading target image training samples in order of their sample sizes.
[0068] The above are only two implementation methods of step S10 provided in this embodiment, and this embodiment does not specifically limit the specific implementation method of step S10.
[0069] Step S20, performing feature extraction on each of the wading target segmentation images to obtain a first feature set;
[0070] It should be noted that the first feature set is composed of features extracted from the segmented images of each wading target.
[0071] In a feasible implementation, the Block module of the Swin-Transformer network can be used to perform feature extraction on each wading target segmentation image to obtain a first feature set.
[0072] It should be noted that the Block module of the Swin-Transformer network is a multi-head self-attention module for feature conversion and information extraction. To ensure that the Block module can extract features from each wading target segmentation image, each wading target segmentation image can be first input into the linear embedding layer of the Swin-Transformer network, so that each wading target segmentation image can be projected into any dimension (usually a smaller dimension) through the linear embedding layer, and then the projected wading target segmentation image can be input into the Block module for feature extraction.
[0073] Additionally, it should be noted that the Block module may include only one feature extraction unit or multiple feature extraction units, and this embodiment does not specifically limit this. When the Block module includes multiple feature extraction units, multiple feature extractions are required for the same wading target segmentation image. It is understood that the more feature extraction units a Block module includes, the better the features ultimately extracted from the wading target segmentation image, and thus the ultimately trained Swin-Transformer network will have greater accuracy in detecting wading modules.
[0074] For example, to facilitate understanding of the extraction principle of features for each wading target segmentation image when the Block module includes multiple extraction units, taking the Block module including two feature extraction units as an example, the first feature extraction unit will perform the following operations:
[0075] Z1=x”+W_MSA(LN(x”))+MLP(LN(X+W_MSA(LN(x”))))
[0076] Among them, LN represents the normalization operation, W_MSA represents the window multi-head self-attention operation in the first feature extraction unit, MLP represents the multi-layer perceptron, Z1 represents the features extracted from the wading target segmentation image for the first time, and x represents the wading target segmentation image.
[0077] The second feature extraction unit will perform the following operations:
[0078] Z2=Z1+SW_MSA(LN(Z1))+MLP(LN(Z1+SW_MSA(LN(Z1))))
[0079] Among them, LN represents the normalization operation, SW_MSA represents the window multi-head self-attention operation in the second feature extraction unit, MLP represents the multi-layer perceptron, Z1 represents the features extracted from the wading target segmentation image for the first time, and Z2 represents the features further extracted from the features extracted for the first time.
[0080] Step S30, performing graphic splicing processing on each feature in the first feature set to obtain a plurality of spliced graphics, and performing feature extraction on each of the spliced graphics to obtain a second feature set;
[0081] It should be noted that performing graph stitching on each feature in the first feature set essentially restores each small image unit into a single image. When performing graph stitching on each feature in the first feature set, the first feature set can be input into the graph stitching layer of the Swin-Transformer network. This graph stitching layer modifies the feature graph size and dimensions of each feature in the first feature set, resulting in multiple stitched graphs. The second feature set is composed of features extracted from each stitched graph.
[0082] In a feasible implementation, the features of each spliced graphic may be extracted using a Block module of a Swin-Transformer network to obtain a second feature set.
[0083] Step S40, fusing the first feature set and the second feature set by the short-circuit connection fusion module to obtain a first feature graph;
[0084] It should be noted that the short-circuit connection fusion module is a physical device, for example, it can be a laptop computer, tablet computer, drone terminal, etc. that carries a device for performing feature fusion function, or it can be an integrated circuit, chip, etc. that can realize the feature fusion function, and this embodiment does not limit this. The short-circuit connection fusion module is connected to the Block module of the Swin-Transformer network. The short-circuit connection fusion module can include only one feature fusion unit or multiple feature fusion units. This embodiment does not specifically limit this. It can be understood that the more feature fusion units the short-circuit connection fusion module contains, the more it can ensure that there will be no loss of features in the process of fusing the first feature set and the second feature set, so as to ensure the feature integrity of the first feature map.
[0085] For example, in order to facilitate understanding of the fusion process of the first feature set and the second feature set when the short-circuit connection fusion module includes multiple feature fusion units, taking the short-circuit connection fusion module including three feature fusion units as an example, the first feature fusion unit will output after fusing the first feature set and the second feature set. It is given to the second feature fusion unit, and to the next graphics splicing layer and Block module to obtain the third feature set, where Represents the fusion result, f represents the downsampling operation, Z2 represents the first feature set, and Z4 represents the second feature set; then the second feature fusion unit will fuse the fusion result output by the first feature fusion unit Combined with the third feature set, the fusion result is obtained The fusion result will be It is given to the third feature fusion unit, and to the next graphic splicing layer and Block module to obtain the fourth feature set; then the third feature fusion unit will fuse the fusion results output by the second feature fusion unit With the four feature sets, the fusion result is obtained And the fusion result As the first feature map.
[0086] Step S50, iteratively optimizing the Swin-Transformer network according to the first feature map to obtain an optimized Swin-Transformer network;
[0087] Step S60: input the acquired regional image of the water-wading target area to be detected into the optimized Swin-Transformer network to obtain a detection result of the water-wading target area to be detected.
[0088] It can be understood that after the regional image of the water-related target area to be detected is input into the optimized Swin-Transformer network, the optimized Swin-Transformer network will first extract the features in the regional graphics, and then analyze the scene to which the water-related target area belongs from the extracted features, such as a scene with turbulent water flow, a scene with turbid water quality, a scene with a large underwater depth, etc., and then map the features extracted from the regional image in the database associated with the scene to obtain the detection result of the water-related target area to be detected.
[0089] This embodiment provides a method for detecting wading targets based on an ST network. In this embodiment, image segmentation processing is first performed on each acquired wading target image training sample to divide each wading target image training sample into multiple small image units to obtain multiple wading target segmented images; then, feature extraction is performed on each wading target segmented image to obtain a first feature set consisting of features extracted from each small image unit; then, graph splicing processing is performed on each feature in the first feature set to splice and restore each feature in the first feature set into a whole to obtain multiple spliced graphs, and feature extraction is performed on each spliced graph to obtain a second feature set consisting of features extracted from the feature whole; then, the first feature set and the second feature set are fused through a short-circuit connection fusion module to ensure feature integrity to obtain a first feature map; then, the Swin-Transformer network is iteratively optimized using the first feature map to obtain an optimized Swin-Transformer network; finally, the acquired regional image of the wading target area to be detected is input into the optimized Swin-Transformer network to obtain a detection result of the wading target area to be detected.
[0090] Therefore, since this embodiment utilizes the Swin-Transformer network to detect wading targets, and the Swin-Transformer network has excellent image recognition capabilities and can identify the content of the input image to analyze and detect the identified image content, it is only necessary to obtain the image of the area where the wading target is to be detected to complete the detection of the wading target. Therefore, it can be seen that the wading target detection method provided by this embodiment is applicable to the detection of various wading targets and wading targets in various scenarios. In other words, the wading target detection method provided by this embodiment has high versatility. In addition, when iteratively optimizing the Swin-Transformer network using wading target image training samples, this embodiment not only extracts features of small image units, but also extracts features of the spliced graph obtained by splicing the features of the small image units, that is, the features of the entire feature set. The extracted features are then fused through a short-circuit connection fusion module to ensure that the wading target image training samples have more and more complete features for iterative optimization of the Swin-Transformer network, thereby improving the accuracy of the optimized Swin-Transformer network for wading target detection.
[0091] In summary, the water-related target detection method provided in this embodiment can simultaneously take into account the detection accuracy and detection versatility of water-related targets from the perspective of a drone.
[0092] In a feasible implementation, step S10 may include steps A11 to A12:
[0093] Step A11, performing data enhancement processing on the acquired water-wading target image training samples to obtain water-wading target image training samples after data enhancement processing;
[0094] It should be noted that the data enhancement processing may be Mosaic data enhancement, CutMix data enhancement, etc.
[0095] As an example, when the data enhancement processing is Mosaic data enhancement, step A11 may include: randomly selecting a preset number of water-wading target image training samples from each water-wading target image training sample as pre-selected samples, and then splicing the selected pre-selected samples in a random scaling, random cropping, and random arrangement manner, and continuously repeating the above operations until all water-wading target image training samples are traversed, so as to achieve Mosaic data enhancement of each water-wading target image training sample.
[0096] Step A12: performing image segmentation processing on each water-wading target image training sample after data enhancement processing to obtain a plurality of water-wading target segmentation images.
[0097] This embodiment performs data augmentation processing on the training samples of wading target images to enrich the diversity of the training data subsequently input into the Swin-Transformer network. The Swin-Transformer network optimized based on this training data can identify wading targets in a smaller range, thereby improving the generalization ability of the Swin-Transformer network.
[0098] In another feasible implementation, step S10 may include steps B11 to B12:
[0099] Step B11, performing image scaling processing on each of the acquired wading target image training samples according to a preset image size to obtain each wading target image training sample after image scaling processing;
[0100] Step B12: performing image segmentation processing on each wading target image training sample after image scaling processing to obtain a plurality of wading target segmentation images.
[0101] This embodiment performs image scaling processing on the water target image training samples according to a preset image size, so that the image size of each water target image training sample is scaled to the preset image size, so that the water target image training samples with a unified image size are subsequently input into the Swin-Transformer network for training, which will help maintain consistency in the training process and make it easier for the Swin-Transformer network to learn the features in the image. In addition, when the Swin-Transformer network processes image data, its internal structure and parameters are designed based on a specific input size. Therefore, if the image size of the input image is inconsistent, the Swin-Transformer network may encounter a structural mismatch problem during processing, which will cause the Swin-Transformer network to be unable to correctly extract and transform the features of the input image. Therefore, this embodiment also helps to ensure that the Swin-Transformer network can correctly extract and transform the features of each water target image training sample by unifying the image size of each water target image training sample input into the Swin-Transformer network.
[0102] The above are only two implementation methods of step S10 provided in this embodiment, and this embodiment does not specifically limit the specific implementation method of step S10.
[0103] Example 2
[0104] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 2 The Swin-Transformer network further includes a newly inserted vertical and horizontal cross attention module, and the water target detection method based on the ST network further includes steps E10 to E40:
[0105] Step E10, performing feature dimensionality reduction processing on each of the water-wading target image training samples through the convolutional layer of the Swin-Transformer network to obtain a plurality of target dimensionality reduction images;
[0106] In one feasible embodiment, step E10 may include: performing feature dimensionality reduction processing on each water-wading target image training sample in sequence based on the processing priority of each water-wading target image training sample through the convolutional layer of the Swin-Transformer network, thereby obtaining multiple target reduced-dimensional images. This embodiment performs feature dimensionality reduction processing on each water-wading target image training sample in sequence according to the processing priority of each water-wading target image training sample, thereby avoiding the impact of performing feature dimensionality reduction processing on each water-wading target image training sample simultaneously on the Swin-Transformer network. This not only ensures that the Swin-Transformer network can be trained normally, but also guarantees the stability of the Swin-Transformer network and the ultimate training effect.
[0107] In other implementations of step E10, if there is no processing priority for each wading target image training sample, feature dimensionality reduction processing may be performed on the wading target image training samples in order of their sample sizes.
[0108] The above are merely two implementation methods of step E10 provided in this embodiment, and this embodiment does not specifically limit the specific implementation method of step E10.
[0109] Step E20, extracting features associated with each of the target dimensionality reduction images from each of the long-range dependent features through the vertical and horizontal cross attention module to obtain a second feature map;
[0110] It should be noted that extracting features associated with each target dimensionality reduction image from each feature of remote dependency is essentially capturing the context information of each target dimensionality reduction image from each feature of remote dependency. The vertical and horizontal cross attention module is a physical device, for example, it can be a laptop computer, tablet computer, drone terminal, etc. that carries a function for capturing context information from remote dependency, or it can be an integrated circuit, chip, etc. that can realize the function of capturing context information from remote dependency, and this embodiment does not limit this. The vertical and horizontal cross attention module can include only one remote dependency capture unit, or it can include multiple remote dependency capture units, and this embodiment does not specifically limit this. It can be understood that the more remote dependency capture units the vertical and horizontal cross attention module contains, the more context information of each target dimensionality reduction image will be captured from each feature of remote dependency, and thus the accuracy of the Swin-Transformer network trained in the end for detecting the wading module will be better.
[0111] Exemplarily, to facilitate understanding of the process of extracting features associated with each target reduced dimensionality image from each feature of the remote dependency when the vertical and horizontal cross-attention module includes multiple remote dependency capture units, taking the vertical and horizontal cross-attention module including two remote dependency capture units as an example, after the first remote dependency capture unit extracts the feature H1 associated with each target reduced dimensionality image from each feature of the remote dependency, the extracted feature H1 is first input into the second remote dependency capture unit, and then the second remote dependency capture unit extracts the feature H2 associated with each feature H1 from each feature of the remote dependency, and combines each feature H2 to obtain a second feature map.
[0112] Step E30: fusing the first feature map and the second feature map to obtain a target feature map;
[0113] In a feasible implementation, step E30 may include steps E31 to E32:
[0114] Step E31: stacking the first feature map and the second feature map to obtain an initial feature map;
[0115] Step E32: performing regularization processing on the initial feature map to obtain the target feature map.
[0116] It should be noted that regularizing the initial feature map essentially means using the Dropout regularization method to randomly discard some neurons in the initial feature map to prevent overfitting of the final optimized Swin-Transformer network and enhance the generalization ability of the Swin-Transformer network. The specific formula of the Dropout regularization method is as follows:
[0117]
[0118] Among them, F represents the target feature map, represents the first feature map, and H" represents the second feature map.
[0119] Step E40: Iteratively optimize the Swin-Transformer network according to the target feature map to obtain an optimized Swin-Transformer network.
[0120] This embodiment inserts a vertical and horizontal cross-attention module into the Swin-Transformer network to aggregate the horizontal and vertical information of each wading target image training sample through the vertical and horizontal cross-attention module, thereby capturing features associated with each wading target image training sample from long-range dependencies, thereby obtaining more features for iterative optimization of the Swin-Transformer network. It can be seen that this embodiment can further ensure that there are more and more complete features in the wading target image training samples on the basis of the first embodiment to iteratively optimize the Swin-Transformer network, thereby further improving the accuracy of the optimized Swin-Transformer network for wading target detection.
[0121] For example, to help understand the actual training process of the Swin-Transformer network of this application, please refer to Figure 3 , as follows:
[0122] 1. Obtain a dataset of wading target images from the perspective of a drone and divide it into a training sample set of wading target images and a test sample set of wading target images:
[0123] First, the high-definition camera carried by the drone is used to continuously shoot the target detection area multiple times to obtain multiple images of the target detection area; then, from these images, several images with clear and non-single features are selected as initial images; then, according to actual needs, the LabelImg tool is used to label the objects to be detected in each initial image to obtain each target image, and the target images are combined to obtain a wading target image dataset; finally, the wading target image dataset is divided according to a preset ratio (for example, a ratio of 8:2) to obtain a wading target image training sample set and a wading target image test sample set.
[0124] 2. Preprocess each wading target image training sample in the wading target image training sample set:
[0125] First, Mosaic data enhancement is performed on each water target image training sample in the water target image training sample set. After the Mosaic data enhancement is completed, adaptive image scaling is performed on each water target image training sample to uniformly scale the image size of each water target image training sample to a standard size.
[0126] 3. Train the Swin-Transformer network based on the preprocessed wading target image training sample set to obtain the weight file of the Swin-Transformer network;
[0127] For the specific process of this step, please refer to the above-mentioned Example 1 and Example 2. After the wading target image training sample set is processed by the above-mentioned Example 1 and Example 2, a target feature map that integrates the first feature map and the second feature map can be obtained. The Swin-Transformer network can obtain the corresponding weight file by mapping the target feature map.
[0128] 4. Use the weight file to detect the water-related target image test sample set and obtain the water-related target detection results. The water-related target detection results record the difference between the real data and the predicted data of the Swin-Transformer network. If the difference is large, repeat steps 3 and 4. If the difference is small, output the iteratively optimized Swin-Transformer network.
[0129] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the water-related target detection method based on the ST network of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0130] To facilitate understanding of the technical principle of the present application's improved Swin-Transformer network for improving the accuracy of detecting wading targets from a drone's perspective, let's take the detection of wading targets in a turbulent water flow scenario as an example. In this scenario, the turbulent water flow causes the target's position to change rapidly, making it difficult to stably capture and track the target. At this time, the noise and interference signals generated by the water flow may also affect the drone. However, when extracting features from the image of the scene captured by the drone using the improved Swin-Transformer network, the present application not only meticulously extracts the features of each small image unit in the image to analyze whether the scene in which the wading target is located has a turbulent water flow problem, but also aggregates and captures information in the horizontal and vertical directions of the image through the newly added vertical and horizontal cross-attention module to analyze whether the scene in which the wading target is located has a problem of interfering with the drone. Moreover, the present application also fuses all the extracted features through the newly added short-circuit connection fusion module, so that the drone can fully consider various factors affecting the detection of wading targets in the turbulent water flow scenario when finally detecting the wading target, thereby obtaining a highly accurate wading target detection result. From this, it can be seen that the essence of this application is to analyze the various influencing factors existing in the water-related target area to be detected, so as to reduce or even avoid the influence of various influencing factors on the final water-related target detection results, thereby improving the detection accuracy of water-related targets from the perspective of the drone.
[0131] Example 3
[0132] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments can be referred to above and will not be described in detail. On this basis, the water-related target detection method based on the ST network further includes steps S70 to S90:
[0133] Step S70, selecting a wading target image training sample from each of the wading target image training samples as a preselected training sample;
[0134] Step S80, inputting the preselected training samples into the Swin-Transformer network to obtain prediction data of the preselected training samples;
[0135] It should be noted that the predicted data includes the boundary width, height, center point position, etc. of the wading target detected from the pre-selected training samples through the Swin-Transformer network.
[0136] Step S90: constructing a loss function of the Swin-Transformer network based on the predicted data and the real data corresponding to the pre-selected training samples and taking the Focal-EioU loss function as a construction basis.
[0137] It should be noted that the real data includes the actual boundary width, height, center point position, etc. of the wading targets in the pre-selected training samples. The Focal-EioU loss function is a bounding box regression loss function used in target detection tasks. The Focal-EioU loss function can be specifically expressed as:
[0138] L Focal-EloU =IOU Y L EIoU
[0139] Among them, IoU stands for intersection over union, which is used to measure the degree of overlap between the predicted bounding box or segmentation result and the true bounding box; γ is a hyperparameter used to control the curvature of the curve. EIoU By IOU loss (L IoU ), distance loss (L dis ) and width loss (L asp ) These three parts can be specifically expressed as:
[0140]
[0141] Among them, ω represents the width of the predicted bounding box, h represents the height of the predicted bounding box, ω gt represents the width of the ground-truth bounding box, h gt The height of the ground-truth bounding box, w c Indicates the width of the minimum bounding rectangle of the predicted bounding box and the true bounding box, h c represents the height of the minimum bounding rectangle between the predicted bounding box and the true bounding box, b represents the center point of the predicted bounding box, and b gt represents the center point of the true bounding box, and ρ represents the Euclidean distance between the center point of the predicted bounding box and the center point of the true bounding box.
[0142] In this embodiment, since the Focal-EioU loss function itself has the advantage of being able to reduce the weight of difficult samples, this embodiment can better optimize the training effect of the Swin-Transformer network by constructing a Focal-EioU form of loss function for the Swin-Transformer network, thereby improving the Swin-Transformer network's detection ability for small targets and occluded targets. In addition, since the Focal-EioU loss function directly uses the side length of the predicted bounding box as a penalty term, this can also improve the convergence speed of the Swin-Transformer network to a certain extent, thereby improving the training efficiency of the Swin-Transformer network.
[0143] Example 4
[0144] The present application also provides a water-related target detection device based on an ST network, wherein the ST network is a Swin-Transformer network, and the Swin-Transformer network includes a newly inserted short-circuit connection fusion module. Figure 4 , the water-related target detection device based on the ST network includes:
[0145] An image segmentation module 10 is used to perform image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmentation images;
[0146] A first feature extraction module 20 is used to extract features from each of the wading target segmentation images to obtain a first feature set;
[0147] A second feature extraction module 30 is configured to perform a graphic splicing process on each feature in the first feature set to obtain a plurality of spliced graphics, and perform feature extraction on each of the spliced graphics to obtain a second feature set;
[0148] a feature fusion module 40, configured to fuse the first feature set and the second feature set through the short-circuit connection fusion module to obtain a first feature map;
[0149] an optimization module 50, configured to iteratively optimize the Swin-Transformer network according to the first feature map to obtain an optimized Swin-Transformer network;
[0150] The detection module 60 is used to input the acquired regional image of the water-wading target area to be detected into the optimized Swin-Transformer network to obtain the detection result of the water-wading target area to be detected.
[0151] Optionally, the Swin-Transformer network further includes a newly inserted vertical and horizontal cross attention module, and the ST network-based wading target detection device further includes:
[0152] Performing feature dimensionality reduction processing on each of the water-wading target image training samples through the convolutional layer of the Swin-Transformer network to obtain multiple target dimensionality reduction images;
[0153] Extracting features associated with each of the target dimensionality reduction images from each of the long-range dependent features through the vertical and horizontal cross attention module to obtain a second feature map;
[0154] fusing the first feature map and the second feature map to obtain a target feature map;
[0155] According to the target feature map, the Swin-Transformer network is iteratively optimized to obtain an optimized Swin-Transformer network.
[0156] Optionally, the ST network-based water-related target detection device further includes:
[0157] Stacking the first feature map and the second feature map to obtain an initial feature map;
[0158] Regularization is performed on the initial feature map to obtain the target feature map.
[0159] Optionally, the ST network-based water-related target detection device further includes:
[0160] Selecting a wading target image training sample from each of the wading target image training samples as a preselected training sample;
[0161] Inputting the preselected training samples into the Swin-Transformer network to obtain prediction data of the preselected training samples;
[0162] According to the predicted data and the real data corresponding to the pre-selected training samples, the loss function of the Swin-Transformer network is constructed with the Focal-EioU loss function as the construction basis.
[0163] Optionally, the image segmentation module 10 is further configured to:
[0164] Performing data enhancement processing on the acquired water-wading target image training samples to obtain water-wading target image training samples after data enhancement processing;
[0165] Image segmentation processing is performed on each water-wading target image training sample after data enhancement processing to obtain a plurality of water-wading target segmentation images.
[0166] Optionally, the image segmentation module 10 is further configured to:
[0167] Performing image scaling processing on each of the acquired water-wading target image training samples according to a preset image size to obtain each water-wading target image training sample after image scaling processing;
[0168] Image segmentation processing is performed on each wading target image training sample after image scaling processing to obtain a plurality of wading target segmentation images.
[0169] Optionally, the image segmentation module 10 is further configured to:
[0170] Based on the acquired processing priority of each of the water-wading target image training samples, image segmentation processing is performed on each of the water-wading target image training samples in turn to obtain a plurality of water-wading target segmented images.
[0171] The ST-network-based water-based target detection device provided in this application utilizes the ST-network-based water-based target detection method of the aforementioned embodiment, and is capable of simultaneously taking into account both the accuracy and versatility of detecting water-based targets from the perspective of a drone. Compared to the prior art, the ST-network-based water-based target detection device provided in this application has the same beneficial effects as the ST-network-based water-based target detection method provided in the aforementioned embodiment, and the other technical features of the ST-network-based water-based target detection device are the same as those disclosed in the aforementioned embodiment method, and are not further elaborated here.
[0172] Example 5
[0173] The present application provides a water-related target detection device based on an ST network, and the water-related target detection device based on an ST network includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the water-related target detection method based on the ST network in the above-mentioned embodiment one.
[0174] Reference below Figure 5, which shows a schematic diagram of the structure of a water-related target detection device based on an ST network suitable for implementing the embodiments of the present disclosure. The water-related target detection device based on an ST network in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The ST network-based wading target detection device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0175] like Figure 5 As shown, the ST network-based wading target detection device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM) 1004. Various programs and data required for the operation of the ST network-based wading target detection device are also stored in the RAM 1004. The processing device 1001, ROM 1002 and RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, hard disk, etc.; and communication devices 1009. The communication devices 1009 can allow the ST network-based water-borne target detection device to communicate with other devices wirelessly or by wire to exchange data. Although the ST network-based water-borne target detection device with various systems is shown in the figure, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have alternatively.
[0176] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0177] The ST network-based water target detection device provided in this application adopts the ST network-based water target detection method in the above-mentioned embodiment, and can simultaneously take into account the detection accuracy and detection versatility of water targets from the perspective of a drone. Compared with the existing technology, the beneficial effects of the ST network-based water target detection device provided in this application are the same as the beneficial effects of the ST network-based water target detection method provided in the above-mentioned embodiment, and the other technical features of the ST network-based water target detection device are the same as those disclosed in the method of the previous embodiment, and are not further described here.
[0178] It should be understood that various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in an appropriate manner.
[0179] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0180] Example 6
[0181] The present application provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the water-related target detection method based on the ST network in the above embodiment.
[0182] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0183] The computer-readable storage medium may be included in the water-related target detection device based on the ST network; or may exist independently without being assembled into the water-related target detection device based on the ST network.
[0184] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the water-wading target detection device based on the ST network, the water-wading target detection device based on the ST network: performs image segmentation processing on each acquired water-wading target image training sample to obtain multiple water-wading target segmentation images; performs feature extraction on each of the water-wading target segmentation images to obtain a first feature set; performs graphic splicing processing on each feature in the first feature set to obtain multiple spliced graphics, and performs feature extraction on each of the spliced graphics to obtain a second feature set; fuses the first feature set and the second feature set through the short-circuit connection fusion module to obtain a first feature map; iteratively optimizes the Swin-Transformer network according to the first feature map to obtain an optimized Swin-Transformer network; inputs the acquired regional image of the water-wading target area to be detected into the optimized Swin-Transformer network to obtain the detection result of the water-wading target area to be detected.
[0185] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0186] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0187] The modules involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0188] The computer-readable storage medium provided in this application is a computer-readable storage medium storing computer-readable program instructions for executing the aforementioned ST-network-based water-based target detection method. This computer-readable storage medium is capable of simultaneously balancing the accuracy and versatility of detecting water-based targets from a drone's perspective. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the ST-network-based water-based target detection method provided in the aforementioned embodiments, and are not further elaborated here.
[0189] Example 7
[0190] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned ST network-based water target detection method.
[0191] The computer program product provided in this application can simultaneously take into account the accuracy and versatility of detecting wading targets from the perspective of a drone. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the wading target detection method based on the ST network provided in the above embodiment, and will not be repeated here.
[0192] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A method for detecting wading targets based on ST network, characterized in that: The ST network is a Swin-Transformer network, and the Swin-Transformer network includes a newly inserted short-circuit connection fusion module. The water-related target detection method based on the ST network includes: Performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmentation images; Performing feature extraction on each of the wading target segmentation images to obtain a first feature set; Performing graphic splicing processing on each feature in the first feature set to obtain a plurality of spliced graphics, and performing feature extraction on each of the spliced graphics to obtain a second feature set; fusing the first feature set and the second feature set by the short-circuit connection fusion module to obtain a first feature graph; Iteratively optimizing the Swin-Transformer network according to the first feature graph to obtain an optimized Swin-Transformer network; The acquired regional image of the water-wading target area to be detected is input into the optimized Swin-Transformer network to obtain the detection result of the water-wading target area to be detected.
2. The water-related target detection method based on ST network according to claim 1, characterized in that: The Swin-Transformer network also includes a newly inserted vertical and horizontal cross attention module, and the water target detection method based on the ST network also includes: Performing feature dimensionality reduction processing on each of the water-wading target image training samples through the convolutional layer of the Swin-Transformer network to obtain multiple target dimensionality reduction images; Extracting features associated with each of the target dimensionality reduction images from each of the long-range dependent features through the vertical and horizontal cross attention module to obtain a second feature map; fusing the first feature map and the second feature map to obtain a target feature map; According to the target feature map, the Swin-Transformer network is iteratively optimized to obtain an optimized Swin-Transformer network.
3. The water-related target detection method based on ST network according to claim 2, characterized in that: The step of fusing the first feature map and the second feature map to obtain a target feature map includes: Stacking the first feature map and the second feature map to obtain an initial feature map; Regularization is performed on the initial feature map to obtain the target feature map.
4. The method for detecting wading targets based on an ST network according to claim 1 , further comprising: Selecting a wading target image training sample from each of the wading target image training samples as a preselected training sample; Inputting the preselected training samples into the Swin-Transformer network to obtain prediction data of the preselected training samples; According to the predicted data and the real data corresponding to the pre-selected training samples, the loss function of the Swin-Transformer network is constructed with the Focal-EioU loss function as the construction basis.
5. The method for detecting wading targets based on an ST network according to any one of claims 1 to 4, characterized in that: The step of performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmented images includes: Performing data enhancement processing on the acquired water-wading target image training samples to obtain water-wading target image training samples after data enhancement processing; Image segmentation processing is performed on each water-wading target image training sample after data enhancement processing to obtain a plurality of water-wading target segmentation images.
6. The method for detecting wading targets based on an ST network according to any one of claims 1 to 4, characterized in that: The step of performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmented images further includes: Performing image scaling processing on each of the acquired water-wading target image training samples according to a preset image size to obtain each water-wading target image training sample after image scaling processing; Image segmentation processing is performed on each wading target image training sample after image scaling processing to obtain a plurality of wading target segmentation images.
7. The method for detecting wading targets based on an ST network according to any one of claims 1 to 4, characterized in that: The step of performing image segmentation processing on each acquired wading target image training sample to obtain a plurality of wading target segmented images includes: Based on the acquired processing priority of each of the water-wading target image training samples, image segmentation processing is performed on each of the water-wading target image training samples in turn to obtain a plurality of water-wading target segmented images.
8. A water-related target detection device based on ST network, characterized in that: The water-related target detection device based on the ST network includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the water-wading target detection method based on the ST network according to any one of claims 1 to 7.
9. A medium, characterized in that The medium is a computer-readable storage medium, on which is stored a program for implementing the water-related target detection method based on the ST network. The program for implementing the water-related target detection method based on the ST network is executed by a processor to implement the steps of the water-related target detection method based on the ST network as described in any one of claims 1 to 7.
10. A product, characterized in that The product is a computer program product, which includes a computer program, and is characterized in that when the computer program is executed by a processor, it implements the steps of the water-related target detection method based on the ST network as described in any one of claims 1 to 7.