Water transport scene monitoring method and detection system based on deep learning
Through deep learning methods and augmented image construction technology, the problem of high data collection and labeling costs in water transportation scene monitoring is solved, the generalization ability and robustness of the water transportation scene monitoring network are improved, and efficient and accurate water transportation scene monitoring is achieved. .
Patent Information
- Application Number
- CN202410842490.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-27
AI Technical Summary
Existing water transportation scene monitoring methods rely on manual inspection and traditional image processing, which are inefficient and difficult to adapt to complex water transportation environments. Deep learning models have shortcomings in generalization capabilities and robustness, especially due to the high cost of data collection and labeling. Achieve efficient monitoring.
A water transportation scene monitoring method based on deep learning is adopted to obtain the target water transportation scene image, use the augmented image construction guide example to transform the original image, generate training data with diversity and consistent semantics, optimize the water transportation scene monitoring network, and combine the performance of the neural network Test and iteratively train to improve the generalization ability and robustness of the model.
It is possible to reduce labor costs and improve efficiency while improving the generalization ability and robustness of the water transportation scene monitoring network, ensuring the accuracy and stability of monitoring results, and enhancing the adaptability to complex water transportation environments.
Smart Images

Figure CN118379690B
Abstract
Description
Technical Field
[0001] The present application relates to the fields of scene monitoring and machine learning, and more specifically, to a water transport scene monitoring method and detection system based on deep learning. Background Art
[0002] With the rapid development of water transport, the demand for water transport scene monitoring is increasing. Traditional water transport scene monitoring methods mainly rely on manual inspections and traditional image processing technologies, which are not only inefficient but also difficult to cope with the complex and changeable water transport environment. In recent years, the rapid development of deep learning technology has provided new solutions for water transport scene monitoring. At present, the application of deep learning technology in water transport scene monitoring mainly focuses on training neural network models through a large amount of annotated image data to achieve automatic recognition and monitoring of water transport scenes. However, this method faces some challenges in practical applications. First, water transport scenes are complex and changeable, and it is difficult to collect image data with sufficient diversity and annotation accuracy. Second, even if a certain amount of image data is collected, it takes a lot of manpower and time to annotate, which not only increases the cost but also is inefficient. In addition, due to the particularity of water transport scenes, traditional deep learning models are often difficult to adapt to complex water transport environments, resulting in poor generalization and robustness of the models. Summary of the invention
[0003] The purpose of the present invention is to provide a water transport scene monitoring method and detection system based on deep learning. This application is implemented as follows:
[0004] In the first aspect, the present application provides a method for monitoring water transport scenes based on deep learning, including: obtaining a target water transport scene image; loading the target water transport scene image into a target water transport scene monitoring network, and performing water transport scene recognition based on the target water transport scene monitoring network to obtain an abnormal recognition result. The training process of the target water transport scene monitoring network includes: obtaining a first water transport scene training image and an augmented image construction guidance example corresponding to the first water transport scene training image, wherein the augmented image construction guidance example is configured to guide the construction of a second water transport scene training image containing consistent image semantics with the first water transport scene training image; performing water transport scene image construction on the first water transport scene training image based on the augmented image construction guidance example through the water transport scene construction network to obtain a plurality of the second water transport scene training images; optimizing the first water transport scene monitoring network based on the plurality of the second water transport scene training images to obtain a second water transport scene monitoring network; performing a neural network performance test on the second water transport scene monitoring network to obtain neural network performance test information; iterating the first water transport scene monitoring network based on the neural network performance test information to obtain the target water transport scene monitoring network.
[0005] Optionally, the neural network performance test is performed on the second water transport scene monitoring network to obtain the neural network performance test information, including: obtaining a water transport scene image learning sample to be tested and a pseudo-verification learning sample corresponding to the water transport scene image learning sample to be tested; performing image anomaly classification prediction on the water transport scene image learning sample to be tested through the second water transport scene monitoring network to obtain anomaly classification prediction results; based on the anomaly classification prediction results and the pseudo-verification learning sample, obtaining the neural network performance test information for the neural network performance test of the second water transport scene monitoring network.
[0006] Optionally, the quasi-verification learning sample is an abnormal information priori mark corresponding to the quasi-verification water transport scene image learning sample; the obtaining of neural network performance test information for performing neural network performance test on the second water transport scene monitoring network based on the abnormal classification prediction result and the quasi-verification learning sample includes: obtaining an information error between the abnormal classification prediction result and the abnormal information priori mark, and comparing the information error with a set critical error value to obtain a first critical value comparison result; in response to the first critical value comparison result being that the information error is not greater than the set critical error value, obtaining neural network performance test information that the neural network performance of the second water transport scene monitoring network is improved based on the first critical value comparison result; in response to the first critical value comparison result being that the information error is greater than the set critical error value, obtaining neural network performance test information that the neural network performance of the second water transport scene monitoring network is not improved based on the first critical value comparison result; or; the quasi-verification learning sample The training sample is a water transport scene image learning sample to be verified that contains consistent image semantics with the water transport scene image learning sample to be verified; the neural network performance test information for performing a neural network performance test on the second water transport scene monitoring network based on the abnormal classification prediction result and the learning sample to be verified includes: obtaining a matching score between the abnormal classification prediction result and the water transport scene image learning sample to be verified, and comparing the matching score with a set critical matching score to obtain a second critical value comparison result; in response to the second critical value comparison result being that the matching score is less than the set critical matching score, based on the second critical value comparison result, the neural network performance test information that the neural network performance of the second water transport scene monitoring network is not improved is obtained; in response to the second critical value comparison result being that the matching score is not less than the set critical matching score, based on the second critical value comparison result, the neural network performance test information that the neural network performance of the second water transport scene monitoring network is improved is obtained.
[0007] Optionally, the iterating of the first water transport scenario monitoring network based on the neural network performance verification information includes: in response to the neural network performance verification information indicating that the neural network performance of the second water transport scenario monitoring network is improved, iterating the first water transport scenario monitoring network into the second water transport scenario monitoring network; or; in response to the neural network performance verification information indicating that the neural network performance of the second water transport scenario monitoring network is not improved, not iterating the first water transport scenario monitoring network into the second water transport scenario monitoring network.
[0008] Optionally, the process of creating the augmented image construction guidance example includes the following steps: obtaining multiple basic augmented image construction guidance examples and constructing a corresponding example tag for each of the basic augmented image construction guidance examples; for each of the basic augmented image construction guidance examples, determining the type based on the example tag to obtain the example type of each of the basic augmented image construction guidance examples; for each of the basic augmented image construction guidance examples, in response to the example type satisfying a set condition, determining the basic augmented image construction guidance example as the augmented image construction guidance example.
[0009] Optionally, the step of constructing the example label for the basic augmented image construction guidance example includes: constructing a label based on global semantics for the basic augmented image construction guidance example to obtain a first candidate example label; constructing a label based on local semantics for the basic augmented image construction guidance example to obtain a second candidate example label; obtaining a first support coefficient corresponding to the first candidate example label and a second support coefficient corresponding to the second candidate example label; and taking the candidate example label corresponding to the larger support coefficient between the first support coefficient and the second support coefficient as the example label.
[0010] Optionally, the type of the basic augmented image construction guidance example is determined based on the example mark to obtain the example type of the basic augmented image construction guidance example, including: performing mark encoding processing on each of the example marks to obtain the encoding mark corresponding to each of the example marks; clustering all the example marks based on the matching scores between different encoding marks to obtain multiple example mark classifications; and obtaining the example type of the basic augmented image construction guidance example based on the example mark classification in which the example mark corresponding to the basic augmented image construction guidance example is located.
[0011] Optionally, the water transport scene construction network constructs a water transport scene image for the first water transport scene training image based on the augmented image construction guidance example to obtain the second water transport scene training image, including: performing image embedding mapping on the first water transport scene training image based on the augmented image construction guidance example to obtain a training image embedding matrix and network internal configuration parameters; performing internal weight focusing and adjustment operations on the training image embedding matrix to obtain a first adjustment operation result; integrating the network internal configuration parameters and the first adjustment operation result to obtain an integrated operation result; performing an adjustment operation on the integrated operation result based on the first adjustment operation result to obtain a second adjustment operation result; and obtaining the second water transport scene training image based on the second adjustment operation result.
[0012] Optionally, the image embedding mapping is performed on the first water transport scene training image based on the augmented image construction guidance example to obtain a training image embedding matrix and network internal configuration parameters, including: extracting features from the first water transport scene training image based on the augmented image construction guidance example to obtain a first image feature matrix; performing internal weight focusing and adjustment operations on the first image feature matrix to obtain a third adjustment operation result; encoding the third adjustment operation result to obtain a first encoding matrix; performing an adjustment operation on the first encoding matrix based on the third adjustment operation result to obtain a training image embedding matrix; and obtaining the training image embedding matrix when the training image embedding matrix is obtained. , the network internal configuration parameter variables of the water transport scene construction network; the integration of the network internal configuration parameter variables and the first adjustment operation result to obtain the integrated operation result includes: using the network internal configuration parameter variables as the search array and anchor array in the internal weight focusing, and using the first adjustment operation result as the result array in the internal weight focusing, performing internal weight focusing, and obtaining the integrated operation result; the obtaining the second water transport scene training image based on the second adjustment operation result includes: encoding the second adjustment operation result to obtain a second encoding matrix; decoding the second encoding matrix to obtain the second water transport scene training image. In a second aspect, the present application provides a detection system, including: one or more processors; a memory; one or more computer programs; wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processor, the method as described above is implemented.
[0013] The technical effects of the present application at least include: the water transport scene monitoring method and detection system based on deep learning provided by the present application, in the network training phase, after obtaining the first water transport scene training image and the augmented image construction guidance example corresponding to the first water transport scene training image, the performance of the second water transport scene training image containing consistent image semantics with the first water transport scene training image is constructed by the water transport scene construction network based on the guidance of the augmented image construction guidance example, and the first water transport scene training image is constructed for the water transport scene training image to obtain multiple second water transport scene training images, so that the first water transport scene training image can be based on the first water transport scene training image. The training image contains consistent image semantics and the enhancement of the first water transport scene training image is completed. Furthermore, because the second water transport scene training image is obtained based on the water transport scene construction network, the manual labeling and collection process is avoided. After obtaining a plurality of second water transport scene training images, the first water transport scene monitoring network is tuned based on the plurality of second water transport scene training images to obtain a second water transport scene monitoring network. Since the second water transport scene training images are obtained by adjusting the first water transport scene training images, the small sample learning of the first water transport scene monitoring network can be completed. Then, the neural network performance test is performed on the second water transport scene monitoring network to obtain the neural network performance test information, and the first water transport scene monitoring network is iterated through the neural network performance test information. Since the iteration of the first water transport scene monitoring network is based on the neural network performance test information, blind iteration is eliminated, making the training of the neural network more robust. In the embodiment of the present application, when the neural network performance test information indicates that the neural network performance of the second water transport scene monitoring network is improved, it means that the second water transport scene training image has achieved positive training promotion for the first water transport scene monitoring network, and the neural network performance and stability of the first water transport scene monitoring network can be improved. Then, the first water transport scene monitoring network can be iterated into the second water transport scene monitoring network to obtain a deep neural network with better neural network performance and higher stability. Since the first water transport scenario monitoring network can be iterated into the second water transport scenario monitoring network only after the performance of the neural network of the second water transport scenario monitoring network is improved, each iteration of the neural network is positive, making the training of the neural network more stable and directional. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flow chart of a water transport scene monitoring method based on deep learning provided in an embodiment of the present application.
[0015] Figure 2 It is a schematic diagram of the composition of a detection system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The execution subject of the water transport scene monitoring method based on deep learning in the embodiment of the present application is a detection system, including but not limited to a server, a personal computer, a laptop, a tablet computer, a smart phone, etc. Figure 1 As shown, the method includes:
[0017] Step S100: Acquire a target water transport scene image.
[0018] In the embodiment of the present application, step S100 captures, collects or receives image data related to water transport scenes from various sources. For example, suppose a port management department wants to use deep learning technology to monitor the safety status of its port area, including personnel activities, ship dynamics and possible safety hazards. In this case, the detection system obtains the target water transport scene image of the port area in real time or regularly.
[0019] The port management department can install surveillance cameras in key areas (such as waterway entrances, docks, cargo storage areas, etc.). These cameras can capture real-time video streams of the port area around the clock. Then, the detection system extracts key frames from the video streams captured by these cameras as target water transport scene images through the video stream processing module. It can be understood that the video stream processing module extracts key frames, which is a prior art and can be performed using any feasible module. In the subsequent detection system structure examples, especially Figure 2 In the figure, only the basic architecture of the detection system is shown, and the video stream processing module is not shown separately. These key frames may include scenes such as personnel activities, ship docking, cargo loading and unloading, etc. In addition, in addition to real-time monitoring cameras, the detection system may also obtain water transport scene images from other sources. For example, the port management department may have aerial images or satellite images from historical periods, which can be used to build a three-dimensional model of the port area or reconstruct the scene. The detection system can extract target water transport scene images from these images through image processing technology to assist in the training and testing of the monitoring network.
[0020] Taking a specific dock area as an example, the surveillance camera captures a video stream showing the scene of ships docking, loading and unloading cargo, and personnel activities. The detection system extracts a frame of image from this video stream at a certain time interval (such as every second) through the video stream processing module. These extracted images are the target water transport scene images, which contain real-time dynamic information of the dock area.
[0021] At the same time, the detection system can also obtain aerial images of the dock area from the historical database of the port management department. These aerial images show the overall layout and main facilities of the dock area and can be used as auxiliary data for training the water transport scene monitoring network. The detection system uses image processing technologies such as target detection and image segmentation to extract key areas or objects (such as docks, ships, cargo piles, etc.) from these aerial images and generate target water transport scene images.
[0022] Step S200: Load the target water transport scene image into the target water transport scene monitoring network, perform water transport scene recognition based on the target water transport scene monitoring network, and obtain an abnormal recognition result.
[0023] In the embodiment of the present application, step S200 loads the acquired target water transport scene image into the trained target water transport scene monitoring network, and performs water transport scene recognition through the network, and finally obtains the abnormal recognition result. For example, suppose that a port management department has deployed a water transport scene monitoring system based on deep learning. The main task of the system is to identify various abnormal events in the port area in real time, such as restricted area intrusions, fire incidents, and not wearing a helmet. In order to achieve this function, the detection system first obtains the target water transport scene image through the surveillance camera.
[0024] In step S200, the detection system first loads the acquired target water transport scene image into the trained target water transport scene monitoring network. This monitoring network is usually a deep learning model, such as a convolutional neural network (CNN) or a combination of a recurrent neural network (RNN) and a CNN. After being trained on a large number of water transport scene images, the model has learned how to extract key features from images and identify abnormal events.
[0025] Once the target water transport scene images are loaded into the monitoring network, the network begins to automatically process these images. Specifically, the images can be forward propagated, and high-level semantic features in the images can be extracted through multi-layer convolution, pooling, activation and other operations. These feature vectors contain key information of the image and help the network identify abnormal events. Then, the extracted feature vectors are input into the classification layer or the detection layer. The classification layer is usually a fully connected layer used to map feature vectors to different abnormal event categories. The detection layer may be a more complex structure used to locate and identify the specific location and type of abnormal events in the image. Finally, the monitoring system will obtain the abnormality recognition results based on the output results of the network. These results may include information such as the category, location, and timestamp of the abnormal event. For example, if the monitoring system identifies that a fire event has occurred in a certain area, it will output a result containing the fire category, location (such as coordinates or area identification) and timestamp. Through the execution of step S200, the detection system can realize real-time recognition and abnormality detection of water transport scenes, and provide timely and accurate safety monitoring services for port management departments.
[0026] It can be understood that the training accuracy of the target water transport scene monitoring network directly determines the accuracy of anomaly recognition. When training the target water transport scene monitoring network, high-quality and sufficient samples are the prerequisites for accurate training. However, training images with anomalies are not easy to collect in actual situations, and the labeling work after collection also consumes a lot of manpower costs. The present application also provides a training process for the target water transport scene monitoring network to overcome these problems. Specifically, the training process for the target water transport scene monitoring network provided in the embodiment of the present application includes the following steps:
[0027] Step S10: obtaining a first water transport scene training image and an augmented image construction guidance example corresponding to the first water transport scene training image, wherein the augmented image construction guidance example is configured to guide construction of a second water transport scene training image containing consistent image semantics with the first water transport scene training image.
[0028] In an embodiment of the present application, step S10 involves data preparation and preprocessing. Specifically, in this step, the detection system needs to perform the following operations: obtain the first water transport scene training images, and the augmented image construction guidance examples corresponding to these images. These guidance examples are designed to guide how to construct a second water transport scene training image that is consistent with the original training image in image semantics, thereby enhancing the generalization ability and robustness of the model. For example, in the actual application of water transport scene monitoring, such as security monitoring of ports, waterways or docks, the detection system first needs to collect a large number of water transport scene training images. These images may come from surveillance cameras, historical records or simulations, covering various normal and abnormal water transport scenes, such as ship navigation, personnel activities, cargo loading and unloading, etc. These images form the basis of the first water transport scene training images.
[0029] However, relying solely on these original training images may not be enough to train a model with superior performance, because the changes in real scenes are complex and diverse. In order to increase the generalization ability of the model, more training data needs to be generated, which is where the augmented image construction guidance examples come into play. Augmented image construction guidance examples are, for example, a set of rule descriptions, such as text or labels, which define how to transform the original training images to generate new training data. These transformations may include rotation, scaling, translation, brightness adjustment, contrast adjustment, adding noise, etc., but the key is that these transformations do not change the key semantic information in the image, that is, the water transport scene content expressed by the image.
[0030] For example, suppose there is a first water transport scene training image showing a worker on a dock without a helmet. The augmented image construction guidance example may instruct the detection system to perform the following transformations: Slight rotation: Rotate the image a few degrees to simulate the scene observed from different angles. Scaling: Enlarge or reduce the image by a certain ratio to simulate the shooting effect at different distances. Brightness adjustment: Increase or decrease the brightness of the image to simulate scenes under different lighting conditions. Contrast adjustment: Change the contrast of the image to make the image look clearer or blurrier. Through these transformations, the detection system can generate multiple second water transport scene training images that are semantically consistent with the original images but visually different. These augmented images are used together with the original images to train the water transport scene monitoring network, which helps to improve the robustness and generalization ability of the network.
[0031] Step S20: constructing a water transport scene image for the first water transport scene training image based on the augmented image construction guidance example through the water transport scene construction network to obtain a plurality of second water transport scene training images.
[0032] In the embodiment of the present application, step S20 generates more training data by using the water transport scene construction network and the augmented image construction guide example. The goal of this step is to obtain multiple second water transport scene training images that are consistent with the original image in image semantics but visually different, by transforming and augmenting the first water transport scene training image, thereby improving the generalization ability and robustness of the water transport scene monitoring network.
[0033] For example, in the application of water transport scene monitoring, the detection system first obtains the first water transport scene training images, which are usually from real surveillance cameras or simulations. At the same time, the detection system also obtains augmented image construction guidance examples corresponding to these images, which contain rules or algorithms for guiding how to transform the original images. In step S20, the detection system uses a water transport scene construction network to implement these transformations. The water transport scene construction network can be a generative model based on deep learning, such as a generative adversarial network (GAN) or a variational autoencoder (VAE). This network is trained to learn the distribution of the original image and generate new images that are semantically similar to the original image.
[0034] During the augmented image construction process, the detection system first determines the type and parameters of transformations required for the first water transport scene training image based on the augmented image construction guidance example. For example, the guidance example may indicate operations such as rotation, scaling, translation, and brightness adjustment of the image. The detection system then applies these transformation operations to the water transport scene construction network, allowing the network to generate new water transport scene images based on the guidance examples. Through this process, the detection system can obtain multiple second water transport scene training images. These images may be visually different from the original images, but because they are generated based on the augmented image construction guidance examples, they are consistent with the original images in terms of image semantics. For example, if the original image shows a cargo ship traveling in a waterway, the generated second water transport scene training image may show the cargo ship traveling at different angles and under different lighting conditions, but the key semantic information of the cargo ship and the waterway remains unchanged.
[0035] Assume that there is a first water transport scene training image showing a worker loading and unloading cargo at the dock. The augmented image construction guide example indicates to perform the following transformations on this image: Rotation: Rotate the image by a few degrees to simulate the effects of shooting at different angles. Brightness adjustment: Increase or decrease the brightness of the image to simulate scenes under different lighting conditions.
[0036] The detection system applies these transformation operations to the water transport scene construction network. Based on the guidance examples, the network generates multiple training images of the second water transport scene. One image may show workers performing loading and unloading operations at a slightly tilted angle, while another image may show workers still performing loading and unloading operations under darker lighting conditions. These generated images are visually different from the original images, but they all express the same semantic information - workers are performing cargo loading and unloading operations at the dock. These augmented images are used together with the original images to train the water transport scene monitoring network, which helps to improve the generalization and robustness of the network.
[0037] Step S30: Optimizing the first water transport scene monitoring network based on a plurality of second water transport scene training images to obtain a second water transport scene monitoring network.
[0038] In the embodiment of the present application, step S30 uses a plurality of augmented second water transport scene training images to tune the initial first water transport scene monitoring network to obtain a second water transport scene monitoring network with better performance. For example, in water transport scene monitoring, the detection system first generates a plurality of augmented second water transport scene training images by acquiring and processing the original water transport scene images. These augmented images not only expand the size of the training data set, but also increase the diversity of the data, which helps to improve the generalization ability of the model.
[0039] In step S30, the detection system uses these augmented second water transport scene training images as input to tune the initial first water transport scene monitoring network. The first water transport scene monitoring network is usually a pre-designed deep learning model, such as a convolutional neural network (CNN) or a combination of a recurrent neural network (RNN) and a CNN, which is used to identify abnormal events in water transport scenes. The tuning process usually includes steps such as forward propagation, back propagation, and parameter update. In the forward propagation stage, the augmented training image is forward calculated through the network model to obtain the predicted output of the network. Then, the predicted output is compared with the true label to calculate the loss function value. In the back propagation stage, the gradient is calculated based on the loss function value, and the gradient is back propagated to each layer of the network to update the network parameters. Through multiple iterations of this process, the network gradually learns how to extract key features from the water transport scene images and accurately identify abnormal events.
[0040] During the tuning process, the network first calculates the predicted output of each augmented image through forward propagation, that is, determines whether there are people in the image who are not wearing helmets. Then, the predicted output is compared with the true label (that is, whether there are people in the image who are not wearing helmets) to calculate the loss function value. The loss function value reflects the accuracy of the network's prediction. The smaller the value, the more accurate the prediction. Next, in the back-propagation stage, the detection system calculates the gradient based on the loss function value and back-propagates the gradient to each layer of the network. Parameters such as weights and biases in the network are updated through the gradient descent algorithm or other optimization algorithms. This process is repeated many times until the network's performance on the validation set reaches the preset standard or the maximum number of iterations is reached.
[0041] After optimization, the first water transport scene monitoring network was used to obtain the second water transport scene monitoring network with better performance. This new network has higher accuracy and stronger generalization ability when identifying abnormal events such as personnel not wearing helmets. It will be used in actual water transport scene monitoring to provide timely and accurate safety monitoring services for port management departments.
[0042] Step S40: Perform a neural network performance test on the second water transport scenario monitoring network to obtain neural network performance test information.
[0043] In the embodiment of the present application, step S40 performs a performance test on the optimized second water transport scenario monitoring network to ensure that the network can achieve the expected effect in actual application.
[0044] For example, in the process of training the water transport scene monitoring network, after the optimization in step S30, the detection system obtains a second water transport scene monitoring network with better performance. However, simply optimizing cannot fully guarantee that the performance of the network meets the expected standards, so performance testing is required.
[0045] In step S40, the detection system first prepares a set of learning samples of water transport scene images to be tested. These samples are usually collected from actual water transport scenes and cover various normal and abnormal situations. At the same time, each learning sample is equipped with a corresponding learning sample to be tested, that is, a true label, for comparison with the network prediction results. Next, the detection system inputs the learning sample of the water transport scene image to be tested into the second water transport scene monitoring network, allowing the network to perform forward propagation calculations and output the prediction results of abnormal events in the image. Then, the detection system compares these prediction results with the corresponding learning samples to be tested (true labels) and calculates the performance of the network in various indicators. These performance indicators may include accuracy, recall rate, F1 score, etc., which are used to comprehensively evaluate the performance of the network in identifying different abnormal events. In addition, in order to more intuitively display the performance of the network, the detection system can also draw visualization charts such as confusion matrix and ROC curve.
[0046] For example, assume that the main task of the second water transport scene monitoring network is to identify abnormal events in which people in the port area do not wear helmets. In step S40, the detection system prepares a set of learning samples of water transport scene images to be verified, including scenes in which people are not wearing helmets, and equips each sample with a corresponding learning sample to be verified (i.e., the real label of whether there is a person not wearing a helmet). Then, the detection system inputs these learning samples into the second water transport scene monitoring network, allows the network to perform forward propagation calculations, and outputs the prediction results of whether there is a person not wearing a helmet in the image. Next, the detection system compares the prediction results with the real labels and calculates the performance of the network in terms of accuracy, recall and other indicators.
[0047] Assuming the network has an accuracy of 95% and a recall of 90% on 100 test examples, this means that the network can correctly identify 95% of the people who are not wearing helmets, and among all the people who are not wearing helmets, the network can identify 90%. These performance indicators provide the port management department with intuitive information about the network performance, helping them to determine whether the network meets actual needs. If the performance does not meet the requirements, the performance can be improved by further tuning or retraining the network.
[0048] Step S50: Based on the neural network performance test information, the first water transport scenario monitoring network is iterated to obtain the target water transport scenario monitoring network.
[0049] In an embodiment of the present application, step S50 iterates the first water transport scene monitoring network based on the neural network performance test information to obtain a target water transport scene monitoring network with better performance.
[0050] For example, in the final stage of the water transport scene monitoring network training, after the performance test of step S40, the detection system obtains the performance test information about the second water transport scene monitoring network. This information includes indicators such as the accuracy, recall rate, F1 score, etc. of the network in identifying various abnormal events, as well as visualization charts such as confusion matrix and ROC curve, which fully reflect the performance of the network. In step S50, the detection system decides whether to iterate the first water transport scene monitoring network based on these performance test information. The iterative process actually uses the training results of the second water transport scene monitoring network to update and optimize the parameters and structure of the first water transport scene monitoring network. Specifically, if the performance test information shows that the performance of the second water transport scene monitoring network has been significantly improved compared with the first water transport scene monitoring network, then the detection system will copy the parameters and structure of the second water transport scene monitoring network to the first water transport scene monitoring network to complete the iteration of the network. In this way, the first water transport scene monitoring network obtains the performance advantage of the second water transport scene monitoring network and becomes the target water transport scene monitoring network with better performance. However, if the performance test information shows that the performance of the second water transport scenario monitoring network has not been significantly improved, or even has decreased, the detection system will choose not to iterate and maintain the original state of the first water transport scenario monitoring network. This is because blind iteration may introduce new errors or cause performance degradation, so iteration must be based on performance test information to ensure that each iteration is positive and beneficial.
[0051] For example, assume that the second water transport scenario monitoring network has an accuracy rate of 98% in identifying abnormal events of personnel not wearing helmets, while the accuracy rate of the first water transport scenario monitoring network is 95%. In step S50, the detection system determines that the performance of the second water transport scenario monitoring network has been significantly improved based on these performance test information. Therefore, the detection system decides to copy the parameters and structure of the second water transport scenario monitoring network to the first water transport scenario monitoring network to complete the iteration of the network.
[0052] After the iteration is completed, the first water transport scene monitoring network becomes the new target water transport scene monitoring network, and its performance has been significantly improved. In subsequent water transport scene monitoring tasks, the target water transport scene monitoring network will show higher accuracy and stronger generalization ability, providing more accurate and reliable safety monitoring services for port management departments.
[0053] In one embodiment, step S40, performing a neural network performance test on the second water transport scenario monitoring network to obtain neural network performance test information may specifically include:
[0054] Step S41: Acquire the water transport scene image learning sample to be inspected and the learning sample to be verified corresponding to the water transport scene image learning sample to be inspected.
[0055] In the embodiment of the present application, the purpose of step S41 is to perform performance testing on the optimized water transport scenario monitoring network to ensure that it can accurately identify abnormal events in water transport scenarios in actual applications.
[0056] For example, in step S41, the detection system prepares a set of learning samples of water transport scene images to be inspected. These samples are usually real image data collected from actual water transport scenes, covering various normal and abnormal water transport scenes, such as ship navigation, personnel activities, cargo loading and unloading, etc. In order to ensure the comprehensiveness and accuracy of the inspection, these samples should be diverse, including different time, weather, lighting conditions and different types of abnormal events. Taking port monitoring as an example, the learning samples of water transport scene images to be inspected may include: images showing normal navigation of ships as samples of normal conditions. Images showing personnel activities in the dock area without wearing safety helmets as samples of personnel safety violations. Images showing fires in the port area as samples of fire events. At the same time, each learning sample of water transport scene images to be inspected needs to be equipped with corresponding learning samples to be verified, that is, real labels. These real labels are manually annotated to indicate whether there are abnormal events in the image and the type of abnormal events. In the above example, the real label may be "normal navigation", "no safety helmet" or "fire", etc.
[0057] For example, assume that the detection system has collected the following learning examples of water transport scenes to be inspected and the corresponding learning examples to be verified: Image example 1: An image showing a ship sailing normally in a waterway. Learning example to be verified: labeled as "normal sailing". Image example 2: An image showing people loading and unloading cargo without wearing helmets in the dock area. Learning example to be verified: labeled as "not wearing helmets". Image example 3: An image showing a fire in the port area with flames burning. Learning example to be verified: labeled as "fire".
[0058] In step S41, the detection system will obtain these water transport scene image learning samples and corresponding verification learning samples to prepare for the subsequent performance test steps. These samples and labels will be used to verify whether the tuned water transport scene monitoring network can accurately identify abnormal events in the image and output correct prediction results.
[0059] Step S42: Perform image anomaly classification prediction on the water transport scene image learning samples to be tested through the second water transport scene monitoring network to obtain anomaly classification prediction results.
[0060] In the embodiment of the present application, step S42 uses the tuned second water transport scene monitoring network to perform image anomaly classification prediction on the water transport scene image learning samples to be inspected, thereby evaluating the performance of the network.
[0061] For example, in step S42, the previously prepared learning samples of the water transport scene images to be tested are input into the second water transport scene monitoring network. These samples are usually real image data collected from actual water transport scenes, covering various normal and abnormal water transport scenes. The second water transport scene monitoring network is usually a model based on deep learning, such as a convolutional neural network (CNN) or a combination of a recurrent neural network (RNN) and a CNN. This network has been tuned with a large amount of training data and has the ability to extract features from water transport scene images and classify abnormal events.
[0062] When the image learning samples of the water transport scene to be tested are input into the network, the network will perform forward propagation calculations. Specifically, the network will extract features from the input image and convert the key information in the image into feature vectors or feature maps. These features are then sent to the classification layer or detection layer for classification prediction of abnormal events. For example, suppose there is a second water transport scene monitoring network that has been trained to identify a variety of abnormal events in water transport scenes, such as personnel not wearing safety helmets, fires, etc. Now, there is a set of image learning samples of water transport scenes to be tested, including: Image Sample 1: shows a worker performing cargo loading and unloading operations at the dock without wearing a safety helmet. Image Sample 2: shows that everything is normal in the port area and no abnormal events have occurred.
[0063] In step S42, the detection system inputs the two image samples into the second water transport scene monitoring network. The network first extracts features from the image and converts key information in the image (such as personnel, helmets, flames, etc.) into feature vectors or feature maps. These features are then sent to the classification layer for classification prediction.
[0064] For image example 1, the network may output a prediction indicating that there is an abnormal event in the image that the person is not wearing a helmet. This prediction may be a probability distribution, indicating the possibility that the image belongs to different categories. In this example, the network may assign a higher probability value to the category "not wearing a helmet". For image example 2, the network may output a prediction indicating that there is no abnormal event in the image, that is, everything is normal. Similarly, this prediction is also a probability distribution, but in this example, the probability value of the "normal" category will be relatively high.
[0065] Through this process, the detection system obtains the abnormal classification prediction results of each water transport scene image learning sample to be tested. These prediction results will be used in the subsequent performance test step (such as step S43) to evaluate the performance of the second water transport scene monitoring network.
[0066] Step S43: Based on the abnormal classification prediction results and the learning samples to be verified, the neural network performance test information for testing the neural network performance of the second water transport scenario monitoring network is obtained.
[0067] In an embodiment of the present application, step S43 performs a performance evaluation on the second water transport scene monitoring network based on the abnormal classification prediction results and the quasi-verification learning samples obtained in the previous step S42, and generates neural network performance verification information. For example, in step S43, the detection system first obtains the abnormal classification prediction results of the second water transport scene monitoring network for the quasi-verification water transport scene image learning samples. These prediction results include the network's judgment on abnormal events in each image sample, such as whether there are people who are not wearing helmets, whether a fire has occurred, etc. At the same time, the detection system also obtains the quasi-verification learning samples corresponding to these image samples, that is, the real label information, for comparison with the network prediction results. Next, the detection system compares the abnormal classification prediction results and the quasi-verification learning samples, and calculates the performance of the network in various indicators. These indicators usually include accuracy, recall rate, F1 score, etc., which are used to comprehensively evaluate the performance of the network in identifying different abnormal events.
[0068] Take accuracy as an example. It indicates the probability that the network correctly identifies an abnormal event. Assuming that the network predicts 100 image samples, and the prediction results of 95 samples are consistent with the sample to be verified, the accuracy of the network is 95%. This accuracy reflects the overall performance of the network. In addition to accuracy, recall and F1 scores are also important performance indicators. Recall indicates the proportion of all real abnormal events that the network can identify; F1 score is the harmonic mean of accuracy and recall, which is used to comprehensively evaluate the performance of the network.
[0069] For example, suppose there are the following image learning samples of water transport scenes to be verified and the corresponding learning samples to be verified: Image sample 1: It shows that there are people working at the dock without wearing helmets. Learning sample to be verified: No helmets. Abnormal classification prediction result: No helmets (correct prediction). Image sample 2: It shows that the ship is sailing normally. Learning sample to be verified: Normal sailing. Abnormal classification prediction result: Normal sailing (correct prediction). Image sample 3: It shows that there is a fire in the port area. Learning sample to be verified: Fire. Abnormal classification prediction result: Fire (correct prediction). Image sample 4: It shows that there are people working normally at the dock, but the network mistakenly predicts that they are not wearing helmets. Learning sample to be verified: Normal operation. Abnormal classification prediction result: No helmets (wrong prediction).
[0070] Based on the above examples and prediction results, the detection system can calculate the performance indicators of the second water transport scenario monitoring network. Assuming that 98% of the predictions of the network are correct in all samples, the accuracy of the network is 98%. If we further analyze the recall rate and F1 score, we can also get the specific performance of the network in identifying different abnormal events.
[0071] These performance indicators will be used as neural network performance test information to evaluate the performance of the second water transport scene monitoring network. If the performance meets the requirements, the network can be used in actual water transport scene monitoring tasks; if the performance does not meet the requirements, the network may need to be further tuned or retrained.
[0072] In one embodiment, the learning sample to be verified is a priori mark of abnormal information corresponding to the learning sample to be verified for the water transport scene image. Based on this, step S43, based on the abnormal classification prediction result and the learning sample to be verified, obtains the neural network performance test information for the second water transport scene monitoring network for neural network performance test, including:
[0073] Step S431: Obtain the information error between the abnormal classification prediction result and the abnormal information priori mark, compare the information error with the set critical error value, and obtain a first critical value comparison result.
[0074] In the embodiment of the present application, step S431 calculates the information error between the abnormal classification prediction result and the abnormal information prior mark, and compares it with the set critical error value.
[0075] In the calculation of information error, commonly used loss functions include cross-entropy loss and mean squared error loss. In water transport scene monitoring, since the problem being dealt with is classification (determining whether there are abnormal events in the image and their types), the cross-entropy loss function is more applicable. In the embodiment of the present application, the formula of the loss function can be as follows:
[0076] ;
[0077] Where: L represents information error; N represents the number of samples, that is, the number of water transport scene image learning samples to be tested; yi represents the true label of the ith sample (abnormal information prior label), usually one-hot encoding is used. For example, for a binary classification problem, if the sample belongs to the positive class (abnormal event exists), then yi = [1, 0], if it belongs to the negative class (no abnormal event exists), then yi = [0, 1]; pi represents the predicted probability distribution of the ith sample, that is, the abnormal classification prediction result output by the second water transport scene monitoring network. For example, for a binary classification problem, pi may be [0.8, 0.2], indicating that the network believes that the probability that the sample belongs to the positive class is 0.8 and the probability that it belongs to the negative class is 0.2.
[0078] After calculating the loss value L, the detection system compares it with the set critical error value. The critical error value is a preset threshold used to determine whether the network performance meets the requirements. This threshold is usually set according to the specific application scenario and performance requirements.
[0079] The comparison process can be simply described as: if L≤critical error value, the network performance is considered good and the loss is within an acceptable range; if L>critical error value, the network performance is considered poor and needs further tuning or retraining. For example, suppose there is a two-classification water transport scene monitoring network used to determine whether there is an abnormal event in the image where a person is not wearing a helmet. There are the following two water transport scene image learning samples to be tested and their corresponding abnormal information prior labels: Image sample 1: It shows that a person is not wearing a helmet. Abnormal information prior label (true label): ([1, 0]) indicates that there is an abnormal event (not wearing a helmet). Abnormal classification prediction result: Network output ([0.9, 0.1]) indicates that the network believes that the probability that the sample belongs to the positive class is 0.9. Image sample 2: It shows that the person is working normally and wearing a helmet. Abnormal information prior label (true label): ([0, 1]) indicates that there is no abnormal event. Abnormal classification prediction result: Network output ([0.1, 0.9]) means that the network believes that the probability that the sample belongs to the negative class is 0.9. For these two samples, the cross entropy loss function can be used to calculate the loss value (L). Assuming that the critical error value is set to 0.1, the calculated loss value L is compared with 0.1 to determine whether the network performance meets the requirements.
[0080] Step S432: In response to the first critical value comparison result that the information error is not greater than the set critical error value, neural network performance inspection information is obtained based on the first critical value comparison result, indicating that the neural network performance of the second water transport scenario monitoring network is improved.
[0081] In the embodiment of the present application, step S432 determines whether the performance of the second water transport scenario monitoring network is improved based on the comparison result of the information error and the critical error value.
[0082] For example, in step S431, the detection system has calculated the information error between the abnormal classification prediction result and the abnormal information prior label, and compared it with the set critical error value. If the information error is not greater than the critical error value, it means that the second water transport scene monitoring network performs well on the water transport scene image learning sample to be tested, and the prediction result is relatively consistent with the true label.
[0083] In step S432, the detection system determines whether the network performance has been improved based on the comparison result. Specifically, if the information error is not greater than the critical error value, the detection system considers that the network performance has met or exceeded the preset standard, that is, the network performance has been improved.
[0084] To verify this, the detection system generates corresponding neural network performance test information. This information usually includes performance indicators such as loss value, accuracy, recall rate, F1 score, etc., which are used to comprehensively evaluate the performance of the network. For example, the detection system may output performance test information similar to the following: "The loss value of the second water transport scenario monitoring network on the test set is 0.08, the accuracy is 98%, the recall rate is 97%, and the F1 score is 0.975. Based on this information, it can be judged that the performance of the network has been improved."
[0085] For example, suppose there is a water transport scene monitoring network used to monitor abnormal events in which personnel in the port area do not wear helmets. During the training process, a set of learning samples of water transport scene images to be tested and their corresponding abnormal information prior markers are used to evaluate the performance of the network. After calculation and comparison in step S431, the information error is 0.06, while the set critical error value is 0.1. Since 0.06 is not greater than 0.1, proceed to step S432.
[0086] In step S432, the detection system determines that the performance of the network has been improved based on this comparison result, and generates corresponding neural network performance test information. Assume that the accuracy of the network on the test set is 98%, the recall rate is 97%, and the F1 score is 0.975. These performance indicators show that the network has high accuracy and reliability in identifying abnormal events in which people are not wearing helmets. Based on this information, it can be concluded that the performance of the second water transport scene monitoring network has been improved and can be used in actual water transport scene monitoring tasks. At the same time, these performance test information also provides an important reference for subsequent network tuning and deployment.
[0087] Step S433: In response to the first critical value comparison result being that the information error is greater than the set critical error value, neural network performance inspection information is obtained based on the first critical value comparison result, indicating that the neural network performance of the second water transport scenario monitoring network has not been improved.
[0088] In an embodiment of the present application, when the first critical value comparison result shows that the information error is greater than the set critical error value, the detection system will, based on this comparison result, conclude that the neural network performance of the second water transport scenario monitoring network has not been improved, and generate corresponding neural network performance test information.
[0089] For example, in step S431, the detection system calculates the information error (loss) between the abnormal classification prediction result and the abnormal information prior label, and compares it with the preset critical error value. If the information error is greater than the critical error value, it means that when the network predicts abnormal events of the water transport scene image learning sample to be tested, there is a large deviation between the network and the true label, that is, the performance of the network fails to meet the preset standard.
[0090] In step S433, the detection system determines that the performance of the second water transport scenario monitoring network has not been improved based on the comparison result. This is because the large information error indicates that the network has problems in feature extraction, classification or detection, resulting in inaccurate prediction results. In order to verify this judgment, the detection system generates corresponding neural network performance test information.
[0091] For example, suppose there is a water transport scene monitoring network for monitoring abnormal fire events in the port area. During the training process, a set of water transport scene image learning samples and their corresponding abnormal information prior labels are used to evaluate the performance of the network. After calculation and comparison in step S431, the information error is 0.25, while the set critical error value is 0.1. Since 0.25 is greater than 0.1, go to step S433.
[0092] In step S433, the detection system determines that the performance of the second water transport scenario monitoring network has not been improved, and generates corresponding neural network performance test information. Assume that the network has an accuracy of 85%, a recall rate of 80%, and an F1 score of 0.82 on the test set. These performance indicators show that the network has certain errors and omissions in identifying abnormal fire events. Based on this information, it can be concluded that the performance of the second water transport scenario monitoring network has not been improved and further tuning or retraining is required. At the same time, these performance test information also provides an important reference for subsequent network improvements. For example, it is possible to analyze in which aspects the network's prediction results are inaccurate, and then adjust the network structure, optimize hyperparameters, or increase training data to improve the performance of the network.
[0093] In another embodiment, the to-be-verified learning sample is a to-be-verified water transport scene image learning sample that contains consistent image semantics with the to-be-verified water transport scene image learning sample. Based on this, step S43, based on the abnormal classification prediction result and the to-be-verified learning sample, obtains the neural network performance test information for the second water transport scene monitoring network for neural network performance test, which may include:
[0094] Step S43A: Obtain the matching score between the abnormal classification prediction result and the water transport scene image learning sample to be verified, and compare the matching score with the set critical matching score to obtain a second critical value comparison result.
[0095] In an embodiment of the present application, step S43A calculates the matching score between the abnormal classification prediction result and the water transport scene image learning sample to be verified, and compares the score with the set critical matching score to determine the consistency between the prediction result and the actual scene. For example, in step S43A, the detection system first obtains the abnormal classification prediction result of the second water transport scene monitoring network for the water transport scene image learning sample to be verified. These prediction results generally include the classification of abnormal events in the image and the location information of the abnormal events. At the same time, the detection system also prepares water transport scene image learning samples to be verified that contain consistent image semantics with the samples to be verified. These samples to be verified are known actual scene images for comparison with the prediction results.
[0096] In order to evaluate the consistency between the prediction results and the actual scene, the detection system needs to calculate the matching score between the prediction results and the samples to be verified. This matching score is actually a similarity metric that quantifies the semantic proximity between the prediction results and the samples to be verified. There are many ways to calculate the matching score, but they usually involve two steps: feature extraction and similarity calculation. First, the detection system uses a feature extraction algorithm to extract key features from the prediction results and the samples to be verified. These features can be visual features such as color, texture, shape, etc. of the image, or high-level semantic features extracted by a deep learning model. The extracted features are represented in the form of feature vectors. Next, the detection system uses a similarity calculation algorithm to compare the similarity between the feature vectors of the prediction results and the feature vectors of the samples to be verified. Commonly used similarity calculation methods include cosine similarity, Euclidean distance, etc. These methods can be selected according to the specific form and requirements of the feature vectors.
[0097] For example, suppose that cosine similarity is used to calculate the matching score. For each prediction result and the corresponding quasi-verification sample, the detection system first extracts their feature vectors and then calculates the cosine similarity between the two vectors. The value range of cosine similarity is between [-1,1], and the closer the value is to 1, the more similar the two vectors are. For example, suppose there is a water transport scene monitoring network for detecting abnormal fire events in the port area. In step S43A, there is a set of quasi-verification samples showing the fire scene in the port area, and the corresponding quasi-verification samples are also fire scenes but contain different flame forms and smoke diffusion conditions. For each quasi-verification sample, the network outputs an abnormal classification prediction result, including the classification of the fire event and the location information of the flame and smoke. At the same time, there is a quasi-verification sample corresponding to the quasi-verification sample, which shows the actual fire scene. The system first uses a feature extraction algorithm to extract key features from the prediction result and the quasi-verification sample to obtain two feature vectors. Then, the detection system calculates the cosine similarity between the two feature vectors as the matching score. Assume that the matching score of a certain prediction result is 0.95, which means that the prediction result and the quasi-verification sample are very close in image semantics. Next, the detection system compares the match score with the set critical match score. If the match score is not less than the critical match score (for example, 0.9), the system believes that the predicted result is consistent with the actual scenario and the network performance is good. On the contrary, if the match score is less than the critical match score, the system believes that there is a large difference between the predicted result and the actual scenario and the network performance needs to be improved.
[0098] In this way, step S43A effectively evaluates the performance of the second water transport scenario monitoring network in abnormal event detection and provides a basis for subsequent network tuning.
[0099] Step S43B: In response to the second critical value comparison result being that the matching score is less than the set critical matching score, neural network performance inspection information is obtained based on the second critical value comparison result, indicating that the neural network performance of the second water transport scenario monitoring network has not been improved.
[0100] In the embodiment of the present application, step S43B determines whether the performance of the second water transport scenario monitoring network has not been improved based on the comparison result of the matching score and the critical matching score.
[0101] For example, in step S43A, the detection system has calculated the matching score between the abnormal classification prediction result and the water transport scene image learning sample to be verified, and compared the score with the set critical matching score. If the comparison result shows that the matching score is less than the critical matching score, the system enters step S43B.
[0102] In step S43B, the detection system determines that the performance of the second water transport scene monitoring network has not been improved based on the comparison result. Specifically, a matching score less than the critical matching score means that there is a large difference in image semantics between the prediction result and the sample to be verified, that is, when the network identifies abnormal events in the water transport scene, its prediction result is not consistent with the actual situation.
[0103] The system uses the second water transport scene monitoring network to predict the sample to be tested, and calculates the matching score between the prediction result and the sample to be tested. If the matching score is less than the set critical matching score (for example, 0.8), it means that the network has a large error in identifying abnormal events of not wearing a helmet, and its prediction result is not consistent with the real scene. For example, suppose there is a specific matching score case, in which the matching score between the abnormal classification prediction result and the sample to be tested is 0.75, and the set critical matching score is 0.8. Since 0.75 is less than 0.8, the detection system enters step S43B.
[0104] In step S43B, the detection system determines that the performance of the second water transport scenario monitoring network has not been improved based on this comparison result. The system generates corresponding neural network performance test information, pointing out that the network has deficiencies in identifying abnormal events where personnel are not wearing helmets, and the difference between the prediction results and the actual scenario is large. This performance test information is of great significance for subsequent network tuning and improvement.
[0105] Step S43C: In response to the second critical value comparison result being that the matching score is not less than the set critical matching score, neural network performance verification information is obtained based on the second critical value comparison result, indicating that the neural network performance of the second water transport scenario monitoring network is improved.
[0106] In the embodiment of the present application, step S43C determines whether the performance of the second water transport scenario monitoring network is improved based on the comparison result of the matching score and the critical matching score.
[0107] For example, in step S43A, the detection system calculates the matching score between the abnormal classification prediction result and the water transport scene image learning sample to be verified, and compares the score with the set critical matching score. If the comparison result shows that the matching score is not less than the critical matching score, the system enters step S43C.
[0108] In step S43C, the detection system determines that the performance of the second water transport scene monitoring network has been improved based on the comparison result. Specifically, a matching score not less than the critical matching score means that the predicted result is relatively consistent with the image semantics of the sample to be verified, that is, when the network identifies abnormal events in the water transport scene, its prediction results are consistent with the actual situation, and the network performance meets or exceeds the preset standard.
[0109] The system uses the second water transport scene monitoring network to predict the sample to be tested, and calculates the matching score between the prediction result and the sample to be tested. If the matching score is not less than the set critical matching score (for example, 0.9), it means that the network has a high accuracy in identifying abnormal fire events, and its prediction results are highly consistent with the real fire scene. For example, suppose that during the performance test, the matching score between the abnormal classification prediction result and the sample to be tested is 0.95, and the set critical matching score is 0.9. Since 0.95 is not less than 0.9, the detection system enters step S43C.
[0110] In step S43C, the detection system determines that the performance of the second water transport scene monitoring network has been improved. Based on this judgment, the detection system generates corresponding neural network performance test information, indicating that the network performs well in identifying abnormal fire events, and the prediction results are highly consistent with the actual fire scene. This performance test information is of great significance for evaluating the effect of network training. It shows that the second water transport scene monitoring network has the ability to accurately identify abnormal events in actual water transport scenes and can be used for subsequent monitoring tasks.
[0111] As an implementation mode, step S50, iterating the first water transport scene monitoring network based on the neural network performance test information, may specifically include:
[0112] Step S51: In response to the neural network performance test information indicating that the neural network performance of the second water transport scenario monitoring network is improved, the first water transport scenario monitoring network is iterated into the second water transport scenario monitoring network.
[0113] Alternatively, step S51': in response to the neural network performance test information indicating that the neural network performance of the second water transport scenario monitoring network has not been improved, the first water transport scenario monitoring network is not iterated into the second water transport scenario monitoring network.
[0114] When the neural network performance test information shows that the performance of the second water transport scene monitoring network has been improved, it means that the tuned network performs better in identifying abnormal events in water transport scenes and the prediction results are more accurate. In this case, the detection system chooses to iterate the first water transport scene monitoring network into the second water transport scene monitoring network. Suppose there is a water transport scene monitoring network for monitoring abnormal fire events in port areas. During the training process, there is first an initial first water transport scene monitoring network. After a series of tuning steps, the second water transport scene monitoring network was obtained, and its performance was tested using the image learning samples of the water transport scene to be tested. The performance test results show that the accuracy, recall rate and F1 score of the second water transport scene monitoring network in identifying abnormal fire events have all improved, exceeding the preset performance standards.
[0115] Based on this performance test information, the detection system determines that the performance of the second water transport scene monitoring network has been improved. Therefore, it chooses to iterate the first water transport scene monitoring network into the second water transport scene monitoring network. In this way, a water transport scene monitoring network with better performance is obtained, which can more accurately identify abnormal fire events in the port area.
[0116] On the contrary, if the neural network performance test information shows that the performance of the second water transport scenario monitoring network has not been improved, that is, the performance of the tuned network in identifying abnormal events has not been significantly improved or has even declined, then the detection system chooses not to iterate the first water transport scenario monitoring network into the second water transport scenario monitoring network.
[0117] Continuing with the above example, suppose that in another training process, the first water transport scenario monitoring network was also tuned to obtain the second water transport scenario monitoring network. However, during the performance test phase, it was found that the performance of the second water transport scenario monitoring network in identifying abnormal fire events did not improve, and even declined in some indicators. Based on this performance test information, the detection system determines that the performance of the second water transport scenario monitoring network has not been improved. Therefore, it chooses to maintain the original state of the first water transport scenario monitoring network and does not iterate. This is because blind iteration may cause the network performance to further decline, so the system chooses to retain the first water transport scenario monitoring network with better performance.
[0118] As an implementation, the process of creating an augmented image construction guide example includes the following steps:
[0119] Step S101: Acquire multiple basic augmented image construction guide examples, and construct a corresponding example tag for each basic augmented image construction guide example.
[0120] In step S101 of the embodiment of the present application, the detection system obtains multiple basic augmented image construction guidance examples from a preset database or resource library. These basic examples are usually a set of predefined image transformation rules or algorithms, which can perform various transformations on the original water transport scene images to generate more training data.
[0121] For example, examples of basic augmented image construction guidance may include: randomly rotating the image to simulate shooting effects at different angles. Adjusting the brightness and contrast of the image to simulate scenes under different lighting conditions. Crop or scale the image to simulate observation effects at different viewing angles or distances. Adding noise or blur effects to simulate camera signal interference or weather effects, etc.
[0122] After obtaining these basic examples, the detection system needs to construct corresponding example tags for each example. The example tag is a description or identification of the basic example, which usually contains information such as the transformation type and parameters of the example, which is used for subsequent type determination and screening.
[0123] The process of constructing example tags can be automated or done manually. In the automated construction process, the detection system can extract key information and generate corresponding tags by analyzing the transformation algorithm or rules of the example. For example, for a rotation transformation example, the tag may contain the keyword "rotation" and the specific rotation angle parameter; for a brightness adjustment example, the tag may contain the keyword "brightness" and the ratio parameter of the brightness adjustment.
[0124] For example, suppose there are two basic augmented image construction guidance examples: Rotation transformation example: This example defines the rule of randomly rotating an image by a certain angle. In order to construct the corresponding example tag, the detection system can extract the transformation type "rotation" and the rotation angle range (such as 0-360 degrees), and generate tags such as "rotation_0-360deg". Brightness adjustment example: This example defines the rule of increasing or decreasing the brightness of the image. Similarly, the detection system can extract the transformation type "brightness" and the ratio range of brightness adjustment (such as ±20%), and generate tags such as "brightness_adjust_pm20%".
[0125] By constructing corresponding example tags for each basic augmented image, the detection system can more conveniently classify, filter and manage these examples in subsequent steps, ensuring the diversity and effectiveness of the augmented images, thereby improving the training effect of the water transport scene monitoring network.
[0126] Step S102: for each basic augmented image construction guide example, determine the type based on the example tag to obtain the example type of each basic augmented image construction guide example.
[0127] In the embodiment of the present application, in the process of creating an augmented image construction guide example, step S102 is a key step, which involves determining the type of each example according to the example label of the basic augmented image construction guide example. The purpose of this step is to classify the basic examples so that in the subsequent steps, the appropriate examples can be selected according to the type for image augmentation.
[0128] For example, in step S102, the detection system obtains the example tags of each basic augmented image construction guide example. These tags have been constructed in step S101, and they contain key information such as the transformation type and parameters of the example. Then, the detection system analyzes these tags to determine the type of each example.
[0129] The type determination process is usually based on keywords or semantic information in the example tags. The system will parse and classify the tags according to preset rules or algorithms. For example, if the tag contains the keyword "rotation", the detection system will classify the example as a rotation transformation type; if the tag contains the keyword "brightness", the detection system will classify it as a brightness adjustment type. In an embodiment of the present application, the type of augmented image construction guide example is usually related to the way the image is transformed. Different transformation methods will have different effects on the image, so choosing the right transformation type is crucial to generating an effective augmented image. For example, rotation transformation can simulate shooting effects at different angles, and brightness adjustment can simulate scenes under different lighting conditions. These transformations can help improve the network's adaptability to different environmental conditions.
[0130] For example, suppose there are the following two basic augmented image construction guidance examples and their corresponding example tags: Example 1: The tag is "rotation_0-360deg", which means to randomly rotate the image from 0 to 360 degrees. Type determination: The system parses the "rotation" keyword in the tag and classifies the example as a rotation transformation type. Example 2: The tag is "brightness_adjust_pm20%", which means to adjust the brightness of the image by plus or minus 20%. Type determination: The system parses the "brightness" keyword in the tag and classifies the example as a brightness adjustment type.
[0131] Through the type determination process in step S102, the detection system can accurately classify each basic augmented image construction guidance example into a corresponding type. This provides a basis for selecting appropriate examples for image augmentation according to type in subsequent steps, which helps to generate more diverse augmented images that meet actual needs, thereby improving the training effect of the water transport scene monitoring network.
[0132] Step S103: for each basic augmented image construction guide example, in response to the example type satisfying a set condition, determining the basic augmented image construction guide example as an augmented image construction guide example.
[0133] In the embodiment of the present application, the purpose of step S103 is to screen the basic augmented image construction guidance examples based on preset conditions to ensure that the augmented image construction guidance examples finally selected can effectively improve the effect of network training.
[0134] For example, in step S103, the detection system first evaluates each example according to the type of the basic augmented image construction guide example determined in step S102. The evaluation is based on preset screening conditions, which are usually set according to specific application scenarios and requirements.
[0135] Screening criteria may include but are not limited to the following: Maintaining image semantic consistency: Ensure that the transformed image still retains the key semantic information of the original image, such as key elements such as ships, people, and cargo are still clearly visible after transformation. Increase data diversity: The transformation should be able to generate diverse images to simulate various situations that may occur in actual scenarios, thereby improving the generalization ability of the network. Not introducing too much noise: Avoid introducing too much noise or distortion in the transformation, which will lead to a decrease in the quality of training data.
[0136] Based on these screening conditions, the detection system evaluates each basic augmented image construction guide example. Only when the example type meets all the preset conditions will the example be determined as the final augmented image construction guide example for the subsequent water transport scene image augmentation process.
[0137] For example, suppose there are three examples of basic augmented image construction instructions and their corresponding types:
[0138] Example 1: The type is rotation transformation, marked as "rotation_0-360deg". This example can randomly rotate the image to simulate the effect of shooting at different angles. Since rotation transformation does not change the key semantic information of the image and can increase the diversity of the data, it is likely to meet the filtering criteria. Example 2: The type is crop transformation, marked as "crop_random". This example randomly crops a part of the image. However, if the crop ratio is too large or the position is inappropriate, it may cause the loss of key elements in the image, thereby affecting the semantic information of the image. Therefore, whether this example meets the filtering criteria depends on the specific cropping parameters and strategies. Example 3: The type is noise addition, marked as "noise_add_high_level". This example adds a high level of noise to the image. Although this can increase the diversity of the data, too high a noise level may cause serious image distortion and reduce the data quality. Therefore, this example is likely to not meet the filtering criteria.
[0139] In step S103, the detection system evaluates the three examples according to the preset screening conditions. Assume that the conditions require maintaining image semantic consistency and increasing data diversity without introducing too much noise. Then Example 1 is likely to meet the conditions and is determined as an augmented image construction guidance example; Example 2 needs to be judged based on specific cropping parameters and strategies; and Example 3 is likely to not meet the conditions and is excluded.
[0140] In one implementation, the step of constructing example tags for the guidance examples of the base augmented image includes:
[0141] Step S1011: construct a label for the basic augmented image construction guide example based on global semantics to obtain a first candidate example label.
[0142] In the embodiment of the present application, step S1011 is a key step in constructing the augmented image construction guide example markup, which involves constructing corresponding marks based on the global semantics of the basic augmented image construction guide example. Global semantics refers to the impact of image transformation on the overall structure and content of the entire scene or image.
[0143] For example, in step S1011, the detection system first analyzes the basic augmented image construction guidance examples, which generally define how to transform the original water transport scene image, such as rotation, scaling, brightness adjustment, etc. In order to construct global semantic tags, the detection system needs to understand the impact of these transformations on the entire image structure and content. Taking the rotation transformation as an example, when the water transport scene image is rotated, all elements in the image (such as ships, docks, waters, etc.) will rotate around the center point by a certain angle. This transformation changes the global layout and direction of the image, but usually does not change the local features or attributes of each element in the image. Therefore, this transformation can be classified as a global semantic transformation.
[0144] To construct the first candidate example tag, the detection system performs a global semantic analysis of the rotation transformation example. The system may recognize that the transformation involves a rotation operation of the entire image, and this operation has a significant impact on the global structure of the image. Based on this analysis, the detection system can generate a first candidate example tag that describes the global semantics of the rotation transformation, such as "global_rotation".
[0145] For example, suppose there is the following basic augmented image construction guidance example: rotate the water transport scene image 90 degrees clockwise. In step S1011, the detection system performs a global semantic analysis on this rotation transformation example. The system recognizes that the transformation is a rotation operation performed on the entire image, and the rotation angle is 90 degrees. Since this transformation changes the global layout and direction of the image, it can be classified as a global semantic transformation. Based on this analysis, the detection system can generate a first candidate example tag that describes the global semantics of the rotation transformation: "global_rotation_90deg_clockwise". This tag accurately reflects the impact of the rotation transformation on the global structure of the image, and provides useful information for subsequent classification and screening steps.
[0146] In this way, the detection system can construct guidance examples for the basic augmented images and construct example labels that accurately reflect their global semantic characteristics, which helps to improve the effectiveness and accuracy of water transport scene monitoring network training.
[0147] Step S1012: construct a label for the basic augmented image construction guide example based on local semantics to obtain a second candidate example label.
[0148] In the embodiment of the present application, step S1012 is an important step in constructing the augmented image construction guide example markup, which involves constructing corresponding marks based on the local semantics of the basic augmented image construction guide example. Local semantics mainly focuses on the impact of image transformation on specific areas or elements in the image, rather than the impact on the entire image structure.
[0149] For example, in step S1012, the detection system performs local semantic analysis on the basic augmented image construction guidance examples. These basic examples define how to transform the original water transport scene image, such as brightness adjustment, contrast enhancement, color balance, etc. These transformations often only affect certain local features or attributes of the image without significantly affecting the overall structure. Taking brightness adjustment as an example, when the brightness of the water transport scene image is increased, the overall brightness of the image will increase, but the shape, size and position of each element in the image (such as ships, docks, waters, etc.) will not usually change. This transformation mainly affects the local attributes (brightness) of the image, rather than the global structure. In order to construct a local semantic tag, the detection system analyzes the impact of the transformation on specific areas or elements in the image. In the example of brightness adjustment, the detection system identifies that this transformation mainly affects the brightness attribute of the image without involving changes in other global structures. Based on this analysis, the detection system can generate a second candidate example tag that describes the local semantics of brightness adjustment, such as "local_brightness_increase".
[0150] For example, assume that there is the following example of basic augmented image construction guidance: increase the brightness of a specific area (such as a ship area) in a water transport scene image.
[0151] In step S1012, the detection system performs a local semantic analysis on this brightness adjustment example. The system recognizes that the transformation is a brightness increase process for a specific area (the ship area) in the image, rather than a global brightness adjustment for the entire image. Since this transformation only affects the local properties (brightness) of the image, it can be classified as a local semantic transformation.
[0152] Based on this analysis, the detection system can generate a second candidate example tag that describes the local semantics of the brightness adjustment: "local_brightness_increase_ship_region". This tag accurately reflects the impact of the brightness adjustment on a specific region (ship region) in the image, providing useful information for subsequent classification and screening steps.
[0153] In this way, the detection system can construct guidance examples for the basic augmented images and construct example labels that accurately reflect their local semantic characteristics, which will help to perform more detailed classification and screening based on these labels in subsequent steps, thereby improving the effectiveness and accuracy of water transport scene monitoring network training.
[0154] Step S1013: obtaining a first support coefficient corresponding to the first candidate example mark and a second support coefficient corresponding to the second candidate example mark;
[0155] In the embodiment of the present application, step S1013 obtains a first support coefficient corresponding to the first candidate example tag and a second support coefficient corresponding to the second candidate example tag. These two support coefficients reflect the confidence level of the detection system in the candidate example tag, which helps to select the most accurate example tag later. The following is a detailed explanation of step S1013, and examples are given to assist in the explanation in combination with specific application scenarios.
[0156] For example, in step S1013, the detection system first uses two pre-trained models to obtain the support coefficients of the candidate example tags. These two models are the first tag construction model and the second tag construction model. They have been trained with a large amount of data and can accurately construct candidate example tags based on the global semantics and local semantics of the guide example of the basic augmented image, and output the corresponding support coefficients. Taking the rotation transformation as an example, it is assumed that the first tag construction model outputs the first candidate example tag "global_rotation" and its corresponding first support coefficient of 0.85 (indicating that the system has 85% confidence that this tag is accurate) based on the global semantic analysis. At the same time, the second tag construction model outputs the second candidate example tag "local_orientation_change" (although this tag may not be very accurate in actual applications, it is only used for illustration here) and its corresponding second support coefficient of 0.15 based on the local semantic analysis.
[0157] The first label construction model and the second label construction model are usually composed of deep neural networks or convolutional neural networks. These models learn how to extract key features from the basic augmented image construction guidance examples during the training process, and construct candidate example labels and calculate support coefficients based on these features. In step S1013, the detection system inputs the basic augmented image construction guidance examples into the two models respectively. The first label construction model outputs the first candidate example label and its support coefficient under global semantics, while the second label construction model outputs the second candidate example label and its support coefficient under local semantics.
[0158] For example, continuing with the rotation transformation example, suppose there is a basic augmented image construction guide example, which defines the rule of rotating the water transport scene image 90 degrees clockwise. When this example is input into two pre-trained models: the first label construction model analyzes the impact of the rotation transformation on the global structure of the image and outputs the first candidate example label "global_rotation_90deg_clockwise" and its corresponding first support coefficient 0.9 (indicating that the system has 90% confidence that this label is accurate).
[0159] The second tagging model may try to interpret this transformation from a local semantic perspective, but since the rotation transformation is a global operation, its output may not be very accurate. Assume that it outputs the second candidate example tag "local_orientation_adjustment" and its corresponding second support coefficient 0.2.
[0160] After obtaining these two support coefficients, the detection system can determine which candidate example tag more accurately describes the characteristics of the basic augmented image construction guide example based on their size. In this example, since the first support coefficient (0.9) is much larger than the second support coefficient (0.2), "global_rotation_90deg_clockwise" will be considered a more accurate example tag.
[0161] Step S1014: taking the candidate example marker corresponding to the larger support coefficient between the first support coefficient and the second support coefficient as the example marker.
[0162] In the embodiment of the present application, step S1014 is a key step in determining the final example tag. In this step, the detection system compares the support coefficients of the two candidate example tags (based on global semantics and local semantics), and selects the candidate example tag with a larger support coefficient as the final example tag. For example, in step S1013, the detection system has generated a first candidate example tag and a second candidate example tag for the basic augmented image construction guide example through the pre-trained first tag construction model and the second tag construction model, and calculated their respective support coefficients. These two support coefficients reflect the system's confidence level in each candidate tag. In step S1014, the detection system compares the size of the two support coefficients. If the first support coefficient (the support coefficient of the tag based on global semantics) is larger, it means that the first candidate example tag more accurately describes the characteristics of the basic augmented image construction guide example, so the system will select the first candidate example tag as the final example tag. Conversely, if the second support coefficient (the support coefficient of the tag based on local semantics) is larger, the detection system selects the second candidate example tag.
[0163] For example, suppose there is a basic augmented image construction guide example, which defines a rule for adjusting the brightness of a water transport scene image. In step S1013, the detection system generates the following two candidate example tags and their support coefficients respectively through two pre-trained models:
[0164] The first candidate example tag: "global_brightness_adjustment", has a corresponding first support coefficient of 0.8 (indicating that the system has 80% confidence that this tag is accurate).
[0165] The second candidate example tag: "local_luminance_modification" has a corresponding second support coefficient of 0.6 (indicating that the system has a 60% confidence that this tag is accurate).
[0166] In step S1014, the detection system compares the two support coefficients. Since the first support coefficient (0.8) is greater than the second support coefficient (0.6), the detection system believes that the first candidate example tag "global_brightness_adjustment" more accurately describes the characteristics of the basic augmented image construction guidance example. Therefore, the detection system selects "global_brightness_adjustment" as the final example tag.
[0167] This example labeling will be used in subsequent classification and screening steps to ensure that the most appropriate transformation rules can be selected when augmenting water transport scene images, thereby improving the training effect and accuracy of the water transport scene monitoring network.
[0168] As an implementation manner, step S102, determining the type of the basic augmented image construction guide example based on the example tag to obtain the example type of the basic augmented image construction guide example, includes:
[0169] Step S1021: Perform tag encoding processing on each example tag to obtain a coded tag corresponding to each example tag.
[0170] In an embodiment of the present application, step S1021 is a key step in vectorizing the example tags for subsequent cluster analysis. The purpose of this step is to convert the example tags in text form into numerical vectors that can be directly processed by the detection system, so as to facilitate mathematical calculations and pattern recognition. For example, in step S1021, the detection system first obtains a set of example tags, which are generated in step S101 according to the global semantics and local semantics of the guide example constructed based on the basic augmented image. For example, possible example tags include "global_rotation", "local_brightness_adjustment", etc., which describe different image transformation characteristics. Next, each example tag is encoded and converted into a numerical vector, i.e., an encoded tag. This encoding process usually involves word embedding technology in natural language processing. Word embedding technology can map words or phrases to a high-dimensional continuous vector space, so that semantically similar words are closer in the vector space.
[0171] In the embodiment of the present application, a pre-trained word embedding model such as Word2Vec or GloVe can be used, or a special word embedding model can be trained to process these example tags. For example, suppose there are two example tags: "global_rotation" and "local_brightness_adjustment". In step S1021, the detection system encodes these two tags.
[0172] For the token "global_rotation", the detection system may convert it into a vector similar to the following: [0.1, 0.2, -0.3, 0.4, ..., 0.05]. Each value in this vector represents the characteristics of a word or semantic unit in the token. Although the specific values are learned by the model, it is understandable that this vector captures the semantics of the global rotation transformation of the token "global_rotation" to some extent.
[0173] Similarly, the tag "local_brightness_adjustment" will also be converted into a different vector, for example: [-0.2, 0.1, 0.3, -0.1, ..., 0.15]. This vector captures the semantics of local brightness adjustment. Through this encoding process, the detection system is able to convert text-based example tags into numerical vectors, providing a basis for subsequent clustering analysis. In clustering analysis, the detection system can divide different example tag categories according to the similarity between these vectors, and then determine the type of basic augmented image construction guidance example.
[0174] Step S1022: Based on the matching scores between different encoding tags, all example tags are clustered to obtain multiple example tag classifications.
[0175] In an embodiment of the present application, step S1022 performs cluster analysis on the encoded example tags to divide tags with similar characteristics into the same cluster, thereby forming multiple example tag classifications. The purpose of this step is to classify the basic augmented image construction guidance examples according to the characteristics of the example tags, and provide a basis for the subsequent selection of appropriate examples for image augmentation. For example, in step S1021, the detection system has converted each example tag into a numerical vector (i.e., an encoded tag). These vectors capture the semantic characteristics of the example tags, so that semantically similar tags are closer in the vector space.
[0176] Next, in step S1022, the detection system performs cluster analysis on these coding marks. Clustering is an unsupervised learning method that can divide the samples in the data set into several non-overlapping subsets (called clusters) so that the samples in the same cluster are as similar as possible, while the samples between different clusters are as different as possible. In the embodiment of the present application, cluster analysis can be implemented by various clustering algorithms, such as K-means, hierarchical clustering, DBSCAN, etc. These algorithms measure the distance between the coding marks according to the similarity between them (i.e., matching score), and divide the marks with closer distance into the same cluster.
[0177] For example, suppose there are three encoded label vectors (i.e., numerical representations of example labels), which represent three different image transformation characteristics: rotation transformation: "[0.1, 0.2, -0.3, 0.4, ...]"; brightness adjustment: "[-0.2,0.1, 0.3, -0.1, ...]"; contrast enhancement: "[0.3, -0.1, 0.2, 0.05, ...]".
[0178] In step S1022, the detection system uses a clustering algorithm to perform cluster analysis on these vectors. Assume that the K-means algorithm is used and the number of clusters is set to 2. The K-means algorithm randomly selects two initial centroids (i.e., cluster centers) and then iteratively performs the following steps: assign each vector to the cluster corresponding to the centroid closest to it; for each cluster, calculate the mean of all vectors in the cluster and use the mean as the new centroid. Repeat until the position of the centroid no longer changes significantly or the preset number of iterations is reached.
[0179] After cluster analysis, the detection system may obtain two clusters: one cluster contains the coded markers of rotation transformation and contrast enhancement, because they have certain similarities in certain features (such as both involve global transformation of the image); the other cluster contains the coded markers of brightness adjustment, because it has significant differences in features from the first two markers. In this way, the detection system can classify example markers with similar characteristics into the same cluster, forming multiple example marker classifications. These classifications will serve as the basis for selecting appropriate basic augmented images to construct guidance examples in subsequent steps, which will help improve the training effect and generalization ability of the water transport scene monitoring network.
[0180] Step S1023: based on the example tag category in which the example tag corresponding to the basic augmented image construction guide example is located, obtain the example type of the basic augmented image construction guide example.
[0181] In the embodiment of the present application, step S1023 is a key step to determine the type of the basic augmented image construction guide example. In the previous steps, the detection system has encoded the example tags and performed cluster analysis to form multiple example tag classifications. Step S1023 is based on these classification results to classify the basic augmented image construction guide examples into corresponding example types.
[0182] For example, in step S1023, the detection system first searches for example tags corresponding to each basic augmented image construction guide example. These tags are generated in step S101 and are used to describe the image transformation characteristics of the basic example. Then, the positions of these example tags in the example tag classification formed after cluster analysis in step S1022 are determined.
[0183] Specifically, the detection system assigns the example tag to the closest cluster based on the distance between the encoding vector of the example tag and the centroid vector of each cluster. Since each cluster represents a class of similar image transformation characteristics, the basic augmented image construction guidance examples corresponding to the example tags assigned to the same cluster are classified as examples of the same type.
[0184] For example, suppose there are the following three basic augmented image construction guidance examples and their corresponding example tags: Example 1: rotation transformation, the example tag is "global_rotation". Example 2: brightness adjustment, the example tag is "local_brightness_adjustment". Example 3: contrast enhancement, the example tag is "contrast_enhancement".
[0185] In the cluster analysis of step S1022, these example marks are divided into two clusters: Cluster A includes example marks of rotation transformation and contrast enhancement because they have certain similarities in certain features; Cluster B includes example marks of brightness adjustment.
[0186] In step S1023, the detection system determines the example types of each basic augmented image construction guide example according to the cluster to which the example tag corresponding to the example belongs. Specifically:
[0187] The example tag "global_rotation" of Example 1 belongs to cluster A, so Example 1 is classified as a type similar to rotation transformation and contrast enhancement. The example tag "local_brightness_adjustment" of Example 2 belongs to cluster B, so Example 2 is classified as a type similar to brightness adjustment. The example tag "contrast_enhancement" of Example 3 also belongs to cluster A, so Example 3 is also classified as a type similar to rotation transformation and contrast enhancement.
[0188] In this way, the detection system can classify the basic augmented image construction guidance examples into corresponding example types. This type information is of great significance for the subsequent selection of appropriate examples for image augmentation, which helps to improve the training effect and generalization ability of the water transport scene monitoring network.
[0189] As an implementation manner, in step S20, the water transport scene construction network constructs a water transport scene image for the first water transport scene training image based on the augmented image construction guidance example to obtain the second water transport scene training image, which may specifically include:
[0190] Step S21: Based on the augmented image construction guidance example, image embedding mapping is performed on the first water transport scene training image to obtain the training image embedding matrix and network internal configuration parameters.
[0191] In the embodiment of the present application, step S21 is a key preprocessing step, which involves image embedding mapping of the first water transport scene training image to obtain its numerical representation (i.e., the training image embedding matrix) and the network internal configuration parameters. For example, in step S21, the detection system first reads the augmented image construction guidance examples, which define how to transform and augment the original water transport scene image. Then, the detection system takes the first water transport scene training image as input and processes it through a pre-trained image embedding network (such as a convolutional neural network CNN). The role of the image embedding network is to convert the original image data into a representation in a high-dimensional vector space, i.e., the training image embedding matrix. Each element in this matrix represents the information of a specific area or feature in the image, so that the detection system can more conveniently perform subsequent processing and analysis of the image. At the same time, during the image embedding mapping process, the network will also output some internal configuration parameters, such as weights w and biases b. These parameters are learned by the network during the training process, and they describe how the network processes the input image and how to generate the output. These internal configuration parameters will play a key role in the subsequent water transport scene image construction process.
[0192] For example, suppose there is a first water transport scene training image showing a ship sailing in a port area. In step S21, the detection system inputs the image into a pre-trained image embedding network. The network may be a multi-layer convolutional neural network, which includes multiple convolutional layers, pooling layers, and fully connected layers.
[0193] When the image passes through the convolution layer, the network extracts key features in the image, such as the shape, size, and position of the ship. These features are converted into feature maps, each of which represents a specific type of feature in the image. Next, these feature maps are downsampled in the pooling layer to reduce the dimension and amount of computation of the data. Finally, in the fully connected layer, the network integrates the information of all feature maps to generate a fixed-length training image embedding matrix. At the same time, during the image embedding mapping process, the network also outputs some internal configuration parameters. These parameters include the weights w and bias b of each convolutional layer and fully connected layer. These parameters are learned by the network during training, and they describe how the network processes the input image and how it generates the output. In the subsequent water transport scene image construction process, these internal configuration parameters will be used to adjust and transform the training image embedding matrix to generate a second water transport scene training image that meets the requirements of the augmented image construction guide example.
[0194] Step S22: performing internal weight focusing and adjustment operations on the training image embedding matrix to obtain a first adjustment operation result;
[0195] In the embodiment of the present application, step S22 is a key step, which involves performing internal weight focusing and adjustment operations on the training image embedding matrix to obtain a first adjustment operation result. The purpose of this step is to capture key information in the image and perform targeted adjustments to the image embedding matrix to provide a basis for subsequent water transport scene image construction.
[0196] For example, in step S22, the detection system first applies an internal attention mechanism to the training image embedding matrix. The internal attention mechanism is a mechanism that enables the model to pay attention to the relationship between different parts of the input data, which allows the model to dynamically assign attention weights based on the content of the input data. In the internal attention calculation, three key variables are usually involved: query (Q), key (K), and value (V). These variables are usually obtained from the training image embedding matrix through linear transformation. Specifically, the query Q is used to represent the current position or feature that needs to be paid attention to, and the key K and value V are used to calculate the attention weights and corresponding outputs related to the query. During the internal attention calculation process, the similarity score between the query Q and all the keys K is calculated. This similarity score reflects the correlation between the query Q and different positions or features. Then, the detection system uses the softmax function to convert these similarity scores into attention weights, which represent the importance of different positions or features to the current query. Finally, the detection system weights the attention weights and the corresponding value V to obtain the internal attention matrix. After obtaining the internal attention matrix, the detection system combines it with the original training image embedding matrix (such as adding them) and performs normalization to eliminate the scale differences between different elements. This process can be regarded as a conditioning operation on the training image embedding matrix, which specifically emphasizes or suppresses different elements in the embedding matrix according to the weights in the internal attention matrix. Through this step, the detection system can generate a first conditioning operation result that has undergone internal weight focusing and conditioning operations. This result not only contains the key information of the original image, but also performs targeted adjustments based on the image content, so that the subsequent water transport scene image construction can be more accurate and effective.
[0197] For example, suppose there is an embedding matrix of a training image showing ships sailing in a port area. In step S22, the detection system first extracts the query Q, key K, and value V from the matrix. Then, the detection system calculates the similarity scores between the query Q and all keys K, and generates attention weights based on these scores. These weights represent the correlation between different locations or features in the image (such as ships, waters, etc.) and the current query (such as the location of the ship). Next, the detection system performs a weighted summation of the attention weights and the corresponding value V to obtain an internal attention matrix. Each element in this matrix represents a new representation of a certain location or feature in the original image after the internal attention calculation. Then, the detection system adds the internal attention matrix to the original training image embedding matrix, and performs normalization to obtain the first adjustment operation result.
[0198] Through this process, the detection system can emphasize key features related to ship navigation in the image (such as the shape, size, position, etc. of the ship) and suppress features irrelevant to the current task (such as background noise, etc.). This allows the subsequent water transport scene image construction to focus more on relevant information about ship navigation, thereby improving the training effect and performance of the monitoring network.
[0199] Step S23: Integrate the network internal configuration parameter and the first adjustment operation result to obtain an integrated operation result;
[0200] In an embodiment of the present application, step S23 integrates the network internal configuration parameters and the first adjustment operation result to obtain an integrated operation result. The purpose of this step is to combine the network prior knowledge with the feature information learned from the image to generate a more expressive and targeted image representation, providing strong support for the subsequent water transport scene image construction. For example, in step S23, the detection system first obtains the network internal configuration parameters and the first adjustment operation result. The network internal configuration parameters are usually parameters such as weights and biases learned during the network training process, which represent the network's prior knowledge of image processing. The first adjustment operation result is obtained in step S22 by performing internal weight focusing and adjustment operations on the training image embedding matrix, which contains key information in the image and targeted adjustment results.
[0201] Next, the detection system uses an integration mechanism to combine the network's internal configuration parameters and the first adjustment operation result. This integration mechanism is usually implemented by some calculation method, such as applying the internal configuration parameters as weights or biases to the first adjustment operation result, or fusing the two through some operation. The specific implementation method may vary depending on the network structure and task requirements. Taking the internal attention mechanism as an example, assume that Q (query) and K (key) in the network's internal configuration parameters correspond to certain weight parameters in the network, and the first adjustment operation result corresponds to V (value). In this case, the detection system may apply Q and K as weights to V, generate attention weights by calculating the similarity score between Q and K, and then perform weighted summation of these weights with V to obtain the integration operation result. This process actually fuses the network's prior knowledge with the feature information learned from the image.
[0202] For example, suppose there is a water transport scene monitoring network whose task is to identify abnormal behavior of ships in the port area. In step S23, it is necessary to integrate the network internal configuration parameters and the first adjustment operation result. Assume that Q and K in the network internal configuration parameters correspond to the weight parameters of the convolution layer in the network for processing ship features. These parameters are learned during the network training process, and they represent the network's prior knowledge of ship features. The first adjustment operation result is obtained by performing internal attention calculation on the training image embedding matrix in step S22, which contains the key information of the ship in the image and the targeted adjustment results. In step S23, the detection system uses the internal attention mechanism to apply Q and K as weights to V. Specifically, the detection system calculates the similarity score between Q and all K and generates attention weights. Then, these weights are weighted summed with the corresponding V to obtain the integrated operation result. This process actually fuses the network's prior knowledge of ship features with the key information of ships learned from the image. Through this step, the detection system can generate an integrated operation result that contains both network prior knowledge and specific image content. This result will serve as the basis for subsequent water transport scene image construction and help improve the training effect and performance of the monitoring network.
[0203] Step S24: performing an adjustment operation on the integrated operation result based on the first adjustment operation result to obtain a second adjustment operation result;
[0204] In the embodiment of the present application, step S24 further adjusts the integration operation result based on the first adjustment operation result to obtain a second adjustment operation result. The purpose of this step is to fine-tune the integrated image representation so that it is more in line with the requirements of the augmented image construction guidance example, thereby improving the training effect of the water transport scene monitoring network. For example, in step S24, the detection system first obtains the first adjustment operation result and the integration operation result. The first adjustment operation result is obtained by performing internal weight focusing and adjustment operations on the training image embedding matrix in step S22, which contains key information in the image and targeted adjustment results. The integration operation result is obtained by integrating the network internal configuration parameters and the first adjustment operation result in step S23, which combines the network's prior knowledge with the feature information learned from the image. Next, the detection system uses an adjustment mechanism to apply the first adjustment operation result to the integration operation result to obtain the second adjustment operation result. The specific implementation of this adjustment mechanism may vary depending on the network structure and task requirements, but usually involves some kind of operation or transformation of the two results.
[0205] Taking simple addition and normalization as an example, the detection system may add the first adjustment operation result and the integration operation result element by element, and then normalize the addition result (such as dividing by a constant or normalizing based on a norm) to eliminate the scale differences between different elements. This process is actually a fine adjustment of the integration operation result, which specifically emphasizes or suppresses the integration result based on the information in the first adjustment operation result.
[0206] For example, suppose there is a water transport scene monitoring network whose task is to identify abnormal behavior of ships in the port area. In step S24, further adjustment operation is required for the integration operation result. Assume that the integration operation result is a vector, which contains information about key features such as ships and waters in the port area image. The first adjustment operation result is also a vector, which is obtained by performing internal attention calculation on the training image embedding matrix in step S22, and it emphasizes the key features related to abnormal behavior of ships in the image.
[0207] In step S24, the detection system adds the first adjustment operation result and the integration operation result element by element. This process actually adds the information in the first adjustment operation result on the basis of the integration operation result, emphasizing the features related to the abnormal behavior of the ship. Then, the detection system standardizes the addition result to ensure the consistency of scale between different elements.
[0208] Through this step, the detection system can generate a more refined and targeted second adjustment operation result. This result not only contains the key information of the original image, but also carries out targeted emphasis and suppression according to the image content, making the subsequent water transport scene image construction more accurate and effective. This helps to improve the training effect and performance of the water transport scene monitoring network, enabling it to better identify abnormal behavior of ships in the port area.
[0209] Step S25: obtaining a second water transport scene training image based on the second adjustment operation result.
[0210] In the embodiment of the present application, step S25 is a key step for converting the second adjustment operation result into a specific second water transport scene training image. This step decodes the numerical image representation (i.e., the second adjustment operation result) into a visual image, so that the detection system can generate new training data that meets the requirements of the augmented image construction guide example. For example, in step S25, the detection system first obtains the second adjustment operation result, which is obtained by internal weight focusing, adjustment operation and integration of the training image embedding matrix in the previous step. It contains the key information of the original image and is emphasized and suppressed in a targeted manner to meet the requirements of the augmented image construction guide example. Next, the detection system uses a decoding mechanism to convert the second adjustment operation result into a visual image. This decoding process is usually implemented by a decoding network corresponding to the image embedding network. The role of the decoding network is to decode the numerical image representation into the original image data, so that the detection system can generate a new water transport scene training image. The specific implementation of the decoding network may vary depending on the task requirements and network structure, but generally involves a series of transformation and reconstruction operations on the second adjustment operation result. These operations may include deconvolution, upsampling, nonlinear activation, etc., to gradually convert the numerical representation into an image with actual pixel values. For example, suppose there is a water transport scene monitoring network whose task is to identify abnormal behavior of ships in the port area. In step S25, the second adjustment operation result needs to be converted into a second water transport scene training image. Assume that the second adjustment operation result is a vector, which contains key information related to the abnormal behavior of the ship. In order to convert this vector into a visual image, the detection system uses a decoding network corresponding to the image embedding network. This decoding network may be a multi-layer deconvolution network, which includes multiple deconvolution layers, upsampling layers and activation layers. During the decoding process, the detection system takes the second adjustment operation result as input and gradually converts the vector into a feature map through the deconvolution layer. These feature maps represent features of different scales and levels in the image. Then, the upsampling layer will perform an upsampling operation on the feature map to restore the original resolution of the image. Finally, the activation layer will perform a nonlinear transformation on the upsampled feature map to generate the final image pixel value. Through this decoding process, the detection system can generate a second water transport scene training image based on the second adjustment operation result. This newly generated image not only contains the key information of the original image, but also undergoes targeted transformation and augmentation according to the requirements of the augmented image construction guidance example. This makes the newly generated image more diverse and rich, which helps to improve the training effect and generalization ability of the water transport scene monitoring network.
[0211] As an implementation manner, step S21, based on the augmented image construction guidance example, performs image embedding mapping on the first water transport scene training image to obtain the training image embedding matrix and network internal configuration parameter variables, which may specifically include:
[0212] Step S211: extracting features of the first water transport scene training image based on the augmented image construction guidance example to obtain a first image feature matrix.
[0213] In an embodiment of the present application, step S211 performs feature extraction on the first water transport scene training image based on the augmented image construction guidance example, thereby obtaining a first image feature matrix containing key information of the image. For example, in step S211, the detection system first reads the augmented image construction guidance examples, which define how to transform and augment the original water transport scene image. Then, the detection system takes the first water transport scene training image as input and processes it through a pre-trained feature extraction network. This feature extraction network is usually a deep learning model, such as a convolutional neural network (CNN), which can automatically learn and extract key features in the image.
[0214] Taking water transport scene monitoring as an example, the first water transport scene training image may contain elements such as ports, ships, and waters. The feature extraction network processes these images layer by layer, from low-level edge and texture features to high-level semantic features such as ship shape and position, and gradually extracts key information related to the task. These extracted features are encoded into a high-dimensional vector or matrix form, namely the first image feature matrix. For example, suppose there is a first water transport scene training image, which shows a busy port area, including multiple ships, dock facilities, and water background. In step S211, the detection system inputs this image into a pre-trained CNN feature extraction network. The CNN network first extracts local features of the image through a convolution layer. The convolution kernel slides on the image, calculates the convolution result of each position, and generates multiple feature maps. Each feature map represents a specific type of feature in the image, such as edges, corners, textures, etc. As the number of network layers increases, these low-level features are gradually combined and abstracted to form higher-level semantic features, such as the shape, position, and direction of the ship.
[0215] After processing multiple convolutional layers and pooling layers, the CNN network outputs a high-dimensional feature vector or matrix, namely the first image feature matrix. Each element in this matrix represents a specific type of information in the image, and together they constitute the numerical representation of the image. It contains the key information of the image and provides strong support for the subsequent water transport scene image construction and monitoring network training.
[0216] Step S212: performing internal weight focusing and adjustment operations on the first image feature matrix to obtain a third adjustment operation result;
[0217] In an embodiment of the present application, step S212 performs internal weight focusing and adjustment operations on the first image feature matrix to obtain a third adjustment operation result. The purpose of this step is to further refine the image features, emphasize key features and suppress secondary features, and provide more targeted input for subsequent image augmentation and monitoring network training. For example, in step S212, the detection system first obtains the first image feature matrix extracted in step S211. This matrix contains the key feature information of the image, but there may still be some redundant or secondary features. In order to further improve the quality of the features, the detection system performs internal weight focusing and adjustment operations on this matrix.
[0218] Internal weight focusing is usually achieved through an internal attention mechanism. The internal attention mechanism allows the model to dynamically assign weights based on the importance of the input features, thereby focusing on key areas in the image. In the implementation of the detection system, this mechanism may adopt a multi-head internal attention module similar to the Transformer architecture. Specifically, the detection system performs internal attention calculations on the first image feature matrix. This process involves three key steps: first, the detection system generates three matrices: query, key, and value based on the feature matrix; then, the detection system calculates the similarity score between the query matrix and the key matrix to generate attention weights; finally, the detection system performs a weighted summation of the attention weights and the value matrix to obtain the internal attention feature matrix. After obtaining the internal attention feature matrix, the detection system combines it with the original first image feature matrix (such as adding them) and performs normalization. This process is actually a conditioning operation on the original feature matrix, which emphasizes or suppresses the features in a targeted manner according to the weights calculated by the internal attention mechanism. Through this process, the detection system can generate a more refined and targeted third conditioning operation result.
[0219] In order to further improve the quality of the features, the detection system performs internal weight focusing and adjustment operations on the first image feature matrix in step S212. Specifically, the detection system first generates three matrices, namely query, key and value, based on the feature matrix. Then, the detection system calculates the similarity score between the query matrix and the key matrix and generates attention weights. These weights reflect the importance of different features to the current task, such as the shape and position features of the ship may receive higher weights, while the background noise features may receive lower weights. Next, the detection system performs weighted summation of the attention weights and the value matrix to obtain an internal attention feature matrix. Each element in this matrix represents a new representation of the original feature after being processed by the internal attention mechanism. Finally, the detection system adds the internal attention feature matrix to the original first image feature matrix and performs normalization to obtain the third adjustment operation result. This result not only contains the key feature information of the original image, but also carries out targeted emphasis and suppression according to the internal attention mechanism, so that the subsequent water transport scene image construction and monitoring network training can be more accurate and effective.
[0220] Step S213: Encode the third adjustment operation result to obtain a first encoding matrix.
[0221] In an embodiment of the present application, step S213 encodes the third adjustment operation result to obtain a first encoding matrix. The purpose of this step is to further compress and convert the feature representation after internal weight focusing and adjustment operation to facilitate subsequent processing and analysis. For example, in step S213, the detection system first obtains the third adjustment operation result generated in step S212. This result is obtained based on the first image feature matrix after internal attention calculation and other adjustment operations, and it contains a refined representation of the key features in the image. However, this representation may still be a high-dimensional feature vector or matrix that needs further encoding to extract its core information. To achieve this goal, the detection system uses a coding mechanism to encode the third adjustment operation result. This coding mechanism can be a simple linear transformation or a more complex nonlinear transformation, depending on the network structure and task requirements. During the encoding process, the detection system may use a fully connected layer, a convolutional layer, or other types of neural network layers to perform this transformation.
[0222] Through the encoding mechanism, the result of the third adjustment operation is converted into a new matrix form, namely the first encoding matrix. This matrix usually has a lower dimension than the original feature matrix, but it contains the core information and key elements of the original features. This makes the first encoding matrix more compact and efficient, which is convenient for the subsequent water transport scene image construction and monitoring network training.
[0223] In order to further extract the core information of these features, the detection system encodes the third adjustment operation result in step S213. Specifically, the detection system uses a fully connected layer to transform the adjustment operation result. This fully connected layer maps the original high-dimensional feature vector to a low-dimensional vector space to generate a first encoding matrix. Each element in this matrix represents the encoded representation of a certain type of information in the original feature. For example, assume that the third adjustment operation result is a 1024-dimensional vector, and the first encoding matrix is designed to be 128-dimensional. Through the transformation of the fully connected layer, the detection system compresses this 1024-dimensional vector into a 128-dimensional vector, namely the first encoding matrix. This 128-dimensional vector contains the most important information in the original features, such as the shape, position and direction of the ship, but has a lower dimension, is more compact and efficient. This makes the subsequent water transport scene image construction and monitoring network training more accurate and efficient.
[0224] Step S214: performing an adjustment operation on the first encoding matrix based on the third adjustment operation result to obtain a training image embedding matrix;
[0225] In the embodiment of the present application, step S214 performs an adjustment operation on the first encoding matrix based on the third adjustment operation result to obtain a training image embedding matrix. The purpose of this step is to combine the encoded feature matrix with the adjustment operation result to generate an image embedding representation that contains both the key information of the original image and has been finely adjusted, providing strong support for subsequent water transport scene image construction and monitoring network training.
[0226] For example, in step S214, the detection system first obtains the first encoding matrix generated in step S213 and the third adjustment operation result obtained in step S212. The first encoding matrix is a compact representation of the original image features after encoding, which contains the core information of the image; while the third adjustment operation result is a refined representation obtained after the original features are internally weighted and adjusted, which emphasizes the key features in the image and suppresses the secondary features. Next, the detection system uses an adjustment mechanism to apply the third adjustment operation result to the first encoding matrix. This adjustment mechanism usually involves performing some form of operation or transformation on the two matrices to generate a new matrix, namely, the training image embedding matrix. This new matrix contains the key information of the original image and has been finely adjusted and optimized, so that it can better reflect the essential characteristics and structure of the image. In a specific implementation, the adjustment operation may use a simple addition operation, that is, adding the third adjustment operation result and the elements at the corresponding positions of the first encoding matrix. Then, the detection system standardizes the addition result to eliminate the scale differences between different elements, so that each element in the embedding matrix is comparable and consistent. Normalization is usually performed by normalization or standardization methods, such as dividing each element by the norm or maximum value of the matrix.
[0227] For example, suppose there is a water transport scene monitoring network, which is processing a first water transport scene training image showing ships sailing in a port area. In the previous step, the detection system has extracted the features of the image and generated a first image feature matrix, and then performed internal weight focusing and adjustment operations on this matrix to obtain a third adjustment operation result, and then encoded the adjustment operation result to generate a first encoding matrix. Now, in step S214, the detection system adds the third adjustment operation result and the first encoding matrix. Assume that the first encoding matrix is a 128-dimensional vector, and the third adjustment operation result is also a vector of the same dimension. The system adds the elements of the corresponding positions of the two vectors to obtain a new vector. This new vector contains both the original image information in the first encoding matrix and the refined feature representation in the third adjustment operation result. Then, the detection system standardizes the addition result. Assume that the system adopts the L2 norm normalization method, that is, each element is divided by the L2 norm of the vector, so that the modulus length of the new vector is 1. After standardization, the detection system obtains a standardized training image embedding matrix. This embedding matrix not only retains the key information of the original image, but also undergoes fine-tuning and optimization, so that it can better serve the subsequent water transport scene image construction and monitoring network training.
[0228] Step S215: when obtaining the training image embedding matrix, the network internal configuration parameter variables of the water transport scenario construction network are obtained.
[0229] In the embodiment of the present application, step S215 obtains the network internal configuration parameters of the water transport scene construction network in the process of generating the training image embedding matrix. These parameters are learned by the model during the training process. They describe how the network processes the input image and how to generate the output, which is crucial for subsequent network training and image processing. For example, in step S215, the detection system first completes a series of operations in steps S211 to S214, including feature extraction, internal weight focusing, encoding and adjustment operations, and finally generates a training image embedding matrix. This matrix is a numerical representation of the original water transport scene training image after network processing, which contains the key information and features of the image. However, the process of generating this embedding matrix is not just a simple data conversion, it involves the collaborative work of multiple layers and components in the water transport scene construction network. When processing image data, these layers and components will perform specific transformations and calculations on the data according to their own parameters (i.e., network internal configuration parameters). These parameters are learned through the back propagation algorithm during the network training process, and they determine the behavior and performance of the network.
[0230] In step S215, the detection system obtains the network internal configuration parameters used when generating the training image embedding matrix. These parameters usually include weights and biases of hidden layers such as convolutional layers and fully connected layers. Taking the convolutional layer as an example, its weight parameters determine the filtering effect of the convolution kernel on the input image, while the bias parameters are used to adjust the offset of the output feature. These parameters are continuously updated during the training process to minimize the error between the network output and the actual label. By obtaining these network internal configuration parameters, the detection system can understand the specific behavior and logic of the network when generating the training image embedding matrix. This is of great significance for subsequent network training and image processing. On the one hand, these parameters can be used to initialize new network models or fine-tune existing models to accelerate the training process and improve performance; on the other hand, they can also be used to analyze the behavior and performance bottlenecks of the network and provide guidance for network optimization.
[0231] For example, assuming there is a water transport scene monitoring network, which includes a convolutional layer, a fully connected layer, and an output layer. In step S215, it is necessary to obtain the internal configuration parameters used by the network when generating the training image embedding matrix.
[0232] Specifically, the weight parameter of the convolution layer is a four-dimensional tensor (usually [number of input channels, number of output channels, convolution kernel height, convolution kernel width]), which determines the filtering effect of the convolution kernel on the input image. Assume that the weight parameter of the convolution layer is W_conv, which contains the parameter values of multiple convolution kernels. These parameter values are learned through the back propagation algorithm during the network training process, and they enable the convolution layer to extract the key features in the image. The weight parameter of the fully connected layer is a two-dimensional matrix (usually [number of input neurons, number of output neurons]), which determines the transformation effect of the fully connected layer on the input features. Assume that the weight parameter of the fully connected layer is W_fc, which contains the mapping relationship from input features to output features. These parameters are also learned during the network training process, and they enable the fully connected layer to generate appropriate outputs based on the input features. In step S215, the detection system obtains these weight parameters (W_conv and W_fc) and the corresponding bias parameters (b_conv and b_fc) as network internal configuration parameters. These parameters will be used in subsequent network training and image processing tasks to ensure the accuracy and effectiveness of the generated training image embedding matrix.
[0233] As an implementation mode, step S23 integrates the network internal configuration parameters and the first adjustment operation result to obtain an integrated operation result, which may specifically include: using the network internal configuration parameters as the search array and anchor array in the internal weight focusing, and using the first adjustment operation result as the result array in the internal weight focusing, performing internal weight focusing, and obtaining the integrated operation result.
[0234] In the embodiment of the present application, step S23 combines the network internal configuration parameters with the first adjustment operation result to obtain the integrated operation result. This step is achieved by internal weight focusing, so that the network can integrate the image features (first adjustment operation result) in a targeted manner based on its prior knowledge (internal configuration parameters). For example, in step S23, the detection system first obtains the network internal configuration parameters and the first adjustment operation result. The network internal configuration parameters are parameters such as weights and biases learned during the network training process, which represent the network's prior knowledge of image processing. The first adjustment operation result is obtained by performing internal weight focusing and adjustment operations on the image features in the previous step, which contains key information in the image and targeted adjustment results. In order to integrate the two, the detection system adopts internal weight focusing (internal attention mechanism). In this mechanism, the network internal configuration parameters are used as search arrays (Query) and anchor arrays (Key), and the first adjustment operation results are used as result arrays (Value). This process is similar to the way attention weights are calculated in the internal attention mechanism. Specifically, the detection system first calculates the similarity score between the search array (network internal configuration parameters as query) and the anchor array (also network internal configuration parameters as key). This similarity score reflects the correlation between different parts of the network internal configuration parameters. Then, the detection system uses the softmax function to convert these similarity scores into attention weights, which represent the importance of different parts to the current integration task.
[0235] Next, the detection system performs a weighted summation of the attention weights and the result array (with the first adjustment operation result as Value) to obtain the integrated operation result. This process actually fuses the prior knowledge in the network's internal configuration parameters with the image features in the first adjustment operation result. Through this integration method, the detection system can generate an integrated operation result that contains both the network's prior knowledge and specific image content. Assume that the network's internal configuration parameters contain the weight parameters of a convolutional layer, which are learned during the network training process and represent the network's prior knowledge of the ship's features. The first adjustment operation result is obtained by performing internal weight focusing and adjustment operations on the ship's image features in the previous step, which emphasizes the key features in the image related to abnormal ship behavior.
[0236] In step S23, the detection system uses the weight parameters of the convolutional layer as the search array (Query) and the anchor array (Key), and uses the first adjustment operation result as the result array (Value). Then, the detection system calculates the similarity score between the Query and the Key and generates the attention weights. These weights represent the importance of different weight parameters for the current integration task.
[0237] Finally, the detection system performs a weighted summation of the attention weight and the Value to obtain the integrated operation result. This result not only includes the network's prior knowledge of the ship's characteristics, but also emphasizes the key features related to the abnormal behavior of the ship in the image. This makes the integrated operation result more in line with the task requirements and provides strong support for the subsequent water transport scene image construction and monitoring network training.
[0238] As an implementation manner, step S25, obtaining a second water transport scene training image based on the second adjustment operation result, includes:
[0239] Step S251: Encode the second adjustment operation result to obtain a second encoding matrix;
[0240] Step S252: Decode the second coding matrix to obtain a second water transport scene training image.
[0241] In the embodiment of the present application, step S25 performs the encoding and decoding process of the adjustment operation result to ensure that the generated image not only retains the key information of the original image, but also meets the requirements of the augmented image construction guidance example.
[0242] In step S251, the detection system encodes the second adjustment operation result and converts it into a high-dimensional vector or matrix representation, namely, a second encoding matrix. This encoding process is to further compress and convert the adjustment operation result to make it easier for subsequent processing and image generation.
[0243] In step S252, the detection system decodes the second encoding matrix and restores it to a visualized second water transport scene training image. This decoding process is usually implemented through a decoding network corresponding to the encoding process. For example, in the decoding stage, the detection system may use a decoding network with a similar structure to the encoding network. This decoding network includes multiple components such as deconvolution layers, upsampling layers, and activation layers, which gradually restore the information in the second encoding matrix to an image with actual pixel values. Specifically, the deconvolution layer will upsample and reconstruct the features of the encoding matrix, the upsampling layer will further restore the resolution of the image, and the activation layer will perform a nonlinear transformation on the image to make it closer to the real visual representation.
[0244] Through this decoding process, the detection system can generate a second water transport scene training image based on the second adjustment operation result. This newly generated image not only contains the key information of the original image, but also undergoes targeted transformation and augmentation according to the requirements of the augmented image construction guidance example. This allows the new image to retain the semantic information of the original image while having higher diversity and richness, which helps to improve the training effect and generalization ability of the water transport scene monitoring network.
[0245] The present application also provides a detection system. Figure 2 As shown, the detection system 100 includes: a processor 101 and a memory 103. The processor 101 and the memory 103 are connected, such as through a bus 102. Optionally, the detection system 100 may also include a transceiver 104. It should be noted that in actual applications, the transceiver 104 is not limited to one, and the structure of the detection system 100 does not constitute a limitation on the embodiments of the present application. In other words, the embodiments of the present application provide a detection system, and the detection system in the embodiments of the present application includes: one or more processors; a memory; one or more computer programs, wherein the one or more computer programs are stored in the memory and are configured to be executed by one or more processors, and when the one or more programs are executed by the processor, the above method is implemented.
Claims
1. A water transport scene monitoring method based on deep learning, It is characterized in that include: Acquire target water transport scene images; Loading the target water transport scene image into a target water transport scene monitoring network, performing water transport scene recognition based on the target water transport scene monitoring network, and obtaining an abnormal recognition result; The training process of the target water transport scene monitoring network includes: Acquire a first water transport scene training image and an augmented image construction guidance example corresponding to the first water transport scene training image, wherein the augmented image construction guidance example is configured to guide construction of a second water transport scene training image containing consistent image semantics with the first water transport scene training image; Performing water transport scene image construction on the first water transport scene training image based on the augmented image construction guide example by using a water transport scene construction network to obtain a plurality of second water transport scene training images; Optimizing the first water transport scene monitoring network based on the plurality of the second water transport scene training images to obtain a second water transport scene monitoring network; Performing a neural network performance test on the second water transport scenario monitoring network to obtain neural network performance test information; Based on the neural network performance test information, iterating the first water transport scene monitoring network to obtain the target water transport scene monitoring network; The process of creating the augmented image construction guide example includes the following steps: Acquire multiple basic augmented image construction guide examples, and construct a corresponding example mark for each of the basic augmented image construction guide examples; For each of the basic augmented image construction guide examples, determine the type based on the example tag to obtain the example type of each of the basic augmented image construction guide examples; For each of the basic augmented image construction guide examples, in response to the example type satisfying a set condition, determining the basic augmented image construction guide example as the augmented image construction guide example; The step of constructing the example markup for the basic augmented image includes: Performing tagging construction on the basic augmented image construction guide example according to global semantics to obtain a first candidate example tag; Constructing a tag based on local semantics for the basic augmented image construction guide example to obtain a second candidate example tag; Obtain a first support coefficient corresponding to the first candidate example marker and a second support coefficient corresponding to the second candidate example marker; and use the candidate example marker corresponding to the larger support coefficient of the first support coefficient and the second support coefficient as the example marker.
2. The method according to claim 1, It is characterized in that The performing of a neural network performance test on the second water transport scenario monitoring network to obtain neural network performance test information includes: Acquire a learning sample of a water transport scene image to be inspected and a learning sample to be verified corresponding to the learning sample of the water transport scene image to be inspected; Performing image anomaly classification prediction on the to-be-tested water transport scene image learning sample through the second water transport scene monitoring network to obtain an anomaly classification prediction result; Based on the abnormal classification prediction result and the quasi-verification learning sample, neural network performance test information for performing a neural network performance test on the second water transport scenario monitoring network is obtained.
3. The method according to claim 2, It is characterized in that The proposed verification learning sample is a priori label of abnormal information corresponding to the proposed verification water transport scene image learning sample; the neural network performance test information for performing a neural network performance test on the second water transport scene monitoring network based on the abnormal classification prediction result and the proposed verification learning sample includes: Obtaining an information error between the abnormal classification prediction result and the abnormal information priori mark, and comparing the information error with a set critical error value to obtain a first critical value comparison result; In response to the first critical value comparison result being that the information error is not greater than the set critical error value, obtaining neural network performance test information indicating that the neural network performance of the second water transport scenario monitoring network is improved based on the first critical value comparison result; In response to the first critical value comparison result being that the information error is greater than the set critical error value, obtaining neural network performance inspection information that the neural network performance of the second water transport scenario monitoring network is not improved based on the first critical value comparison result; or; The quasi-verification learning sample is a quasi-verification water transport scene image learning sample that contains consistent image semantics with the quasi-verification water transport scene image learning sample; the neural network performance test information for performing a neural network performance test on the second water transport scene monitoring network based on the abnormal classification prediction result and the quasi-verification learning sample includes: Obtaining a matching score between the abnormal classification prediction result and the to-be-verified water transport scene image learning sample, and comparing the matching score with a set critical matching score to obtain a second critical value comparison result; In response to the second critical value comparison result being that the matching score is less than the set critical matching score, obtaining neural network performance inspection information that the neural network performance of the second water transport scenario monitoring network is not improved based on the second critical value comparison result; In response to the second critical value comparison result being that the matching score is not less than the set critical matching score, neural network performance verification information is obtained based on the second critical value comparison result, indicating that the neural network performance of the second water transport scenario monitoring network is improved.
4. The method according to claim 3, It is characterized in that The iterating the first water transport scenario monitoring network based on the neural network performance test information includes: In response to the neural network performance verification information indicating that the neural network performance of the second water transport scenario monitoring network is improved, iterating the first water transport scenario monitoring network into the second water transport scenario monitoring network; or; In response to the neural network performance verification information indicating that the neural network performance of the second water transport scenario monitoring network has not been improved, the first water transport scenario monitoring network is not iterated into the second water transport scenario monitoring network.
5. The method according to claim 1, It is characterized in that Determining the type of the basic augmented image construction guide example based on the example tag to obtain the example type of the basic augmented image construction guide example includes: Performing tag encoding processing on each of the example tags to obtain a coded tag corresponding to each of the example tags; Based on the matching scores between the different encoding tags, clustering all the example tags to obtain multiple example tag classifications; Based on the example tag category in which the example tag corresponding to the basic augmented image construction guide example is located, the example type of the basic augmented image construction guide example is obtained.
6. The method according to claim 1, It is characterized in that The water transport scene construction network constructs a water transport scene image for the first water transport scene training image based on the augmented image construction guidance example to obtain the second water transport scene training image, including: Based on the augmented image construction guidance example, the first water transport scene training image is subjected to image embedding mapping to obtain a training image embedding matrix and network internal configuration parameter variables; Performing internal weight focusing and adjustment operations on the training image embedding matrix to obtain a first adjustment operation result; Integrating the network internal configuration parameter and the first adjustment operation result to obtain an integrated operation result; Performing an adjustment operation on the integrated operation result based on the first adjustment operation result to obtain a second adjustment operation result; The second water transport scene training image is obtained based on the second adjustment operation result.
7. The method according to claim 6, It is characterized in that The step of performing image embedding mapping on the first water transport scene training image based on the augmented image construction guidance example to obtain a training image embedding matrix and network internal configuration parameters includes: Based on the augmented image construction guidance example, feature extraction is performed on the first water transport scene training image to obtain a first image feature matrix; Performing internal weight focusing and adjustment operations on the first image feature matrix to obtain a third adjustment operation result; Encoding the third adjustment operation result to obtain a first encoding matrix; Performing an adjustment operation on the first encoding matrix based on the third adjustment operation result to obtain a training image embedding matrix; When obtaining the embedding matrix of the training image, the network internal configuration parameter variables of the water transport scene construction network are obtained; The step of integrating the network internal configuration parameter and the first adjustment operation result to obtain an integrated operation result includes: Using the network internal configuration parameter variables as the search array and anchor array in internal weight focusing, and using the first adjustment operation result as the result array in internal weight focusing, performing internal weight focusing, and obtaining an integrated operation result; The step of obtaining the second water transport scene training image based on the second adjustment operation result includes: Encoding the second adjustment operation result to obtain a second encoding matrix; The second encoding matrix is decoded to obtain the second water transport scene training image.
8. A detection system, It is characterized in that include: one or more processors; Memory; one or more computer programs; The one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method according to any one of claims 1 to 7 is implemented.
