Image segmentation method, system, readable storage medium and computer
By preprocessing and feature extraction of the Mosaic bamboo forest image dataset, and building and optimizing the image segmentation network, the difficulty of on-site investigation and cumbersome processing problems in Mosaic bamboo forest image segmentation is solved, and a more efficient and accurate Mosaic bamboo forest segmentation effect is achieved.
Patent Information
- Application Number
- CN202411562391.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The existing method of image segmentation of bamboo forests has problems such as difficulty in field investigation, complicated traditional image segmentation processing, and automatic identification of bamboo forests with low precise location.
An image segmentation method is proposed, by acquiring the image data set in real time for data preprocessing, extracting feature data to build an image segmentation network, and optimizing the network through weight calculation, combining the learned offset parameters to dynamically adjust the sampling position of the model to build an image segmentation optimization model.
It improves image processing efficiency, reduces manpower burden, enhances the model's ability to characterize complex shapes and structural features, and improves the accuracy and robustness of bamboo forest segmentation.
Smart Images

Figure CN119068202B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image segmentation method, system, readable storage medium and computer. Background Art
[0002] Moso bamboo forest is a major subtropical bamboo species with a wide range of uses. It is also the most developed and studied fine economic bamboo species. Therefore, rapid and accurate extraction of the distribution information of moso bamboo forest is of great significance for mastering the distribution scale of moso bamboo, predicting the yield of moso bamboo and the economic development of bamboo industry.
[0003] However, the existing image segmentation methods for bamboo forests have the following disadvantages:
[0004] 1. Field surveys of bamboo forest distribution are difficult. Bamboo is a plant with a long growth cycle. Its growth, bamboo density, and bamboo forest structure change slowly. Long-term field surveys are required to draw accurate conclusions, but field surveys often consume a lot of time and human resources.
[0005] 2. Traditional image segmentation processing is relatively cumbersome. Traditional image segmentation methods, such as those based on threshold, edge detection, and region growing, usually require manual adjustment of parameters to adapt to different scenarios. For complex forest environments and special requirements of bamboo forests, a lot of experiments and tuning may be required, and the robustness and generalization ability of the algorithm may be limited.
[0006] 3. The automatic identification of bamboo forest location has low accuracy. The bamboo forest image has a complex background. There are usually a large number of trees, shrubs and ground vegetation inside the forest. These objects are similar in shape to the bamboo forest, which increases the difficulty of segmenting the bamboo forest location in the image. Summary of the invention
[0007] Based on this, the purpose of the present invention is to provide an image segmentation method, system, readable storage medium and computer to solve the deficiencies in the above-mentioned technology.
[0008] The present invention provides an image segmentation method, comprising:
[0009] Acquire an image data set acquired by an image acquisition device in real time, and perform data preprocessing on the image data set to obtain a preprocessed data set;
[0010] Extracting features from the preprocessed data set, and constructing an image segmentation network based on the extracted feature data;
[0011] Performing weight calculation on the feature data, and optimizing the image segmentation network based on the weight calculation result to construct a corresponding image segmentation model;
[0012] Dynamically adjusting the sampling position of the image segmentation model using a learnable offset parameter so that the image segmentation model can represent the complex shape and structural features of the image, thereby obtaining an image segmentation optimization model;
[0013] An index evaluation is performed on the image segmentation optimization model. If the index evaluation result meets the preset requirements, the image segmentation model is used to perform image segmentation on the image data to be processed.
[0014] Furthermore, the steps of acquiring an image data set collected by an image acquisition device in real time and performing data preprocessing on the image data set to obtain a preprocessed data set include:
[0015] Uniformly cropping the image data set, and performing image screening on the uniformly cropped image data set to obtain a corresponding image processing data set;
[0016] The image processing data set is randomly divided to obtain corresponding image training sets and image verification sets.
[0017] Furthermore, the steps of extracting features from the preprocessed data set and constructing an image segmentation network based on the extracted feature data include:
[0018] Extracting common feature data from the preprocessed data set based on a preset deep learning algorithm, and extracting specific feature data from the preprocessed data set using an autonomous learning algorithm;
[0019] The general feature data and the specific feature data are adaptively fused to construct a corresponding image segmentation network.
[0020] Furthermore, the steps of performing weight calculation on the feature data and optimizing the image segmentation network based on the weight calculation result to construct a corresponding image segmentation model include:
[0021] Superimposing the common feature data and the specific feature data to obtain combined feature data;
[0022] A Sigmoid function is used to generate a weight coefficient for the combined feature data, and the weight of the combined feature data is dynamically adjusted according to the weight coefficient to construct a corresponding image segmentation model.
[0023] The present invention also provides an image segmentation system, comprising:
[0024] A data preprocessing module, used to acquire an image data set collected by an image acquisition device in real time, and perform data preprocessing on the image data set to obtain a preprocessed data set;
[0025] A feature extraction module, used to extract features from the preprocessed data set and construct an image segmentation network based on the extracted feature data;
[0026] A model building module, used for performing weight calculation on the feature data, and optimizing the image segmentation network based on the weight calculation result to build a corresponding image segmentation model;
[0027] A model optimization module, used for dynamically adjusting the sampling position of the image segmentation model using a learnable offset parameter so that the image segmentation model can represent the complex shape and structural features of the image, thereby obtaining an image segmentation optimization model;
[0028] The image segmentation module is used to perform index evaluation on the image segmentation optimization model. If the index evaluation result meets the preset requirements, the image segmentation model is used to perform image segmentation on the image data to be processed.
[0029] Furthermore, the data preprocessing module includes:
[0030] A data cropping unit, used to uniformly crop the image data set, and perform image screening on the uniformly cropped image data set to obtain a corresponding image processing data set;
[0031] The random division unit is used to randomly divide the image processing data set to obtain a corresponding image training set and an image verification set.
[0032] Furthermore, the feature extraction module includes:
[0033] A feature extraction unit, used to extract common feature data in the preprocessed data set based on a preset deep learning algorithm, and to extract specific feature data in the preprocessed data set using an autonomous learning algorithm;
[0034] The adaptive fusion unit is used to adaptively fuse the general feature data and the specific feature data to construct a corresponding image segmentation network.
[0035] Furthermore, the model building module includes:
[0036] A feature superposition unit, used for superimposing the common feature data and the specific feature data to obtain combined feature data;
[0037] A dynamic adjustment unit is used to generate a weight coefficient of the combined feature data using a Sigmoid function, and dynamically adjust the weight of the combined feature data according to the weight coefficient to construct a corresponding image segmentation model.
[0038] The present invention also provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned image segmentation method is implemented.
[0039] The present invention further provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned image segmentation method when executing the computer program.
[0040] The image segmentation method, system, readable storage medium and computer of the present invention obtain a preprocessed data set by preprocessing the real-time collected image data set, and construct an image segmentation network by extracting features from the preprocessed data set through deep learning. The image segmentation network is optimized based on the feature data weight result to adaptively construct an image segmentation model without manually designing a feature extractor, thereby improving image processing efficiency and reducing the manpower burden. A dual-branch feature encoding network structure is adopted, which not only integrates the feature extraction capability of advanced networks, but also combines autonomous learning to extract specific features suitable for image segmentation tasks, and fully integrates the advantages of the two branches through adaptive fusion to improve the generalization ability of the model. An offset guidance method is proposed in combination with deformable convolution, first using the spatial attention mechanism to highlight key features, and then dynamically adjusting the sampling position through learnable offset parameters, so that the model can effectively characterize the corresponding complex shapes and structural features, thereby enhancing the model's recognition and positioning capabilities for various shapes. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of an image segmentation method in a first embodiment of the present invention;
[0042] Figure 2 for Figure 1 Detailed flow chart of step S101;
[0043] Figure 3 A schematic diagram of a partial bamboo forest image in the first embodiment of the present invention;
[0044] Figure 4 for Figure 1 Detailed flow chart of step S102;
[0045] Figure 5 This is a BFSNet network framework diagram in the first embodiment of the present invention;
[0046] Figure 6 for Figure 1 Detailed flow chart of step S103;
[0047] Figure 7 This is a structural diagram of the cross-domain adaptation module in the first embodiment of the present invention;
[0048] Figure 8 A schematic diagram of a feasible variable convolution in the first embodiment of the present invention;
[0049] Fig. 9 It is a structural diagram of the offset guiding module in the first embodiment of the present invention;
[0050] Fig.10 is a PR curve diagram of the ablation experiment in the first embodiment of the present invention;
[0051] Fig.11 is a segmentation result diagram of an ablation experiment in the first embodiment of the present invention;
[0052] Fig.12 The bamboo forest segmentation effect diagram of various methods in the first embodiment of the present invention;
[0053] Fig.13 is a structural block diagram of an image segmentation system in a second embodiment of the present invention;
[0054] Fig.14 FIG. 4 is a structural block diagram of a computer in a third embodiment of the present invention.
[0055] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0056] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0058] Embodiment 1
[0059] See also Figure 1 , which shows an image segmentation method in a first embodiment of the present invention, and the method specifically includes steps S101 to S105:
[0060] S101, acquiring an image data set acquired by an image acquisition device in real time, and performing data preprocessing on the image data set to obtain a preprocessed data set;
[0061] For further information, see Figure 2, the step S101 specifically includes steps S1011~S1012:
[0062] S1011, uniformly cropping the image data set, and performing image screening on the uniformly cropped image data set to obtain a corresponding image processing data set;
[0063] S1012: Randomly divide the image processing data set to obtain corresponding image training sets and image verification sets.
[0064] In the specific implementation, image acquisition equipment is used to collect images of the bamboo forest, wherein the image acquisition equipment includes but is not limited to equipment with shooting functions such as drones. For example, the image data collected by the drone is a JPG image in RGB format with an image resolution of 9504*6336, for a total of 477 images. To ensure the effectiveness of network training, the entire data set is randomly divided into two subsets, with 382 images as a training set and 95 images as a verification set.
[0065] Furthermore, since the original image size is too large, direct use for model training will bring great computational and storage burdens, so each image is evenly cropped. Each original image is cropped into 54 sub-images with a size of 1056*1056 pixels. The cropped dataset contains 20,628 training images and 5,130 verification images. Many images after cropping only contain background or bamboo forest areas, resulting in an extremely unbalanced positive and negative sample in the training process. For this reason, the cropped dataset is screened and valid data with foreground targets accounting for between 10% and 60% is retained. Finally, a set of datasets suitable for bamboo forest segmentation network training is obtained. The data contains a total of 2,261 training images and 546 verification images, where each image size is 1056*1056. Figure 3 The specific performance of some bamboo forest images is shown.
[0066] S102, extracting features from the preprocessed data set, and constructing an image segmentation network based on the extracted feature data;
[0067] For further information, see Figure 4 , the step S102 specifically includes steps S1021~S1022:
[0068] S1021, extracting common feature data from the preprocessed data set based on a preset deep learning algorithm, and extracting specific feature data from the preprocessed data set using an autonomous learning algorithm;
[0069] S1022, adaptively fusing the general feature data and the specific feature data to construct a corresponding image segmentation network.
[0070] In this embodiment, the network structure of the constructed bamboo forest segmentation network (BFSNet) consists of two parts: feature encoding and feature decoding. The specific structure is as follows: Figure 5 As shown in the figure. The feature encoder adopts a dual-branch structure, in which one branch uses pre-trained ResNet to extract general feature representations, and the other branch uses autonomous learning to extract specific features suitable for bamboo forest segmentation tasks, and combines offset guidance to better characterize the complex shape and structure of bamboo forests. Finally, the features of the two branches are integrated through adaptive feature fusion to achieve information complementarity. The feature decoder reconstructs the bamboo forest features extracted from the feature encoder. The jump connection can pass the detailed information from the encoder to the decoder to compensate for the information loss caused by continuous pooling and strided convolution operations, and gradually applies transposed convolution to gradually restore the resolution to the original image size to achieve accurate segmentation of bamboo forests.
[0071] S103, performing weight calculation on the feature data, and optimizing the image segmentation network based on the weight calculation result to construct a corresponding image segmentation model;
[0072] For further information, see Figure 6 , the step S103 specifically includes steps S1031~S1032:
[0073] S1031, superimposing the common feature data and the specific feature data to obtain combined feature data;
[0074] S1032, using a Sigmoid function to generate a weight coefficient for the combined feature data, and dynamically adjusting the weight of the combined feature data according to the weight coefficient to construct a corresponding image segmentation model.
[0075] In specific implementation, due to the limitation that a single-branch feature extraction network cannot learn multiple types of features at the same time, this may limit the expressiveness of the model. In order to solve this problem and effectively utilize advanced feature extraction technology, this embodiment combines transfer learning and a dual-branch structure to propose a cross-domain adaptation module (CDAM). The core of CDAM is to use an adaptive fusion strategy to integrate the features of the two branches to improve the expressiveness and generalization ability of the model. The specific structure of CDAM is as follows: Figure 7 shown.
[0076] Specifically, CDAM first extracts features through transfer learning and autonomous learning. and , and then the merged features are obtained by adding the features. In order to reduce the redundancy between features and retain the information that has an important impact on the bamboo forest segmentation task, the merged features are first input into the Sigmoid function to generate weight coefficients, and then the weights are dynamically adjusted so that the model can adaptively obtain the best feature expression, thereby improving the generalization ability and adaptability of the model. The calculation process of CDAM can be expressed by the following formula:
[0077] ;
[0078] ;
[0079] ;
[0080] in, and They are the features extracted through transfer learning and autonomous learning, is the Sigmoid activation function, represents the weight, is the adaptive fusion feature, that is and The weighted sum of is the final output feature.
[0081] S104, dynamically adjusting the sampling position of the image segmentation model using a learnable offset parameter so that the image segmentation model can represent the complex shape and structural features of the image, thereby obtaining an image segmentation optimization model;
[0082] In the specific implementation, this embodiment innovatively proposes an offset guidance module (OGM) based on deformable convolution to cope with the various complex shapes of bamboo forests. By introducing the offset, the module can dynamically adjust the sampling position to more accurately adapt to and capture the subtle structure and irregular shape of the bamboo forest. This flexibility enables the model to more effectively perform feature extraction and target recognition when facing the changing environment in the bamboo forest, thereby improving the overall accuracy and robustness.
[0083] Standard convolution is to multiply the convolution kernel weights with the elements at the corresponding positions in the convolution window and sum them to generate the output feature map elements. By sliding the convolution kernel on the input feature map with a specific stride, the entire output feature map is effectively calculated. Its calculation formula can be expressed as follows:
[0084]
[0085] in, is the center position of the convolution window on the input feature map, The receptive field size and dilation rate are defined. Represents the convolution window Locations for The relative coordinates of is the convolution kernel weight, Represents the convolution window The regular grid sampling in standard convolution makes it difficult for the network to adapt to geometric deformation. Deformable convolution is an improved version of standard convolution that can effectively handle geometric deformation of input data. By introducing a learnable offset, the convolution kernel can dynamically adjust its position according to the input data, thereby improving the model's ability in spatial modeling. Figure 8 shown.
[0086] Furthermore, this embodiment also uses deformable convolution, in which the sampling position of the deformable convolution is dynamic and learnable, which makes it more effectively adapt to the changes in the shape of the object. The basic principle is to learn the offset in a network so that the sampling points of the convolution kernel on the input feature map are offset, so as to focus on the area or target of interest. Deformable convolution introduces an offset in regular grid sampling. ∆Pn, Its specific expression is shown in the following formula:
[0087]
[0088] OGM first performs maximum pooling and average pooling on the input feature map in the channel dimension to compress the channel size, and combines global pooling and average pooling to splice by channel; then convolution is performed on the splicing result and processed by the Sigmoid activation function to obtain the attention weight, and different weights are assigned to each spatial position of the input feature to enhance the feature expression of the specific target area and weaken the irrelevant background area; finally, deformable convolution is used to improve the model's adaptive ability in spatial modeling. The specific structure of OGD is as follows: Fig. 9 As shown, the specific calculation process can be expressed by the following formula:
[0089] ;
[0090] ;
[0091] ;
[0092] in, Represents the input of OGM, is average pooling, is the maximum pooling, represents convolution, represents the attention weight, represents the Sigmoid function, is a deformable convolution, Represents the output of OGM.
[0093] S105, performing index evaluation on the image segmentation optimization model, and if the index evaluation result meets the preset requirements, performing image segmentation on the image data to be processed using the image segmentation model.
[0094] In the specific implementation, after the model training is completed, this embodiment uses indicators such as Intersection over Union (IoU), Dice coefficient, Precision (P) and Recall (R) to evaluate the segmentation performance of different models on the validation set. Among them, IoU is used to measure the spatial overlap between the segmentation prediction result and the true label mask, which is defined as the ratio of their intersection area to the union area. The Dice coefficient is twice the intersection area divided by the total area of the predicted mask and the true mask, which is used to evaluate the consistency of the prediction result with the true label. P represents the accuracy of the model in predicting the target pixels of the bamboo forest, and R represents the ability of the model to capture all the target pixels of the bamboo forest.
[0095] Through the above evaluation indicators, the performance of different segmentation models can be comprehensively evaluated, so as to effectively compare the performance differences between different methods. The formula definitions of the above indicators are shown in the following formulas:
[0096] ;
[0097] ;
[0098] ;
[0099] ;
[0100] Among them, True Positive (TP) refers to the number of pixels correctly predicted as bamboo forest. False Positive (FP) refers to the number of pixels incorrectly predicted as bamboo forest. False Negative (FN) refers to the number of pixels incorrectly predicted as background.
[0101] Furthermore, in order to verify the effectiveness of the proposed CDAM and OGM, this embodiment designs corresponding ablation experiments in combination with the control variable method. The segmentation results are first evaluated on the baseline model, and then the CDAM is embedded in the baseline model for experimental evaluation, and the evaluation results of the two are compared to verify the effectiveness of CDAM. On this basis, OGM is further embedded, and the evaluation results before and after embedding are compared to verify the effectiveness of OGM. Among them, √ represents that the module is embedded, and × represents that the module is not embedded. In order to ensure the fairness of the ablation experiment, the experimental environment and model parameters are strictly consistent to eliminate interference or deviations that may be caused by external factors.
[0102] Table 1 Ablation experiment
[0103]
[0104] Table 1 shows the results of ablation experiments. The first row shows the segmentation results of bamboo forests of the baseline model, the second row shows the segmentation results of bamboo forests with CDAM embedded in the baseline model, and the third row shows the segmentation results of bamboo forests with both CDAM and OGM embedded in them. Comparing the data in the first two rows, it can be found that the P, R, IoU and Dice of the model are improved after CDAM is embedded, and the R index is improved by 4.51%. Comparing the data in the last two rows, it can be found that all four indexes are improved to a certain extent, and IoU and Dice are improved by 1.75% and 1.30% respectively. This is because the embedded CDAM and OGM enhance the model's ability to represent the characteristics of bamboo forests, effectively extract specific features suitable for bamboo forest segmentation, and significantly improve the model's detection performance. The improved model is 1.01%, 4.75%, 3.53% and 3.06 higher than the baseline model in P, R, IoU and Dice indicators respectively. The ablation experiment results show that the proposed CDAM and OGM can effectively improve the segmentation accuracy of bamboo forests of the model.
[0105] Specifically, Fig.10 is the PR curve of the ablation experiment. The larger the area under the PR curve, the better the trade-off between precision and recall, and the better the performance. It can be seen from the figure that the area under the baseline model with both CDAM and OGM embedded is larger than the area under the baseline model with CDAM embedded, and the area under the baseline model with CDAM embedded is larger than the area under the baseline model. This further proves the effectiveness of CDAM and OGM.
[0106] The ablation experiment segmentation results are shown in part as follows Fig.11 As shown in the figure. The baseline model has difficulty in segmenting the bamboo forest area on the left side of the image. After embedding the CDAM module, the bamboo forest area on the edge is effectively segmented, but the bamboo forest area on the left side and the bamboo forest area in the upper left corner are mistakenly identified as a whole. With OGM's excellent bamboo forest shape modeling ability, the final segmentation result is effectively improved.
[0107] In order to prove the effectiveness and superiority of BFSNet, this example conducts comparative experiments with mainstream image segmentation methods UNet, UNet++, AttentionUNet, CENet, and DeepLabv3. The comparative experiments still use P, R, IoU, and Dice as evaluation indicators, comprehensively compare the performance of these methods on the self-made data set, and comprehensively evaluate the advancedness of BFSNet in processing bamboo forest segmentation.
[0108] Table 2 Comparative experiment
[0109]
[0110] Table 2 shows the comparison results between BFSNet and other methods. BFSNet shows the best segmentation performance in terms of single evaluation indicators of P and R. This is because CDAM and OGM can enhance the model's ability to extract and characterize bamboo forest features, thereby effectively improving the performance of the model. IoU and Dice can comprehensively evaluate the segmentation effect of the model. The IoU indicators of UNet, UNet++, AttentionUNet, CENet and DeepLabv3 are all below 70%, and only the IoU indicator of BFS exceeds 70%. The Dice indicators of UNet, UNet++, AttentionUNet and CENet are all below 80%, and BFSNet is 2.65% higher than the second-best DeepLab v3+. Comprehensively comparing the four indicators, BFSNet has achieved the best segmentation effect, verifying the effectiveness of BFSNet in processing bamboo forest segmentation tasks.
[0111] The segmentation results of bamboo forest by different methods are shown as follows: Fig.12 As shown in the figure. As the boundary of bamboo forest is not obvious, UNet, UNet++, AttentionUNet, CENet and DeepLabv3 will segment two independent bamboo forests into one area. These methods have poor ability to model the shape of bamboo forest. BFSNet combined with CDAM and OGM can effectively characterize the complex shape and structural characteristics of bamboo forest, thereby enhancing the model's ability to recognize and locate bamboo forests of various shapes, and is more suitable for completing the segmentation task of bamboo forest.
[0112] In summary, the image segmentation method in the above embodiment of the present invention obtains a preprocessed data set by preprocessing the real-time collected image data set, and constructs an image segmentation network based on the data of feature extraction of the preprocessed data set by deep learning, and optimizes the image segmentation network based on the feature data weight result to adaptively construct an image segmentation model, without the need to manually design a feature extractor, thereby improving image processing efficiency and reducing manpower burden; a dual-branch feature encoding network structure is adopted, which not only integrates the feature extraction capability of the advanced network, but also combines autonomous learning to extract specific features suitable for image segmentation tasks, and fully integrates the advantages of the two branches through adaptive fusion to improve the generalization ability of the model, and proposes an offset guidance method in combination with deformable convolution, first using the spatial attention mechanism to highlight the key features, and then dynamically adjusting the sampling position through the learnable offset parameter, so that the model can effectively characterize the corresponding complex shape and structural features, thereby enhancing the model's recognition and positioning capabilities for various shapes.
[0113] Embodiment 2
[0114] Another aspect of the present invention is to provide an image segmentation system. Fig.13 , shown is an image segmentation system in a second embodiment of the present invention, the system comprising:
[0115] The data preprocessing module 11 is used to acquire the image data set collected by the image acquisition device in real time, and perform data preprocessing on the image data set to obtain a preprocessed data set;
[0116] Furthermore, the data preprocessing module 11 includes:
[0117] A data cropping unit, used to uniformly crop the image data set, and perform image screening on the uniformly cropped image data set to obtain a corresponding image processing data set;
[0118] The random division unit is used to randomly divide the image processing data set to obtain a corresponding image training set and an image verification set.
[0119] A feature extraction module 12 is used to extract features from the preprocessed data set and construct an image segmentation network based on the extracted feature data;
[0120] Furthermore, the feature extraction module 12 includes:
[0121] A feature extraction unit, used to extract common feature data in the preprocessed data set based on a preset deep learning algorithm, and to extract specific feature data in the preprocessed data set using an autonomous learning algorithm;
[0122] The adaptive fusion unit is used to adaptively fuse the general feature data and the specific feature data to construct a corresponding image segmentation network.
[0123] A model building module 13, used for performing weight calculation on the feature data, and optimizing the image segmentation network based on the weight calculation result, so as to build a corresponding image segmentation model;
[0124] Furthermore, the model building module 13 includes:
[0125] A feature superposition unit, used for superimposing the common feature data and the specific feature data to obtain combined feature data;
[0126] A dynamic adjustment unit is used to generate a weight coefficient of the combined feature data using a Sigmoid function, and dynamically adjust the weight of the combined feature data according to the weight coefficient to construct a corresponding image segmentation model.
[0127] A model optimization module 14, used to dynamically adjust the sampling position of the image segmentation model using a learnable offset parameter so that the image segmentation model can represent the complex shape and structural features of the image, thereby obtaining an image segmentation optimization model;
[0128] The image segmentation module 15 is used to perform index evaluation on the image segmentation optimization model. If the index evaluation result meets the preset requirements, the image segmentation model is used to perform image segmentation on the image data to be processed.
[0129] The functions or operation steps implemented when the above modules and units are executed are generally the same as those in the above method embodiments, and will not be repeated here.
[0130] The image segmentation system provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the system embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0131] Embodiment 3
[0132] The present invention also provides a computer, see Fig.14 , shown is a computer in the third embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, the above-mentioned image segmentation method is implemented.
[0133] The memory 10 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10 may be an internal storage unit of a computer, such as a hard disk of the computer. In other embodiments, the memory 10 may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. Further, the memory 10 may also include both an internal storage unit of the computer and an external storage device. The memory 10 may be used not only to store application software and various types of data installed in the computer, but also to temporarily store data that has been output or is to be output.
[0134] Among them, in some embodiments, the processor 20 can be an electronic control unit (Electronic Control Unit, abbreviated as ECU, also known as a vehicle computer), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 10 or process data, such as executing access restriction programs, etc.
[0135] It should be pointed out that Fig.14 The structure shown does not constitute a limitation on the computer. In other embodiments, the computer may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0136] The embodiment of the present invention further provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the image segmentation method as described above is implemented.
[0137] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0138] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0139] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0140] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0141] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An image segmentation method, characterized in that: include: Acquire an image data set acquired by an image acquisition device in real time, and perform data preprocessing on the image data set to obtain a preprocessed data set; Extracting features from the preprocessed data set and constructing an image segmentation network based on the extracted feature data, wherein the steps of extracting features from the preprocessed data set and constructing an image segmentation network based on the extracted feature data include: Extracting common feature data from the preprocessed data set based on a preset deep learning algorithm, and extracting specific feature data from the preprocessed data set using an autonomous learning algorithm; Adaptively fusing the general feature data and the specific feature data to construct a corresponding image segmentation network; The feature data is weighted and the image segmentation network is optimized based on the weighted calculation result to construct a corresponding image segmentation model, wherein the step of weighting the feature data and optimizing the image segmentation network based on the weighted calculation result to construct a corresponding image segmentation model comprises: Superimposing the common feature data and the specific feature data to obtain combined feature data; Using a Sigmoid function to generate a weight coefficient for the combined feature data, and dynamically adjusting the weight of the combined feature data according to the weight coefficient to construct a corresponding image segmentation model; Dynamically adjusting the sampling position of the image segmentation model using a learnable offset parameter so that the image segmentation model can represent the complex shape and structural features of the image, thereby obtaining an image segmentation optimization model; An index evaluation is performed on the image segmentation optimization model. If the index evaluation result meets the preset requirements, the image segmentation model is used to perform image segmentation on the image data to be processed.
2. The image segmentation method according to claim 1, characterized in that: The steps of acquiring an image data set collected by an image acquisition device in real time and performing data preprocessing on the image data set to obtain a preprocessed data set include: Uniformly cropping the image data set, and performing image screening on the uniformly cropped image data set to obtain a corresponding image processing data set; The image processing data set is randomly divided to obtain corresponding image training sets and image verification sets.
3. An image segmentation system, characterized in that: include: A data preprocessing module, used to acquire an image data set collected by an image acquisition device in real time, and perform data preprocessing on the image data set to obtain a preprocessed data set; A feature extraction module is used to extract features from the preprocessed data set and construct an image segmentation network based on the extracted feature data, wherein the feature extraction module includes: A feature extraction unit, used to extract common feature data in the preprocessed data set based on a preset deep learning algorithm, and to extract specific feature data in the preprocessed data set using an autonomous learning algorithm; An adaptive fusion unit, used for adaptively fusing the general feature data and the specific feature data to construct a corresponding image segmentation network; A model building module is used to perform weight calculation on the feature data and optimize the image segmentation network based on the weight calculation result to construct a corresponding image segmentation model, wherein the model building module includes: A feature superposition unit, used for superimposing the common feature data and the specific feature data to obtain combined feature data; A dynamic adjustment unit, used to generate a weight coefficient of the combined feature data using a Sigmoid function, and dynamically adjust the weight of the combined feature data according to the weight coefficient to construct a corresponding image segmentation model; A model optimization module, used for dynamically adjusting the sampling position of the image segmentation model using a learnable offset parameter so that the image segmentation model can represent the complex shape and structural features of the image, thereby obtaining an image segmentation optimization model; The image segmentation module is used to perform index evaluation on the image segmentation optimization model. If the index evaluation result meets the preset requirements, the image segmentation model is used to perform image segmentation on the image data to be processed.
4. The image segmentation system according to claim 3, characterized in that: The data preprocessing module comprises: A data cropping unit, used to uniformly crop the image data set, and perform image screening on the uniformly cropped image data set to obtain a corresponding image processing data set; The random division unit is used to randomly divide the image processing data set to obtain a corresponding image training set and an image verification set.
5. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image segmentation method according to any one of claims 1 to 2 is implemented.
6. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image segmentation method according to any one of claims 1 to 2 is implemented.
Citation Information
Patent Citations
Fracture semantic segmentation method based on DeepLabV3 + network model
CN114998580A
Panoramic image segmentation method and model building method for unmanned aerial vehicle ocean monitoring
CN115908442A