A method and system for judging the threat level of water targets
By combining the image preprocessing of water scene video data and the threat discrimination model, optical flow and semantic information are used to rank threats, which solves the problems of high equipment cost and low accuracy in the existing technology, and achieves efficient and accurate Determination of threat degree of water targets.
Patent Information
- Application Number
- CN202210834886.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-07-15
AI Technical Summary
Existing water target identification and threat judgment methods rely on multiple sensors, resulting in high equipment costs, complex calculations, and low accuracy. The semantic information obtained by visual sensors is insufficient to determine the threat level, especially in the processing of multi-target spatio-temporal information.
A water target threat discrimination method is adopted. Image preprocessing is performed by obtaining water scene video data. The optical flow extraction module, spatial saliency ranking module and threat discrimination module are used to perform threat ranking, and a multi-layer optical flow network and semantics are combined. Extract the network, attention structure and target-semantics-target association module to achieve threat discrimination of water targets and reduce detection costs and computational complexity.
It can achieve threat determination of water targets without the need for multi-sensor data, significantly reducing detection costs and computational complexity, improving computational accuracy, and more accurately considering the target's speed, displacement and semantic information, in line with human sensory threat determination.
Smart Images

Figure CN115082833B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for determining the threat level of a water target. Background Art
[0002] Threat level identification has important uses in various fields. In the field of unmanned watercraft, unmanned boats are widely used to perform dangerous tasks in unmanned environments. The current visual processing tasks of unmanned boats are mainly aimed at exploration tasks, so two-dimensional target detection algorithms are often used to identify visual targets. However, the current traditional methods of water target recognition and threat level judgment need to rely on multiple sensors, using navigation radars, lidars, optoelectronic cameras, etc. to conduct comprehensive measurements of marine targets, such as offshore reefs, fishing boats on the water, and enemy ships at sea, to generate accurate information about the targets in the field of view, including target category, target distance, target height, target route, target speed, etc. After comprehensive consideration of these factors, the target threat level is calculated using formulas and mathematical algorithms.
[0003] With the in-depth development of deep learning technology, the commonly used method is to use optoelectronic cameras to photograph water targets, and then use a neural network-based target detection algorithm to analyze the image in the field of view. The target category and distance information obtained by monocular ranging can be obtained. After that, the information obtained by other sensors can be used to comprehensively judge the threat level.
[0004] However, due to the complexity and changeability of the maritime environment, the actual deployment process also needs to take into account limitations such as equipment costs, and the above methods have many defects. On the one hand, the method of applying multi-sensor fusion methods to maritime target detection is not perfect, and most of them have problems such as low accuracy, poor robustness, and poor environmental adaptability. In addition, some radar sensors are relatively expensive, and their fusion algorithms also place high demands on equipment performance. The use of fusion methods will greatly increase equipment costs; on the other hand, if only relatively cheap visual sensors are used, the semantic information obtained by today's target detection algorithm is not enough to determine the threat level, and the spatiotemporal information of targets in the field of view, especially multiple targets, cannot be taken into account. The target distance obtained by monocular ranging is also prone to large errors. Therefore, the existing technical solutions have the problems of high detection cost, complex calculations and low accuracy. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for determining the threat level of a water target, which can greatly reduce the detection cost and calculation complexity, and improve the calculation accuracy.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A method for determining the threat level of a water target, comprising:
[0008] Obtain water scene video data;
[0009] Performing image preprocessing on the water scene video data to obtain preprocessed image data;
[0010] The threat level ranking of the water targets in the water scene video data is determined according to the preprocessed image data and the threat level discrimination model; the threat level discrimination model includes an optical flow extraction module, a spatial significance sorting module and a threat level discrimination module, and the outputs of the optical flow extraction module and the spatial significance sorting module are both connected to the input of the threat level discrimination module; the optical flow extraction module includes multiple layers of optical flow network layers, and the multiple layers of the optical flow network layers are in a pyramid structure; the spatial significance sorting module includes a semantic extraction network, an attention structure and a target-semantic-target association module connected in sequence.
[0011] Optionally, the preprocessing the water scene video data to obtain preprocessed image data specifically includes:
[0012] Performing target screening on the water scene video data to obtain a target video;
[0013] Intercepting the target video to obtain a frame rate image;
[0014] The frame rate image is sequentially resized, contrast adjusted, and randomly rotated to obtain preprocessed image data.
[0015] Optionally, determining the threat level ranking of water targets in the water scene video data according to the preprocessed image data and the threat level discrimination model specifically includes:
[0016] Extracting any two frames of images from the preprocessed image data as extracted image data;
[0017] The extracted image data is input into the optical flow extraction module to perform optical flow calculation to obtain image optical flow data of each water target; the image optical flow data is the motion data of the water target from the previous frame image to the next frame image of the extracted image data;
[0018] Inputting the next frame of the extracted image data into the spatial significance sorting module to perform spatial semantic feature significance calculation to obtain the significance score of each water target;
[0019] Inputting the image optical flow data and the corresponding significance score of each water target into the threat level discrimination module for threat level discrimination to obtain the threat level of each water target;
[0020] The threat levels of the above-water targets are ranked to obtain a threat level ranking of the above-water targets in the above-water scene video data.
[0021] Optionally, the step of inputting a subsequent frame of the extracted image data into the spatial significance sorting module to perform a spatial semantic feature significance operation to obtain a significance score for each water target specifically includes:
[0022] Inputting the next frame of image in the extracted image data into the semantic extraction network to obtain initial semantic features;
[0023] The initial semantic features are semantically enhanced through an attention structure to obtain enhanced semantic features; the semantic enhancement includes sequentially encoding and dynamic weighting;
[0024] The enhanced semantic features of the next frame of the image in the extracted image data are input into the target-semantic-target association module to perform a significance association operation, so as to obtain a significance score of each water target.
[0025] Optionally, the method further includes: visually displaying the water targets according to the threat level ranking.
[0026] The present invention also provides a system for determining the threat level of a water target, comprising:
[0027] A data acquisition module, used to obtain video data of water scenes;
[0028] A data preprocessing module, used for performing image preprocessing on the water scene video data to obtain preprocessed image data;
[0029] A threat level ranking module is used to determine the threat level ranking of water targets in the water scene video data based on the preprocessed image data and the threat level discrimination model; the threat level discrimination model includes an optical flow extraction module, a spatial significance ranking module and a threat level discrimination module, and the outputs of the optical flow extraction module and the spatial significance ranking module are both connected to the input of the threat level discrimination module; the optical flow extraction module includes multiple layers of optical flow network layers, and the multiple layers of the optical flow network layers are in a pyramid structure; the spatial significance ranking module includes a semantic extraction network, an attention structure and a target-semantic-target association module connected in sequence.
[0030] Optionally, the data preprocessing module includes:
[0031] A target screening unit, used for performing target screening on the water scene video data to obtain a target video;
[0032] A frame rate capture unit, used to capture the target video to obtain a frame rate image;
[0033] The data preprocessing unit is used to sequentially resize, adjust the contrast and randomly rotate the frame rate image to obtain preprocessed image data.
[0034] Optionally, the threat ranking module includes:
[0035] An image extraction unit, used for extracting any two frames of images from the pre-processed image data as extracted image data;
[0036] An optical flow calculation unit is used to input the extracted image data into the optical flow extraction module to perform optical flow calculation to obtain image optical flow data of each water target; the image optical flow data is the motion data of the water target from the previous frame image to the next frame image of the extracted image data;
[0037] A spatial semantic feature significance calculation unit, used for inputting the next frame of the extracted image data into the spatial significance sorting module to perform spatial semantic feature significance calculation to obtain a significance score of each water target;
[0038] A threat level determination unit is used to input the image optical flow data and the corresponding significance score of each water target into the threat level determination module for threat level determination to obtain the threat level of each water target;
[0039] The threat level ranking unit is used to rank the threat level of each of the above-water targets to obtain the threat level ranking of the above-water targets in the above-water scene video data.
[0040] Optionally, the spatial semantic feature significance calculation unit includes:
[0041] An initial semantic extraction subunit, used for inputting a subsequent frame of image in the extracted image data into the semantic extraction network to obtain initial semantic features;
[0042] A semantic enhancement subunit, used for semantically enhancing the initial semantic features through an attention structure to obtain enhanced semantic features; the semantic enhancement includes sequentially encoding and dynamic weighting;
[0043] The significance operation subunit is used to input the enhanced semantic features of the next frame of the extracted image data into the target-semantic-target association module to perform significance association operation to obtain the significance score of each water target.
[0044] Optionally, it also includes: a display module, used to visually display the water targets according to the threat level ranking.
[0045] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0046] The present invention discloses a method and system for distinguishing the threat level of water targets. The method comprises acquiring water scene video data, performing image preprocessing on the water scene video data to obtain preprocessed image data; and determining the threat level ranking of water targets according to the preprocessed image data and a threat level discrimination model. The threat level discrimination model comprises an optical flow extraction module, a spatial significance sorting module and a threat level discrimination module connected in sequence; the optical flow extraction module comprises an optical flow network and a pyramid model connected to the optical flow network; the spatial significance sorting module comprises a semantic extraction network, an attention structure and a target-semantic-target association module connected in sequence. The present invention utilizes the threat level discrimination model to perform threat level discrimination operations and sorting on water scene video data. It is possible to determine the threat level of water targets without using multi-sensor data, which greatly reduces the detection cost and computational complexity, and improves computational accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0048] Figure 1 A method flow chart of a method for determining the threat level of a water target according to the present invention;
[0049] Figure 2 The present invention is a logic flow chart of the threat level determination method of the water target threat level determination method;
[0050] Figure 3 It is a schematic diagram of a threat level discrimination model of a method for discriminating the threat level of a water target according to the present invention;
[0051] Figure 4 It is a schematic diagram of a semantic extraction network of a method for distinguishing the threat level of a water target according to the present invention;
[0052] Figure 5 It is a schematic diagram of the structure of the water target threat level identification system of the present invention.
[0053] Explanation of symbols:
[0054] 1-Data acquisition module; 2-Data preprocessing module; 3-Threat level ranking module. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] The purpose of the present invention is to provide a method and system for determining the threat level of a water target, which can greatly reduce the detection cost and calculation complexity, and improve the calculation accuracy.
[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] like Figure 1-Figure 2 As shown, an embodiment of the present invention provides a method for determining the threat level of a water target, comprising:
[0059] Step 100: Acquire water scene video data.
[0060] Step 200: performing image preprocessing on the water scene video data to obtain preprocessed image data.
[0061] Step 300: Determine the threat ranking of the water targets in the water scene video data according to the preprocessed image data and the threat discrimination model; the threat discrimination model includes an optical flow extraction module, a spatial significance sorting module and a threat discrimination module, and the outputs of the optical flow extraction module and the spatial significance sorting module are both connected to the input of the threat discrimination module; the optical flow extraction module includes multiple layers of optical flow network layers, and the multiple layers of the optical flow network layers are in a pyramid structure; the spatial significance sorting module includes a semantic extraction network, an attention structure and an object-semantic-object association (Object-Context-Object RelationModule, ocor) module connected in sequence.
[0062] Step 400: Visually display the water targets according to the threat level ranking.
[0063] In step 100, as an implementation mode, the water scene video data is a video obtained from an actual boat-borne optoelectronic camera, including five segments of video data respectively obtained from various environments and lighting conditions.
[0064] Step 200 specifically includes:
[0065] S1: performing target screening on the water scene video data to obtain a target video.
[0066] S2: intercept the target video to obtain frame rate images, which specifically include about 24,000 frames of images. At the same time, obtain a large number of target category images, about 17,000 images, and non-target category video stream data sets. These images and videos will be used as pre-training data to train the spatial saliency sorting module and the optical flow extraction module respectively.
[0067] S3: The frame rate image is resized, contrast adjusted, and randomly rotated in sequence to obtain preprocessed image data. In this embodiment, the maximum side of the frame rate image is first adjusted to 608, and then the short side is padded to 608 using an edge padding operation, so that the frame rate image is adjusted to a size of 608*608. In addition, the image is contrast adjusted and randomly rotated.
[0068] In step 300, the threat level discrimination model includes an optical flow extraction module, a spatial saliency sorting module and a threat level discrimination module, wherein the optical flow extraction module is used to extract the temporal information of the image, the spatial saliency sorting module is used to extract the semantic spatial relationship and target semantic information of the water target, and the threat level discrimination module is used to fuse the spatiotemporal semantic information and process and output the threat level of the water target. Compared with the saliency sorting network proposed nowadays, this model can not only extract semantic information and spatial position information, but also can combine multiple frames of images in actual application scenarios, and obtain more accurate and more human-friendly threat level information discrimination by comprehensively considering their speed and displacement. Specifically including the following steps:
[0069] S1: extracting any two frames of images from the pre-processed image data as extracted image data.
[0070] S2: Input the extracted image data into the optical flow extraction module to perform optical flow calculation to obtain image optical flow data of each water target; the image optical flow data is the motion data of the water target from the previous frame image to the next frame image of the extracted image data.
[0071] S3: Inputting the next frame of the extracted image data into the spatial significance sorting module to perform spatial semantic feature significance calculation to obtain the significance score of each water target.
[0072] S4: inputting the image optical flow data and the corresponding significance score of each water target into the threat level determination module for threat level determination to obtain the threat level of each water target.
[0073] S5: sorting the threat levels of the above-water targets to obtain the threat level ranking of the above-water targets in the above-water scene video data.
[0074] The specific implementation of S1-S2 in the above step 300 is:
[0075] Given a target video stream to be identified (i.e., water scene video data), first extract the two frames of images {I k 1 , I k 2}, using a neural network based on the spatial pyramid network (spynet) to calculate the image optical flow information (such as Figure 3 As shown in the figure, the specific format of the optical flow information is a feature map of two channels with a size of (W, H), that is, a tensor of (W, H, 2). The feature maps of the above two channels respectively represent the displacement of the image on the x and y axes, and then the result is further processed in the threat level discrimination module to obtain the target time threat level of the video stream.
[0076] In addition, due to the complex marine environment and the hull causing the photoelectric camera to shake, resulting in unstable video shooting, the target displacement between different frames may be quite large, so the optical flow extraction module uses a spatial pyramid model to enhance the optical flow feature extraction. The specific implementation method is as follows: First, the network defaults to an initial optical flow field of 0, and uses a twice-downsampled original image to directly calculate the optical flow at the top of the pyramid. In order to reduce the impact of large movements on optical flow extraction, the optical flow calculated at the top of the pyramid network is sent to the next level of the pyramid network for further calculation after upsampling. The next level of the network will use the optical flow extracted by the previous network to further extract the optical flow of images with higher definition.
[0077] The specific formula is as follows:
[0078] υ k =G k (I k 1 ,w(I k 2 ,u(V k-1 )),u(V k-1 )) (1)
[0079] V k =u(V k-1 )+υ k (2)
[0080] Among them, V k represents the predicted optical flow output by the k-th level network; υ k represents the predicted optical flow residual output by the k-th level network; u(.) represents the upsampling operation; the residual V k By the convolutional layer G k The upsampled optical flow u(V k-1 ), video frames before and after {I k1 , I k 2} is calculated; k 1 , I k 2} are the previous and next frames of the image, which are two tensors of size (W, H, C); W and H are the input image sizes, i.e. 608; C is the number of input channels, i.e. 3 channels corresponding to RGB; w(I k 2 ,u(V k-1 )) is based on the optical flow u(V k-1 ) for image frame I k 2 A warp operation is performed to obtain alignment characteristics.
[0081] After downsampling the real optical flow V, and u(V k-1 ) to obtain the true optical flow residual As the true value of each optical flow network, it is regressed to train each optical flow network on the pyramid separately. The loss function adopts the cross entropy loss L EPE (EPE loss), which is formula (4), where and (v kx ,v ky ) represent the displacement in the x and y directions respectively. Therefore, each network only needs to predict the optical flow residual with the previous level, which simplifies the difficulty of optical flow prediction.
[0082]
[0083]
[0084] Through the optical flow prediction network, a feature map tensor of size W*H*2(W,H,2) can be obtained as the output result, which corresponds to channels M1 and M2, corresponding to the displacement of each pixel in the x and y directions respectively.
[0085] S3 in the above step 300 specifically includes:
[0086] The first step: inputting the next frame image in the extracted image data into the semantic extraction network to obtain initial semantic features.
[0087] Step 2: semantically enhance the initial semantic features through the attention structure to obtain enhanced semantic features; the semantic enhancement includes encoding and dynamic weighting in sequence.
[0088] Step 3: Input the enhanced semantic features of the next frame of the extracted image data into the OCO module to perform a significance association operation to obtain a significance score for each water target.
[0089] In this embodiment, a single frame image is processed using a spatial saliency ranking module to obtain a saliency ranking score based on spatial semantic information. The input of the spatial saliency ranking module is the next frame image extracted in S1 in step 300. The semantic feature F is extracted through a feature extraction backbone based on a shift window transformer (swintransformer) and a feature pyramid network (FPN). obj (like Figure 4 shown), F obj The size is (W i ,H i ,C i ) tensor, where W i and H i The input H and W are divided by the step size, C i The SOS attention structure is used to encode and dynamically weight the features of each target, capture and enhance the semantic features of salient objects, and then the ocor module is used to combine global information to obtain the saliency association of each target, and the output is the saliency ranking score of the corresponding spatial semantic information.
[0090] The SOS module extracts the target semantic features F of the 100 target sequences obj_queries obtained through the backbone part through region of interest alignment (roi_align). context Corresponding target feature information F obj First, the covariance normalization matrix M between features is calculated, which can represent the cross-channel correlation between features. The global covariance pooling GCP is used to calculate M to obtain the encoding s c , using a learnable parameter a c 1 ,a c 2 ,b c 1 ,b c 2 Dynamically weight M, obtain the channel weight and add it to the feature information F obj Multiply to get enhanced feature information
[0091]
[0092]
[0093]
[0094]
[0095] Among them, K = W × H, C is the number of channels, and max(.) is the operation to find the maximum value of the two. is the multiplication between channels, represents the channel-level mean vector, S = [s1, s2, ..., s c ], which means encoding the context information between the target and the local, and the target and the global. Indicates the association between channels.
[0096] In the enhanced features On this basis, the attention mechanism can be further used to simulate the spatial attention of human vision to form the OSOR module.
[0097] The specific implementation is as follows:
[0098] The F weighted by the SOS structure context and Perform a concatenate operation on the channel to obtain To retain the original information, H and W are the size of the feature layer, C is the number of channels input to the module, and N is the target number, which is set to 100. The multi-head attention mechanism is used to operate on the features, generate k (key), q (query), v (value) and further extract the correlation. The specific formula is as follows:
[0099]
[0100] Among them, φ P (.) is a linear mapping function responsible for mapping features into k, q, and v. P is the number of linear mappings, and its value is 8, which means that one feature is mapped into 8 vectors, and the input feature is converted into a mapping (embedding) form; A P <i,j> (x, y) is the dot product of k and q, which is used to obtain the similarity of the two feature vectors, that is, the interaction between the spatial semantics x of target i and the spatial semantics y of target j. The specific formula is as follows:
[0101]
[0102] The final output is as follows:
[0103]
[0104] The output is a feature that integrates spatial semantic information, and the spatial semantic threat level result can be directly output through a convolutional layer calculation in the threat level discrimination module.
[0105] S4 in the above step 300 specifically includes:
[0106] The threat level identification module integrates time, space and semantic information to obtain the final threat level identification result.
[0107] Through the threat level discrimination module that integrates spatial semantic information, a convolutional layer can be used to make a preliminary judgment on the threat level and obtain the initial judgment result salient_score. Here, a fully connected layer operation is performed to further calculate the result of formula (11) to obtain the spatial threat level result, which is output in the form of a tensor. Each value in the tensor FC(.) corresponds to a salience score.
[0108]
[0109] However, this saliency score cannot take the motion state of the ship into consideration. Since the optical flow map can already accurately reflect the motion state of the object at the current moment, the softmax function can be simply used to process the optical flow result, such as formula (12), to obtain the optical flow score flow_score, and directly calculate it with the spatial semantic saliency result, such as formula (11), to obtain the threat discrimination score threat_score. In order to reduce the impact of motion information on the threat level, the knowledge distillation method is used. When using softmax, the "distillation temperature" needs to be adjusted. The specific implementation is as follows:
[0110]
[0111]
[0112] Among them, threat_score is the threat degree, T is the distillation temperature, when T increases, the influence of flow_score on the threat degree will gradually decrease; EPS is a very small constant to prevent obj_score(i) from being 0.
[0113] When defining the time score flow_score, considering that targets with the same moving direction tend to form a certain strategic formation, a greater threat level should be assigned, and the displacement vector corresponding to each target obtained by the optical flow is defined. Among them, M1 and M2 correspond to the two channels x and y, i is the target index obtained according to the detection branch, and the specific implementation of flow_score is as follows:
[0114]
[0115] The similarity of movement is defined by the dot product of the vectors, and τ is the weight term.
[0116] Finally, for the training of the threat discrimination model, the video data of the detected water targets and the corresponding threat levels are used as training data. During training, the optical flow dataset (Flying Chairs) and the collected watercraft image dataset are first used to pre-train the optical flow extraction module and the spatial saliency sorting module, respectively. The training cycle is 100 iterations (epochs), the optimizer uses the gradient descent method (SGD), the learning rate lr is set to 0.02, the momentum momentum is set to 0.9, and the weight decay coefficient weight_decay is set to 0.0001. The network that extracts optical flow information and spatial saliency information is obtained, and then the recorded watercraft video dataset is used to comprehensively train the network, and the training parameter settings are consistent with the pre-training.
[0117] The loss function is defined as follows:
[0118] L=L det +λL osor +βL flow (16)
[0119] Where, L det is the detection loss, for example, L = L cls +λL box +βL mask , L mask Same as the definition in MaskRCNN, it is the average binary cross entropy loss per pixel, L flow Same as the definition in spynet, which is the sum of the loss functions of the optical flow network, L osor OSOR loss is the cross entropy loss between the spatial significance ranking score directly predicted by the OSOR module and the GT ranking score.
[0120] After the network training is completed, it can be directly used for real-time video stream threat detection. After the video stream is acquired using an optoelectronic camera, the algorithm will retain the previous frame and input it into the spatiotemporal saliency sorting network at the same time as the current frame, and output the threat sorting results in real time.
[0121] In step 400, the specific implementation of the visual display is:
[0122] In addition to the specific threat score threat_score, the algorithm also visualizes the threat score and assigns different colors to the targets according to the threat ranking score, with red being the most threatening target and blue being the least. According to the actual application scenario, the output threshold and the number of output channels of the module can be adjusted so that the algorithm can be applied to the detection of multiple categories and quantities of targets in various scenarios. The form of visualization can be adjusted according to the actual situation, and this is not used as an example.
[0123] like Figure 5 As shown, the present invention also provides a system for determining the threat level of a water target, comprising: a data acquisition module 1, a data preprocessing module 2 and a threat level sorting module 3.
[0124] Specifically, the data acquisition module 1 is used to acquire water scene video data; the data preprocessing module 2 is used to perform image preprocessing on the water scene video data to obtain preprocessed image data; the threat level sorting module 3 is used to determine the threat level ranking of water targets in the water scene video data according to the preprocessed image data and the threat level discrimination model; the threat level discrimination model includes an optical flow extraction module, a spatial significance sorting module and a threat level discrimination module, and the outputs of the optical flow extraction module and the spatial significance sorting module are both connected to the input of the threat level discrimination module; the optical flow extraction module includes multiple layers of optical flow network layers, and the multiple layers of the optical flow network layers are in a pyramid structure; the spatial significance sorting module includes a semantic extraction network, an attention structure and an ocor module connected in sequence.
[0125] Furthermore, the data preprocessing module 2 of the present invention includes: a target screening unit, a frame rate screenshot unit and a data preprocessing unit.
[0126] Specifically, the target screening unit is used to perform target screening on the water scene video data to obtain a target video; the frame rate screenshot unit is used to capture the target video to obtain a frame rate image; the data preprocessing unit is used to sequentially resize, contrast adjust and randomly rotate the frame rate image to obtain preprocessed image data.
[0127] Furthermore, the threat level ranking module 3 of the present invention comprises: an image extraction unit, an optical flow calculation unit, a spatial semantic feature significance calculation unit and a threat level determination unit.
[0128] Specifically, the image extraction unit is used to extract any two frames of images from the preprocessed image data as extracted image data; the optical flow calculation unit is used to input the extracted image data into the optical flow extraction module for optical flow calculation to obtain image optical flow data of each water target; the image optical flow data is the motion data of the water target from the previous frame image to the next frame image of the extracted image data; the spatial semantic feature significance calculation unit is used to input the next frame image in the extracted image data into the spatial significance sorting module for spatial semantic feature significance calculation to obtain the significance score of each water target; the threat level judgment unit is used to input the image optical flow data of each water target and the significance score of each water target into the threat level judgment module for threat level judgment to obtain the threat level of each water target; the threat level sorting unit is used to sort the threat level of each water target to obtain the threat level ranking of the water targets in the water scene video data.
[0129] As a preferred implementation, the spatial semantic feature significance operation unit includes: an initial semantic extraction subunit, a semantic enhancement subunit and a significance operation subunit.
[0130] Specifically, the initial semantic extraction subunit is used to input the next frame image in the extracted image data into the semantic extraction network to obtain initial semantic features; the semantic enhancement subunit is used to semantically enhance the initial semantic features through the attention structure to obtain enhanced semantic features; the semantic enhancement includes encoding and dynamic weighting in sequence; the significance operation subunit is used to input the enhanced semantic features of the next frame image in the extracted image data into the OCO module to perform significance association operation to obtain the significance score of each water target.
[0131] Furthermore, the water target threat level identification system provided by the present invention further includes: a display module. The display module is used to visually display the water targets according to the threat level ranking.
[0132] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0133] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for determining the threat level of water targets. It is characterized in that include: Obtain water scene video data; Performing image preprocessing on the water scene video data to obtain preprocessed image data; Determining the threat ranking of the water targets in the water scene video data according to the preprocessed image data and the threat discrimination model specifically includes: Extracting any two frames of images from the preprocessed image data as extracted image data; The extracted image data is input into the optical flow extraction module to perform optical flow calculation to obtain image optical flow data of each water target; the image optical flow data is the motion data of the water target from the previous frame image to the next frame image of the extracted image data; Inputting the next frame of the extracted image data into the spatial significance sorting module to perform spatial semantic feature significance calculation to obtain the significance score of each water target; Inputting the image optical flow data and the corresponding significance score of each water target into the threat level discrimination module for threat level discrimination to obtain the threat level of each water target; Sorting the threat levels of the above-water targets to obtain the threat level ranking of the above-water targets in the above-water scene video data; The threat level discrimination model includes an optical flow extraction module, a spatial significance sorting module and a threat level discrimination module, wherein the outputs of the optical flow extraction module and the spatial significance sorting module are both connected to the input of the threat level discrimination module; the optical flow extraction module includes multiple layers of optical flow network layers, and the multiple layers of optical flow network layers are in a pyramid structure; the spatial significance sorting module includes a semantic extraction network, an attention structure and a target-semantic-target association module connected in sequence.
2. The method for determining the threat level of a water target according to claim 1, It is characterized in that The preprocessing of the water scene video data to obtain preprocessed image data specifically includes: Performing target screening on the water scene video data to obtain a target video; Intercepting the target video to obtain a frame rate image; The frame rate image is sequentially resized, contrast adjusted, and randomly rotated to obtain preprocessed image data.
3. The method for determining the threat level of a water target according to claim 1, It is characterized in that The step of inputting the next frame of the extracted image data into the spatial significance sorting module to perform a spatial semantic feature significance operation to obtain a significance score for each water target specifically includes: Inputting the next frame of image in the extracted image data into the semantic extraction network to obtain initial semantic features; The initial semantic features are semantically enhanced through an attention structure to obtain enhanced semantic features; the semantic enhancement includes sequentially encoding and dynamic weighting; The enhanced semantic features of the next frame of the image in the extracted image data are input into the target-semantic-target association module to perform a significance association operation, so as to obtain a significance score of each water target.
4. The method for determining the threat level of a water target according to claim 1, It is characterized in that Also includes: The water targets are visually displayed according to the threat level ranking.
5. A water target threat level identification system, It is characterized in that include: A data acquisition module, used to obtain video data of water scenes; A data preprocessing module, used for performing image preprocessing on the water scene video data to obtain preprocessed image data; A threat level ranking module, used to determine the threat level ranking of the water targets in the water scene video data according to the pre-processed image data and the threat level discrimination model; The threat level sorting module includes: an image extraction unit, which is used to extract any two frames of images from the pre-processed image data as extracted image data; an optical flow calculation unit, which is used to input the extracted image data into the optical flow extraction module to perform optical flow calculation, and obtain image optical flow data of each water target; the image optical flow data is the motion data of the water target from the previous frame image to the next frame image of the extracted image data; a spatial semantic feature significance calculation unit, which is used to input the next frame image in the extracted image data into the spatial significance sorting module to perform spatial semantic feature significance calculation, and obtain the significance score of each water target; a threat level judgment unit, which is used to input the image optical flow data and the corresponding significance score of each water target into the threat level judgment module to perform threat level judgment, and obtain the threat level of each water target; a threat level sorting unit, which is used to sort the threat level of each water target, and obtain the threat level ranking of the water targets in the water scene video data; The threat level discrimination model includes an optical flow extraction module, a spatial significance sorting module and a threat level discrimination module, wherein the outputs of the optical flow extraction module and the spatial significance sorting module are both connected to the input of the threat level discrimination module; the optical flow extraction module includes multiple layers of optical flow network layers, and the multiple layers of optical flow network layers are in a pyramid structure; the spatial significance sorting module includes a semantic extraction network, an attention structure and a target-semantic-target association module connected in sequence.
6. The water target threat level determination system according to claim 5, It is characterized in that The data preprocessing module comprises: A target screening unit, used for performing target screening on the water scene video data to obtain a target video; A frame rate capture unit, used to capture the target video to obtain a frame rate image; The data preprocessing unit is used to sequentially resize, adjust the contrast and randomly rotate the frame rate image to obtain preprocessed image data.
7. The water target threat level determination system according to claim 5, It is characterized in that The spatial semantic feature saliency calculation unit comprises: An initial semantic extraction subunit, used for inputting a subsequent frame of image in the extracted image data into the semantic extraction network to obtain initial semantic features; A semantic enhancement subunit, used for semantically enhancing the initial semantic features through an attention structure to obtain enhanced semantic features; the semantic enhancement includes sequentially encoding and dynamic weighting; The significance operation subunit is used to input the enhanced semantic features of the next frame of the extracted image data into the target-semantic-target association module to perform significance association operation to obtain the significance score of each water target.
8. The water target threat level determination system according to claim 5, It is characterized in that Also includes: A display module is used to visually display the water targets according to the threat level ranking.
