A method, medium and system for in-situ acquisition of underwater particles and biological images
Through two-level model recognition and two-dimensional data table transmission technology, the problems of underwater target movement, posture deformation, and poor communication are solved, and accurate tracking and real-time visual monitoring of underwater particles and organisms are achieved.
Patent Information
- Application Number
- CN202410421143.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-09
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-04-09
AI Technical Summary
The complexity of the underwater environment causes serious target movement and posture deformation, making it difficult to identify, and poor communication makes it difficult to transmit images, which limits the real-time monitoring and identification of underwater particles and organisms.
A two-level model recognition method is adopted, including a pre-trained particle or biological tracking model and a full pose recognition model. Data transmission and image reconstruction are performed through a two-dimensional data table to achieve accurate tracking and attitude recognition of underwater targets.
It effectively solves the identification difficulties caused by the movement and posture deformation of underwater targets, improves the efficiency and reliability of data transmission, and achieves accurate monitoring and real-time visualization of underwater targets.
Smart Images

Figure CN118279734B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of in-situ acquisition of underwater particles and biological images, and in particular, relates to an in-situ acquisition method, medium and system for underwater particles and biological images. Background Art
[0002] The underwater environment is complex and changeable, which brings great challenges to underwater detection and observation. Due to the optical properties of water, such as absorption and scattering, underwater images generally have problems such as low contrast, color distortion and limited field of view, which poses a severe challenge to the detection, identification and tracking of targets. Traditional underwater detection usually uses acoustic or electromagnetic means, but these methods are limited by resolution, penetration depth and data dimension, and it is difficult to meet the needs of fine observation of particles and organisms. With the continuous deepening of marine resource development, ecological and environmental protection and other fields, the demand for real-time and accurate monitoring of underwater particles and organisms is becoming more and more urgent.
[0003] At present, visual acquisition technology has gradually gained attention in the field of in-situ observation of underwater particles and organisms. By deploying high-resolution cameras and powerful light sources underwater, it is possible to collect images or video data of underwater scenes in real time, laying the foundation for subsequent target detection, tracking and analysis. However, due to the complexity and variability of the underwater environment, relying solely on manual visual judgment and manual labeling is limited, and it is easy to miss or misjudge the target, making it difficult to meet the needs of refined and large-scale observations.
[0004] To solve this problem, researchers have applied artificial intelligence technologies such as computer vision and deep learning to the field of underwater target detection and recognition. By training deep neural network models, particles and biological targets can be automatically detected and segmented from complex underwater images, achieving accurate target tracking and recognition. However, existing deep learning methods face many challenges in underwater scenes:
[0005] 1. Severe target motion and posture deformation: Affected by water flow, underwater particles and biological targets often move or present complex posture states, which makes target detection and identification more difficult.
[0006] 2. Poor communication and difficulty in transmitting images: Data transmission between underwater and surface areas is limited by bandwidth and reliability, which poses a challenge to real-time display. Summary of the invention
[0007] In view of this, the present invention provides a method, medium and system for in-situ acquisition of underwater particulate matter and biological images, which can solve the technical problems in the prior art of in-situ acquisition of underwater particulate matter and biological images, such as serious target motion and posture deformation, resulting in difficulty in identification, and poor communication and difficulty in image transmission.
[0008] The present invention is achieved in that:
[0009] A first aspect of the present invention provides a method for in-situ collection of underwater particulate matter and biological images, which includes an underwater module and an above-water module. The underwater module is arranged at an underwater terminal, and is used to identify and extract a two-dimensional data table representing the image based on the image taken by an underwater camera, and upload the two-dimensional data table to an above-water server. The above-water module is arranged in the above-water server, and is used to restore the image based on the two-dimensional data table.
[0010] Wherein, the underwater module is used to perform the following steps:
[0011] S11, obtaining a plurality of continuous images taken underwater, recorded as a first image set;
[0012] S12, preprocessing the first image set to obtain a second image set;
[0013] S13, using a pre-trained particle or organism tracking model, performing model calculation on each image in the second image set to obtain annotation information of particles and organisms corresponding to each image, wherein the annotation information is used to uniquely code and mark the particles or organisms in the image;
[0014] S14, performing segmentation on each image in the second image set based on the annotation information to obtain a plurality of segmented images, and dividing the plurality of segmented images into a plurality of segmented image sets according to the annotation information, wherein the segmented images in each segmented image set have the same annotation information;
[0015] S15, using a pre-trained particle or organism full-pose recognition model to recognize each segmented image in the segmented image set, obtaining a recognition vector for each segmented image, including the type, size, and recognition rate of the recognized particle or organism, and taking the recognition vector with the highest recognition rate in the segmented image set as the recognition result of the segmented image set;
[0016] S16. For each image in the second image set, a two-dimensional data table is established based on the recognition results of the segmented image set, including the coordinates of each segmented image and the recognition result; and the two-dimensional data table is sent to the water module.
[0017] Furthermore, the underwater module is used to perform the following steps:
[0018] S21, obtaining the two-dimensional data table;
[0019] S22, creating an empty image, the size of the empty image being the size of the image taken by the underwater camera;
[0020] S23, segmenting the empty image based on the two-dimensional data table, and replacing the particle or biological image corresponding to the recognition result in the two-dimensional data table in each segmented area to generate an image containing particles or organisms.
[0021] Furthermore, the particle or biological tracking model includes:
[0022] Feature extraction network, which uses convolutional neural network to extract features from the input image group and obtain multi-scale and multi-level feature maps;
[0023] The target detection head uses the target detection algorithm based on the feature map to predict the classification and location of the target object and output the candidate target box;
[0024] The instance segmentation head generates a segmentation mask of the target object using the instance segmentation algorithm for each candidate target box;
[0025] The target association module associates and identifies the detection results of the same target object in different frames of the input image group through the target tracking algorithm to achieve cross-frame tracking.
[0026] Furthermore, the training steps of the particle or biological tracking model include:
[0027] Preprocessing and data enhancement are performed on a training data set, wherein the training data set is specifically a set of images obtained by manually annotating particles or organisms on a large number of real images collected in different waters;
[0028] Dividing the training data set into a training set, a validation set and a test set;
[0029] Define the loss function including classification loss, regression loss and segmentation mask loss;
[0030] Input the training data into the model in small batches for forward calculation and back propagation to update the model parameters;
[0031] After each training cycle, the model performance is evaluated on the validation set and the hyperparameters are adjusted; the optimal model is evaluated and selected on the test set.
[0032] Furthermore, the feature extraction network of the particle or biological tracking model adopts ResNet, Inception or EfficientNet.
[0033] Furthermore, the feature extraction network of the particle or organism full pose recognition model adopts the same feature extraction network as the particle or organism tracking model.
[0034] Furthermore, the training steps of the particle or biological full pose recognition model include:
[0035] Obtaining a full-pose training data set, specifically, obtaining all known particle or biological images, and using a computer three-dimensional model to perform three-dimensional reconstruction on the particle or biological image to obtain a particle or biological three-dimensional image, and then deriving the full-pose image of the particle or biological by rotating on the three-dimensional XYZ axis, deriving an image every time the rotation is 1°, and using all the derived images and their specific particle or biological names as the full-pose training data set;
[0036] A convolutional neural network is trained using the full-pose training data set to obtain a particle or biological full-pose recognition model.
[0037] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the above-mentioned method for in-situ acquisition of underwater particulate matter and biological images.
[0038] A third aspect of the present invention provides an in-situ acquisition system for underwater particulate matter and biological images, which includes the above-mentioned computer-readable storage medium.
[0039] Compared with the prior art, the method, medium and system for in-situ acquisition of underwater particles and biological images provided by the present invention have the following beneficial effects:
[0040] 1) A two-level model is used for recognition, including a pre-trained tracking model and a full-pose recognition model. First, specific particles and organisms are tracked, and then the tracked images are recognized in full pose. This effectively solves the problem that underwater particles and biological targets often move or present complex poses due to the influence of water flow, which brings greater difficulties to target detection and recognition. It has strong generalization ability and can cope with the diverse challenges of various underwater scenes.
[0041] 2) Compared with the original image data, the two-dimensional data table has a smaller data volume and a more compact data structure, which reduces the pressure of data transmission between underwater and surface, and improves real-time performance and reliability. The target image is accurately reconstructed based on coordinate, size and posture information, and the real state of the underwater target can be restored.
[0042] In summary, the solution of the present invention solves the technical problems in the prior art of in-situ acquisition of underwater particulate matter and biological images, such as severe target motion and posture deformation, which makes it difficult to identify, and poor communication and difficulty in image transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0044] Figure 1 A flow chart of the steps performed by the underwater module of the method of the present invention;
[0045] Figure 2 A flow chart of the steps performed by the above-water module of the method of the present invention; DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0047] like Figure 1 As shown, it is a flow chart of a method for in-situ collection of underwater particulate matter and biological images provided by the present invention. The method comprises the following steps: wherein, it comprises an underwater module and an above-water module. The underwater module is arranged at an underwater terminal, and is used for identifying and extracting a two-dimensional data table representing the image based on the image taken by the underwater camera, and uploading the two-dimensional data table to an above-water server. The above-water module is arranged in the above-water server, and is used for restoring the image based on the two-dimensional data table.
[0048] Wherein, the underwater module is used to perform the following steps:
[0049] S11, obtaining a plurality of continuous images taken underwater, recorded as a first image set;
[0050] S12, preprocessing the first image set to obtain a second image set;
[0051] S13, using a pre-trained particle or organism tracking model, performing model calculation on each image in the second image set to obtain annotation information of particles and organisms corresponding to each image, wherein the annotation information is used to uniquely encode and mark the particles or organisms in the image;
[0052] S14, performing segmentation on each image in the second image set based on the annotation information to obtain a plurality of segmented images, and dividing the plurality of segmented images into a plurality of segmented image sets according to the annotation information, wherein the segmented images in each segmented image set have the same annotation information;
[0053] S15, using a pre-trained particle or organism full-pose recognition model to recognize each segmented image in the segmented image set, obtaining a recognition vector for each segmented image, including the type, size, and recognition rate of the recognized particle or organism, and taking the recognition vector with the highest recognition rate in the segmented image set as the recognition result of the segmented image set;
[0054] S16. For each image in the second image set, a two-dimensional data table is established based on the recognition results of the segmented image set, including the coordinates of each segmented image and the recognition result; and the two-dimensional data table is sent to the water module.
[0055] Furthermore, the underwater module is used to perform the following steps:
[0056] S21, obtaining the two-dimensional data table;
[0057] S22, creating an empty image, the size of the empty image being the size of the image taken by the underwater camera;
[0058] S23, segmenting the empty image based on the two-dimensional data table, and replacing the particle or biological image corresponding to the recognition result in the two-dimensional data table in each segmented area to generate an image containing particles or organisms.
[0059] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the above-mentioned method for in-situ acquisition of underwater particulate matter and biological images.
[0060] The specific implementation methods of the above steps are described in detail below:
[0061] Step S11: Acquire a plurality of continuous images taken underwater, recorded as the first image set
[0062] The purpose of this step is to obtain a continuous image sequence from the underwater camera as input data for subsequent processing. The specific implementation is as follows:
[0063] 1) Configure the underwater camera and set appropriate resolution, frame rate, and exposure parameters to adapt to the underwater shooting environment.
[0064] 2) Start the underwater camera and continuously collect image sequences of the underwater scene. The acquisition time can be determined according to the needs of the application scenario. It is usually necessary to ensure that the image sequence is of sufficient length to cover the entire area of interest.
[0065] 3) The acquired image sequence is stored as a first image set. An appropriate image format (such as JPEG, PNG, etc.) can be selected for storage to facilitate subsequent reading and processing.
[0066] 4) Record metadata information of the first image set, such as acquisition time, location, camera parameters, etc., for subsequent use.
[0067] Step S12: Preprocess the first image set to obtain a second image set
[0068] The purpose of this step is to pre-process the original captured image to improve the efficiency and accuracy of subsequent processing. The specific implementation is as follows:
[0069] 1) Image denoising: Due to the complexity and uncertainty of the underwater environment, the collected images may have varying degrees of noise and interference. Classic image denoising algorithms (such as Gaussian filtering, median filtering, etc.) or deep learning-based denoising networks (such as FFDNet, CBDNet, etc.) can be used to denoise the images.
[0070] 2) Image enhancement: Underwater images usually have problems such as low contrast and color distortion. Traditional image enhancement methods such as histogram equalization, Retinex algorithm, CLAHE, or deep learning-based image enhancement networks (such as UWCNN, UWAN, etc.) can be used to enhance the contrast and correct the color of the image.
[0071] 3) Image cropping: If there are a large number of background areas or areas of no interest in the original image, the image can be adaptively cropped using methods based on depth estimation or semantic segmentation to retain the area of interest and improve the efficiency of subsequent processing.
[0072] 4) Image resizing: The preprocessed images are uniformly scaled to the specified resolution to meet the input requirements of the subsequent model. During the scaling process, it is necessary to maintain the aspect ratio to avoid deformation.
[0073] 5) Data enhancement: Perform data enhancement operations on the preprocessed images, such as random cropping, flipping, rotation, color jittering, etc., to increase the diversity of training data and improve the generalization ability of the model.
[0074] 6) The image sequence that has undergone the above preprocessing is stored as a second image set as input data for subsequent steps.
[0075] It should be noted that the parameter settings of the preprocessing operation (such as filter kernel size, enhancement strength, etc.) need to be adjusted and optimized according to the specific data set and application scenario. In addition, the order of the preprocessing steps may also be adjusted according to actual needs.
[0076] Step S13: Using the pre-trained particle or organism tracking model, perform model calculation on each image in the second image set to obtain the particle and organism labeling information corresponding to each image.
[0077] The purpose of this step is to use the trained particle or biological tracking model to perform inference calculations on each image in the second image set to obtain the detection, segmentation and tracking information of the particle or biological target in each image. The specific implementation method is as follows:
[0078] 1) Load a pre-trained particle or biological tracking model. The model should have the functions of target detection, instance segmentation, and cross-frame target association.
[0079] 2) Each image in the second image set is input into the model in turn for forward reasoning calculation.
[0080] 3) The model first uses the object detection head to process the input image, generates a series of candidate object boxes, and predicts the object category for each candidate box.
[0081] 4) For each candidate target box, the instance segmentation head of the model will generate a corresponding segmentation mask describing the fine-grained shape of the target object.
[0082] Among them, in the entire underwater particle and biological image in-situ acquisition method, the establishment and training of particle or biological tracking models is a key link. The role of this model is to use the pre-trained model to perform model calculations on each image in the second image set to obtain the particle and biological labeling information corresponding to each image. This labeling information is used to uniquely code the particles or organisms in the image, providing a basis for subsequent image segmentation and recognition.
[0083] The establishment and training process of particle or biological tracking models mainly involves the following aspects:
[0084] (I) Acquisition of training data set
[0085] The acquisition of training data sets is the basis for model training. For particle or biological tracking models, the training data sets should cover various underwater environments, different types of particles and organisms, different lighting conditions, etc., to ensure that the model has good versatility and robustness.
[0086] Specifically, the training data set can be obtained in the following ways:
[0087] 1. Field collection: Organize special underwater sampling operations and use diving equipment or remote-controlled submersibles to collect video or image data in different waters. This method can obtain the most realistic underwater scene data, but it is costly and time-consuming.
[0088] 2. Synthetic data: Using computer graphics and image synthesis technology, different types of particles or biological models are superimposed on the existing real underwater background images to generate a large amount of diverse synthetic image data. This method is more flexible, but there is a certain gap between synthetic data and real data.
[0089] 3. Internet collection: Collect underwater images or video resources from the Internet, and form a training data set after manual screening and annotation. This method has a certain time efficiency, but the diversity and quality of the data may be affected.
[0090] 4. Combination of the above methods: Generally, combining the above three methods can obtain a sufficient number of training data sets with rich varieties and high quality.
[0091] In addition to the original video or image data, the training data set also needs to include manually annotated label information. For particle or biological tracking models, the label information mainly includes:
[0092] 1) Bounding box: used to locate the position of the target object (particles or organisms) in the image, usually marked in the form of a rectangular box.
[0093] 2) Segmentation mask: Finely annotating the actual contour of the target object at the pixel level can more accurately describe the shape and boundary of the target object.
[0094] 3) Object category: mark the specific type of the target object, such as different types of particles or organisms.
[0095] 4) Object numbering: If there are multiple target objects of the same category in an image, each object needs to be assigned a unique number to enable tracking of the same target object in different frames.
[0096] Labeling is usually done by specially trained human labelers or with the help of semi-automatic labeling tools. The quality of labeling will directly affect the training effect of the model.
[0097] (II) Model structure
[0098] The structure of the particle or biological tracking model usually adopts a design that combines target detection and instance segmentation. It mainly consists of the following parts:
[0099] 1. Feature extraction network: Use convolutional neural networks to extract features from input images and obtain multi-scale and multi-level feature maps. Commonly used feature extraction networks include ResNet, Inception, EfficientNet, etc.
[0100] 2. Object detection head: Based on the feature map, the object detection algorithm (such as Faster R-CNN, YOLO, etc.) is used to predict the classification and location of the target object and output a series of candidate target boxes.
[0101] 3. Instance segmentation head: For each candidate target box, an instance segmentation algorithm (such as Mask R-CNN, etc.) is further used to generate a fine segmentation mask of the target object.
[0102] 4. Target association module: Through target tracking algorithms (such as DeepSort, ByteTrack, etc.), the detection results belonging to the same target object in different frames are associated and identified to achieve cross-frame target tracking and unique encoding.
[0103] 5. Post-processing module: further filter, denoise and optimize the model output results to improve the accuracy and stability of detection and segmentation.
[0104] These modules can be combined and designed in series or parallel to form an end-to-end particle or biological tracking model. The specific structure and parameter settings of the model need to be adjusted and optimized according to factors such as the characteristics of the training data set and the difficulty of target detection and segmentation.
[0105] (III) Model training
[0106] After obtaining enough training data sets, you can start training the particle or biological tracking model. The goal of model training is to enable the model to accurately detect and segment particles or biological targets in the image given an input image through continuous iterative optimization, and assign a unique coding identifier to each target.
[0107] The main steps of model training are as follows:
[0108] 1. Data preprocessing: Perform necessary preprocessing on the training data set, including image cropping, scaling, data augmentation (such as rotation, flipping, noise addition, etc.) and other operations to increase data diversity and improve the generalization ability of the model.
[0109] 2. Divide the data set: Divide the preprocessed data set into training set, validation set and test set. The training set is used to optimize the model parameters, the validation set is used to adjust the model hyperparameters, and the test set is used to evaluate the final performance of the model. Usually the training set accounts for the largest proportion, and the validation set and test set each account for a small part.
[0110] 3. Define the loss function: Design a suitable loss function based on the difference between the model output and the ground truth label. The loss function usually includes multiple parts such as classification loss, bounding box regression loss, segmentation mask loss, etc., and these parts need to be weighted summed.
[0111] 4. Select an optimizer: Select an appropriate optimization algorithm and learning rate strategy to continuously adjust model parameters during training and minimize the value of the loss function. Commonly used optimizers include SGD, Adam, RMSProp, etc.
[0112] 5. Training iteration: In mini-batch mode, input the training data into the model batch by batch for forward calculation and back propagation to update the model parameters. After each epoch, evaluate the model performance on the validation set, and adjust the hyperparameters or optimization strategies based on the evaluation indicators (such as mean average precision mAP, etc.).
[0113] 6. Model evaluation: During the training process, the performance of the model can be regularly evaluated on the test set to check whether the model is overfitting or underfitting. Finally, the model with the best performance on the test set is selected as the final particle or organism tracking model.
[0114] 7. Model deployment: The trained model is optimized by model compression and quantization, and deployed to the target hardware platform (such as embedded devices, cloud servers, etc.) for actual particle or biological image acquisition applications.
[0115] During model training, we need to pay attention to the following key points:
[0116] 1) Dataset quality: High-quality and diverse training datasets are the basis for the model to achieve good performance. Training data can be expanded and enriched through data enhancement, semi-supervised learning, etc.
[0117] 2) Loss function design: Reasonable loss function design is crucial to the convergence and performance of the model. It is necessary to weight and balance the losses of different parts according to the characteristics of the specific task.
[0118] 3) Positive and negative sample balance: Since most images do not contain the target object, there is an imbalance problem between positive and negative samples. This problem can be alleviated by using technologies such as hard example mining and online hard example mining.
[0119] 4) Hyperparameter tuning: The setting of hyperparameters such as learning rate, batch size, and regularization strength has a significant impact on model performance and needs to be tuned through methods such as grid search and random search.
[0120] 5) Hardware acceleration: Using GPU or dedicated accelerators (such as TPU, FPGA, etc.) can greatly increase the speed of model training.
[0121] 6) Transfer learning: When there is enough labeled data, transfer learning can be performed based on models pre-trained on large public datasets (such as COCO, ImageNet, etc.) to achieve faster convergence and better performance.
[0122] The following is a specific implementation method for establishing and training the full pose recognition model:
[0123] In the in-situ acquisition method of underwater particles and biological images, the full pose recognition of particles or organisms is a key link. The purpose of this step is to use the pre-trained full pose recognition model of particles or organisms to recognize each segmented image in the segmented image set and obtain the recognition vector of each segmented image, including the type, size and recognition rate of the identified particles or organisms. This information will provide a basis for subsequent steps to ensure that the final generated image shows the true shape and state of the particles or organisms.
[0124] The establishment and training process of the full pose recognition model mainly involves the following aspects:
[0125] (I) Acquisition of training data set
[0126] The training data set is the basis of model training, and its quality and diversity directly affect the performance of the model. For particle or biological full-pose recognition models, the acquisition of training data sets needs to consider the following aspects:
[0127] (1) Diversity of target objects
[0128] The training dataset should contain various types of particles and organisms, such as different types of sand, silt, algae, plankton, shells, etc., to ensure that the model has a wide range of recognition capabilities.
[0129] (2) Morphological diversity of target objects
[0130] The same type of particles or organisms may have certain variations in morphology due to individual differences or different growth environments. Therefore, the training dataset needs to contain diverse morphologies of the same target object at different perspectives and postures to enhance the model’s robustness to deformation.
[0131] (3) Diversity of background environment
[0132] The complexity of the underwater environment leads to the variability of the background, such as the color, turbidity, lighting conditions of different water bodies, etc. The training dataset needs to cover a variety of background environments to improve the generalization ability of the model.
[0133] (4) Diversity of image quality
[0134] The image quality in the training dataset should have certain differences, including different resolutions, noise levels, contrast, etc., to enhance the model's adaptability to changes in image quality.
[0135] There are several ways to obtain a training data set that meets the above diversity requirements:
[0136] a) Field collection: Use diving equipment or remote-controlled submersibles to collect real images and video data in different waters, and have professionals annotate them. This method can obtain the most realistic data, but it is more expensive and takes a longer time.
[0137] b) Data synthesis: Based on computer graphics and 3D modeling technology, particles or biological models of different types, shapes and postures are synthesized on real background images to generate a large amount of high-quality synthetic image data.
[0138] c) Internet collection: Underwater images and video resources are collected from the Internet and formed into training data sets after manual screening and annotation.
[0139] d) Combination of the above methods: Generally, combining the above three methods can obtain a training data set with sufficient quantity, rich variety and high quality.
[0140] In addition to the original image data, the training dataset also needs to include detailed annotation information, mainly including:
[0141] (1) Fine segmentation mask of the target object: The actual contour of the target object is finely annotated at the pixel level to describe its precise shape and boundary.
[0142] (2) 3D model parameters of the target object: including the type, size, posture (position, orientation, etc.) and other parameters of the target object, which are used to characterize its overall posture state.
[0143] (3) Semantic attributes of the target object: such as the particle state of particles (round, angular, etc.), the activity state of organisms (moving, still, etc.), and other semantic attribute information.
[0144] Labeling is usually done by specially trained human labelers or with the help of semi-automatic labeling tools. The quality of labeling will directly affect the training effect of the model.
[0145] (II) Model structure
[0146] The structure of the particle or biological full pose recognition model usually adopts an end-to-end design based on deep learning, integrating the functions of feature extraction, pose estimation and attribute prediction in a unified network framework. The model mainly consists of the following parts:
[0147] (1) Feature extraction network
[0148] Convolutional Neural Network (CNN) is used to extract features from input images and obtain multi-scale and multi-level feature maps. Commonly used feature extraction networks include ResNet, Inception, EfficientNet, etc.
[0149] (2) Pose Estimation Head
[0150] Based on the feature map, the regression algorithm is used to predict the 3D pose parameters of the target object, including size, position, direction, etc. Commonly used pose estimation algorithms include PoseNet, DOPE, etc.
[0151] (3) Attribute prediction head
[0152] Also based on feature mapping, classification algorithms are used to predict the semantic attributes of the target object, such as type, shape, activity state, etc.
[0153] (4) Loss Function
[0154] The outputs of pose estimation and attribute prediction are compared with the ground truth labels, and the corresponding regression loss and classification loss are calculated as the objective function of model optimization.
[0155] (5) Post-processing module
[0156] The model output results are further filtered, optimized and fused to improve the accuracy and stability of pose estimation and attribute prediction.
[0157] These modules can be combined and designed in a cascade or parallel manner to form an end-to-end particle or biological full-pose recognition model. The specific structure and parameter settings of the model need to be adjusted and optimized according to factors such as the characteristics of the training data set and the complexity of the task.
[0158] (III) Model training
[0159] After obtaining enough training data sets, you can start training the particle or biological full pose recognition model. The goal of model training is to enable the model to accurately predict the 3D pose parameters and semantic attributes of the target object in the image given an input image through continuous iterative optimization.
[0160] The main steps of model training are as follows:
[0161] (1) Data preprocessing
[0162] Perform necessary preprocessing on the training data set, including image cropping, scaling, data enhancement (such as rotation, flipping, color jittering, etc.), etc., to increase the diversity of the data and improve the generalization ability of the model.
[0163] (2) Dividing the Dataset
[0164] The preprocessed dataset is divided into training set, validation set and test set. The training set is used to optimize the model parameters, the validation set is used to adjust the model hyperparameters, and the test set is used to evaluate the final performance of the model.
[0165] (3) Define the loss function
[0166] According to the difference between the model output (pose estimation results and attribute prediction results) and the ground truth label, a suitable loss function is designed. The loss function usually includes multiple parts such as pose regression loss and attribute classification loss, which need to be weighted summed.
[0167] (4) Select an optimizer
[0168] Select appropriate optimization algorithms and learning rate strategies to continuously adjust model parameters during training and minimize the value of the loss function. Commonly used optimizers include SGD, Adam, RMSProp, etc.
[0169] (5) Training Iterations
[0170] In a mini-batch manner, the training data is input into the model batch by batch for forward calculation and back propagation to update the model parameters. After each epoch, the model performance is evaluated on the validation set, and the hyperparameters or optimization strategies are adjusted according to the evaluation indicators (such as average precision AP, average posture error APE, etc.).
[0171] (6) Model evaluation
[0172] During the training process, the performance of the model can be regularly evaluated on the test set to check whether the model is overfitting or underfitting. Finally, the model with the best performance on the test set is selected as the final full pose recognition model.
[0173] (7) Model deployment
[0174] The trained model is optimized by model compression and quantization, and deployed on the target hardware platform for actual particle or biological image acquisition applications.
[0175] During model training, we need to pay attention to the following key points:
[0176] a) Loss function design: Reasonable loss function design is crucial to the convergence and performance of the model. It is necessary to make a weighted balance between the pose regression loss and the attribute classification loss according to the characteristics of the specific task.
[0177] b) Balance of positive and negative samples: Since most images do not contain target objects, there is an imbalance between positive and negative samples. This problem can be alleviated by using technologies such as hard example mining and online hard example mining.
[0178] c) Hyperparameter tuning: The setting of hyperparameters such as learning rate, batch size, and regularization strength has a significant impact on model performance and needs to be tuned through methods such as grid search and random search.
[0179] d) Hardware acceleration: Using GPU or dedicated accelerators can greatly increase the speed of model training.
[0180] e) Transfer learning: When there is sufficient labeled data, transfer learning can be performed based on models pre-trained on large public datasets to achieve faster convergence and better performance.
[0181] Specific implementation of step S15
[0182] Step S15: Use the pre-trained particle or organism full-pose recognition model to identify each segmented image in the segmented image set, and obtain a recognition vector for each segmented image, including the type, size and recognition rate of the identified particle or organism, and use the recognition vector with the highest recognition rate as the recognition result of the segmented image set.
[0183] The purpose of this step is to use the trained full-pose recognition model to perform inference calculations on each segmented image in the segmented image set obtained in step S14, to obtain the type, size and recognition confidence of the particles or organisms corresponding to each image, and to select the result with the highest confidence as the final recognition result of the segmented image set.
[0184] The specific implementation is as follows:
[0185] 1. Load a pre-trained particle or biological full pose recognition model.
[0186] 2. Traverse the segmented image set obtained in step S14, and perform the following operations on each segmented image:
[0187] (1) Input the current segmented image into the full pose recognition model for forward reasoning calculation.
[0188] (2) The model first uses a feature extraction network to extract features from the input image and obtain a multi-scale feature map.
[0189] (3) Based on the feature map, the model’s pose estimation head will predict the 3D pose parameters of the target object, including size, position, and orientation.
[0190] (4) At the same time, the model’s attribute prediction head will predict the semantic attributes of the target object, such as type (specific category of particles or organisms), shape, etc.
[0191] (5) The pose estimation results and attribute prediction results are integrated to form the recognition vector of the current segmented image, including the type, size and recognition confidence (which can be obtained by the weighted sum of the pose regression loss and the attribute classification loss).
[0192] (6) For the same set of segmented images, the model will repeat the above operation on each segmented image to obtain multiple recognition vectors.
[0193] 3. In the same segmented image set, compare the confidence values of all recognition vectors and select the one with the highest confidence as the final recognition result of the segmented image set.
[0194] 4. Repeat the above process for all segmented image sets obtained in step S14 to obtain the best recognition result corresponding to each segmented image set.
[0195] When implementing this step, you need to pay attention to the following key points:
[0196] (1) Computational efficiency during model inference: Since a large number of segmented images need to be recognized, the model inference speed has an important impact on the real-time performance of the entire process. The inference efficiency can be improved through optimization methods such as model compression and quantization.
[0197] (2) Credibility evaluation of recognition results: The confidence value output by the model reflects the credibility of the recognition result. The setting of the confidence threshold will directly affect the accuracy and stability of the recognition. Usually, a reasonable confidence threshold range can be set according to the specific application scenario and model performance, such as 0.6 to 0.9.
[0198] (3) Consistency processing of the same target object: For multiple target objects of the same type in the same segmented image set, the recognition results of the model should remain consistent, that is, the size and attribute information should be close. If there are large differences, optimization and adjustment are required through the post-processing module.
[0199] Specific implementation of step S16
[0200] Step S16: For each image in the second image set, a two-dimensional data table is established based on the recognition results of the segmented image set, including the coordinates of each segmented image and the recognition results; and the two-dimensional data table is sent to the water module.
[0201] The purpose of this step is to associate the recognition results of each segmented image set obtained in step S15 with the position information in the original image, construct a two-dimensional data table, and provide necessary data support for the subsequent image reconstruction of the water module.
[0202] The specific implementation is as follows:
[0203] 1. Initialize an empty two-dimensional data table;
[0204] 2. Traverse each image in the second image set and perform the following operations:
[0205] (1) Obtain the index number or timestamp information of the current image in the entire image sequence to uniquely identify the image.
[0206] (2) Based on the result of step S14, obtain information of all segmented image sets corresponding to the image.
[0207] (3) Perform the following operations on each segmented image set:
[0208] a) Obtain the best recognition result of the segmented image set from the result of step S15, including information such as type, size and confidence.
[0209] b) Calculate the coordinate range of the segmented image set in the original image, which can be obtained by taking the boundary coordinates of the circumscribed rectangular frame of the segmented image or the fine segmentation mask.
[0210] c) The coordinate range and recognition result of the segmented image set are added to the two-dimensional data table as a row of data.
[0211] 3. After traversing all the images in the second image set, the construction of the two-dimensional data table is completed.
[0212] 4. Perform necessary encoding and compression on the two-dimensional data table to reduce the amount of data transmission.
[0213] 5. Send the encoded two-dimensional data table to the water module through wireless transmission or wired connection.
[0214] When implementing this step, you need to pay attention to the following key points:
[0215] (1) Unification of coordinate system: When calculating the coordinate range of the segmented image set, it is necessary to ensure that the coordinate system used is consistent with that of the water module to avoid subsequent coordinate conversion errors.
[0216] (2) Data encoding and compression: Reasonable data encoding and compression methods can significantly reduce the amount of data transmission and improve transmission efficiency. Common encoding methods include run-length coding and entropy coding, and compression algorithms include entropy coding algorithms (such as Huffman coding, arithmetic coding, etc.) and dictionary coding algorithms (such as LZW algorithm).
[0217] (3) Reliability of data transmission: The data transmission environment between underwater and surface is relatively harsh, and error detection and retransmission mechanisms are required to ensure the integrity and correctness of the data.
[0218] (4) Real-time requirements: Depending on the specific application scenario, the real-time requirements for data transmission may vary. If real-time display is required, it is necessary to optimize each link of image acquisition, processing, and transmission to shorten the delay time.
[0219] Specific implementation of step S21
[0220] The purpose of this step is to receive and obtain the two-dimensional data table sent from step S16 at the surface module end, so as to provide necessary input data for the subsequent image reconstruction process.
[0221] The specific implementation is as follows:
[0222] 1. Configure a suitable wired or wireless data receiving module on the hardware platform of the water module (such as server, industrial computer, etc.).
[0223] 2. According to the data transmission protocol and encoding method adopted in step S16, the receiving module is configured and initialized accordingly.
[0224] 3. Start the receiving module and continuously monitor the data transmission from the underwater module.
[0225] 4. Once the data packet is received, the integrity and correctness of the data packet is checked immediately. If the check passes, the data packet is decoded and decompressed to restore the original two-dimensional data table.
[0226] 5. Perform necessary preprocessing on the restored two-dimensional data table, such as coordinate conversion, data format conversion, etc., to adapt to the subsequent image reconstruction process.
[0227] 6. Store the preprocessed two-dimensional data table in the storage medium of the water module as input data for image reconstruction.
[0228] When implementing this step, you need to pay attention to the following key points:
[0229] (1) Configuration of the data receiving module: According to the actual application scenario, select a suitable wired or wireless data receiving module and configure its parameters correctly to ensure stable reception of data transmission from underwater.
[0230] (2) Data integrity and correctness check: Due to the complexity of the underwater data transmission environment, the received data may have problems such as packet loss and error codes. Therefore, it is necessary to implement integrity checks (such as checksums, cyclic redundancy checks, etc.) and correctness checks (such as adding data packet sequence numbers, etc.) at the data receiving end to ensure data reliability.
[0231] (3) Data decoding and decompression: According to the specific encoding and compression algorithm adopted in step S16, corresponding decoding and decompression operations are implemented on the surface module side to restore the original two-dimensional data table.
[0232] (4) Data preprocessing: Since the underwater and surface modules may use different coordinate systems and data formats, it is necessary to perform necessary conversion and reconstruction on the received two-dimensional data table to meet the needs of subsequent image reconstruction.
[0233] Specific implementation method of step S22: creating an empty image, the size of the empty image is the size of the image taken by the underwater camera.
[0234] The purpose of this step is to create a blank image on the surface module side as a canvas for subsequent image reconstruction. The size of the blank image needs to be consistent with the original image captured by the underwater camera to ensure that the reconstructed image can match the original scene.
[0235] The specific implementation is as follows:
[0236] 1. Obtain the image resolution parameters of the underwater camera, including width and height. These parameters can be obtained from the metadata information recorded in step S11, or sent by the underwater module during data transmission.
[0237] 2. According to the obtained resolution parameters, a continuous space is allocated in the memory of the water module to store the pixel data of the blank image.
[0238] 3. Initialize the space and set all pixel values to the background color (usually black or transparent).
[0239] 4. If necessary, you can add other metadata information to the blank image, such as image format, color space, bit depth, etc.
[0240] 5. Store the initialized blank image in the storage medium of the water module as the starting point for subsequent image reconstruction.
[0241] When implementing this step, you need to pay attention to the following key points:
[0242] (1) Acquisition of resolution parameters: Accurately acquiring the resolution parameters of the underwater camera is a prerequisite for creating a blank image of the correct size. If the parameters are acquired incorrectly, the subsequent reconstructed image will not match the original scene.
[0243] (2) Memory allocation and initialization: Calculate the required memory space size based on the resolution parameters, and perform efficient memory allocation and initialization operations to ensure the integrity and consistency of the image data.
[0244] (3) Adding metadata information: Different image formats and color spaces correspond to different metadata information. Correctly setting this information will help with subsequent image display and processing.
[0245] (4) Selection of storage media: The storage medium of the blank image needs to have sufficient storage space and read / write speed to meet the needs of subsequent image reconstruction. You can choose storage methods such as high-speed hard disks, solid-state drives, or memory-mapped files.
[0246] 6. Specific implementation of step S23: segment the empty image based on the two-dimensional data table, and replace the particle or biological image corresponding to the recognition result in the two-dimensional data table in each segmented area to generate an image containing particles or organisms.
[0247] The purpose of this step is to perform segmentation and pixel replacement operations on the blank image created in step S22 based on the two-dimensional data table obtained in step S21, "inject" the recognition results of particles or organisms into the blank image, and finally generate a reconstructed image containing particles or organisms.
[0248] The specific implementation is as follows:
[0249] 1. Load the blank image created in step S22 and the two-dimensional data table obtained in step S21.
[0250] 2. Traverse each row of data in the two-dimensional data table and perform the following operations:
[0251] (1) Obtain the coordinate range information of the segmented image from the current row data.
[0252] (2) Segment the blank image according to the coordinate range to obtain a rectangular segmentation area.
[0253] (3) Obtain the recognition result of the segmented image from the current row data, including information such as type, size, and confidence.
[0254] (4) Based on the recognition results, a matching target image template is searched from a pre-established particle or biological image library. The image library can be generated based on real data or three-dimensional modeling, and contains particle or biological images of different types, sizes, and postures.
[0255] (5) The found target image template is appropriately scaled, rotated, and translated so that its size and posture match the recognition result.
[0256] (6) Render the transformed target image template into the current segmented area of the blank image and replace the pixel values in the area.
[0257] 3. After traversing all the data rows in the two-dimensional data table, all the segmented areas on the blank image will be replaced by the corresponding particle or biological images, thereby generating a reconstructed image containing particles or organisms.
[0258] 4. Perform necessary post-processing on the reconstructed image, such as edge smoothing, background superposition, etc., to improve the visual effect.
[0259] 5. Display the final reconstructed image on the display device of the water module, or save it as an image file for further analysis and processing.
[0260] When implementing this step, you need to pay attention to the following key points:
[0261] (1) Coordinate system consistency: the coordinate information in the blank image and the two-dimensional data table must be consistent;
[0262] (2) Preparation of target image template
[0263] In order to obtain ideal rendering results, the pre-prepared particle or biological image library needs to meet the following requirements:
[0264] a) Rich variety: The image library needs to contain a sufficient variety of particles and organisms to be consistent with the training dataset in order to match the recognition results.
[0265] b) Diverse sizes: Target objects of the same type require templates of different sizes to accommodate different size recognition results.
[0266] c) Posture diversity: The templates in the image library should contain samples of the target object in different postures (position, orientation, etc.) to match different posture recognition results.
[0267] d) Quality requirements: The quality of the image template needs to be high to ensure clarity and authenticity and avoid visual quality degradation during rendering.
[0268] (3) Image transformation and rendering
[0269] To render the target image template into the segmented area of the blank image, the following transformation operations need to be performed:
[0270] a) Scaling: Based on the size information in the recognition result, the image template is scaled to match the size of the actual target object.
[0271] b) Rotation transformation: According to the direction information in the recognition result, the image template is rotated to make its orientation consistent with the orientation of the actual target object.
[0272] c) Translation transformation: According to the position of the segmented area, the transformed image template is translated so that its position on the blank image matches the position of the actual target object.
[0273] d) Rendering algorithm: Render the transformed image template into the segmented area of the blank image, which can be done by directly replacing pixel values, Alpha blending or other rendering algorithms.
[0274] (4) Post-processing of reconstructed images
[0275] After rendering of all segmented regions is completed, the following post-processing operations can be performed on the reconstructed image to improve the visual quality:
[0276] a) Edge smoothing: Smoothing the pixel values at the edge of the segmented area to eliminate jagged edges and color blocks. Commonly used algorithms include bilinear interpolation and Gaussian smoothing.
[0277] b) Background rendering: If necessary, an underwater background image can be superimposed on the reconstructed image to make the reconstructed image more consistent with the real scene.
[0278] c) Color correction: Due to the influence of underwater lighting, the color of the reconstructed image may be different from the original scene. Global or local color correction can be performed to improve color restoration.
[0279] d) Contrast enhancement: Perform contrast enhancement on the reconstructed image to improve clarity and layering.
[0280] e) Noise removal: Use image denoising algorithm to eliminate noise and spots in the reconstructed image and improve image clarity.
[0281] (5) Image display and storage
[0282] After post-processing, the reconstructed image can be displayed in real time on the display device (such as a monitor, projector, etc.) of the water module for real-time monitoring and analysis. At the same time, the reconstructed image can also be saved as an image file to facilitate subsequent offline processing and analysis.
[0283] During image display and storage, the following points should be noted:
[0284] a) Parameter setting of display device: According to the resolution, color space and other parameters of the display device, the reconstructed image is appropriately scaled and the color space is converted.
[0285] b) Image encoding and compression: If you need to save the reconstructed image as a file, you can choose a suitable image encoding format (such as JPEG, PNG, etc.) and compression algorithm, weighing the image quality and file size.
[0286] c) Preservation of metadata information: The metadata information of the reconstructed image (such as shooting time, location, camera parameters, etc.) also needs to be preserved to facilitate subsequent data management and analysis.
[0287] Through the above steps, images containing particles or organisms can be successfully reconstructed on the surface module side, realizing in-situ visualization of underwater scenes.
[0288] A third aspect of the present invention provides an in-situ acquisition system for underwater particulate matter and biological images, which includes the above-mentioned computer-readable storage medium.
[0289] Specifically, the principle of the present invention is: the present invention combines deep learning technology with dedicated data processing and transmission mechanisms to achieve efficient detection, identification and real-time visualization of underwater particles and organisms.
[0290] The key technical solutions of the invention include:
[0291] 1. Use the pre-trained particle or organism tracking model to accurately detect and segment target particles or organisms from underwater image sequences, and associate and uniquely identify the same target across frames. The model integrates multiple technologies such as target detection, instance segmentation, and target tracking to effectively cope with the complex challenges of underwater environments.
[0292] 2. Using the pre-trained particle or biological full pose recognition model, perform all-round pose estimation and semantic attribute prediction on the segmented target image, including important feature information such as target type, size, 3D pose, etc. This model integrates 3D pose estimation and attribute prediction in a unified network framework to achieve end-to-end prediction.
[0293] 3. For the original image and its segmentation results at each time step, a two-dimensional data table containing the target coordinates and recognition results is established, and the compact data is transmitted to the surface module. This design overcomes the bandwidth and reliability challenges of underwater and surface data transmission.
[0294] 4. The water module uses the received two-dimensional data table to reconstruct a real-time image containing particles or biological targets on a blank canvas, and accurately renders the size and posture of the target image. At the same time, combined with post-processing technology, high-quality image reconstruction and display can be achieved.
[0295] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for in-situ acquisition of underwater particulate matter and biological images, characterized in that: It includes an underwater module and an above-water module. The underwater module is arranged at an underwater terminal and is used to identify and extract a two-dimensional data table representing the image based on the image taken by the underwater camera, and upload the two-dimensional data table to an above-water server. The above-water module is arranged in the above-water server and is used to restore the image based on the two-dimensional data table. Wherein, the underwater module is used to perform the following steps: S11, obtaining a plurality of continuous images taken underwater, recorded as a first image set; S12, preprocessing the first image set to obtain a second image set; S13, using a pre-trained particle or organism tracking model, performing model calculation on each image in the second image set to obtain annotation information of particles and organisms corresponding to each image, wherein the annotation information is used to uniquely code and mark the particles or organisms in the image; S14, performing segmentation on each image in the second image set based on the annotation information to obtain a plurality of segmented images, and dividing the plurality of segmented images into a plurality of segmented image sets according to the annotation information, wherein the segmented images in each segmented image set have the same annotation information; S15, using a pre-trained particle or organism full-pose recognition model to recognize each segmented image in the segmented image set, obtaining a recognition vector for each segmented image, including the type, size, and recognition rate of the recognized particle or organism, and taking the recognition vector with the highest recognition rate in the segmented image set as the recognition result of the segmented image set; S16. For each image in the second image set, establish a two-dimensional data table based on the recognition result of the segmented image set, including the coordinates of each segmented image and the recognition result; and send the two-dimensional data table to the surface module; The above-water module is used to perform the following steps: S21, obtaining the two-dimensional data table; S22, creating an empty image, the size of the empty image being the size of the image taken by the underwater camera; S23, segmenting the empty image based on the two-dimensional data table, and replacing the particle or biological image corresponding to the recognition result in the two-dimensional data table in each segmented area to generate an image containing particles or organisms; Wherein, the particle or biological tracking model includes: Feature extraction network, which uses convolutional neural network to extract features from the input image group and obtain multi-scale and multi-level feature maps; The target detection head uses the target detection algorithm based on the feature map to predict the classification and location of the target object and output the candidate target box; The instance segmentation head generates a segmentation mask of the target object using the instance segmentation algorithm for each candidate target box; The target association module associates and identifies the detection results of the same target object in different frames of the input image group through the target tracking algorithm to achieve cross-frame tracking; The training steps of the particle or biological full pose recognition model include: Obtaining a full-pose training data set, specifically, obtaining all known particle or biological images, and using a computer three-dimensional model to perform three-dimensional reconstruction on the particle or biological image to obtain a particle or biological three-dimensional image, and then deriving the full-pose image of the particle or biological by rotating on the three-dimensional XYZ axis, deriving an image every time the rotation is 1°, and using all the derived images and their specific particle or biological names as the full-pose training data set; A convolutional neural network is trained using the full-pose training data set to obtain a particle or biological full-pose recognition model.
2. The method for in-situ acquisition of underwater particles and biological images according to claim 1, characterized in that: The training steps of the particle or biological tracking model include: Preprocessing and data enhancement are performed on a training data set, wherein the training data set is specifically a set of images obtained by manually annotating particles or organisms on a large number of real images collected in different waters; Dividing the training data set into a training set, a validation set and a test set; Define the loss function including classification loss, regression loss and segmentation mask loss parts; Input the training data into the model in small batches for forward calculation and back propagation to update the model parameters; After each training cycle, the model performance is evaluated on the validation set and the hyperparameters are adjusted; the optimal model is evaluated and selected on the test set.
3. The method for in-situ acquisition of underwater particles and biological images according to claim 2, characterized in that: The feature extraction network of the particle or biological tracking model adopts ResNet, Inception or EfficientNet.
4. The method for in-situ acquisition of underwater particles and biological images according to claim 3, characterized in that: The feature extraction network of the particle or biological full-pose recognition model adopts the same feature extraction network as the particle or biological tracking model.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the method for in-situ acquisition of underwater particulate matter and biological images according to any one of claims 1 to 4.
6. An underwater particle and biological image in-situ acquisition system, characterized in that: Contains the computer-readable storage medium of claim 5.
Citation Information
Patent Citations
Marine organism identification system and identification method based on deep neural network
CN112149612A
Mask R-CNN mineral particle identification and particle size detection method based on improved mask
CN114897816A
Dendritic spine labeling method and tracking method of neuron fluorescence microscopic image
CN116030463A
Specific object tracking shooting method and system
CN116489516A
Electronic element and electrically controlled display element
WO2020125839A1
