CN-121982041-A - Method, system, electronic equipment and storage medium for segmenting netting images
Abstract
The application relates to a method, a system, electronic equipment and a storage medium for segmenting a web image, wherein the method comprises the steps of obtaining a multi-scale web image set, dividing the multi-scale web image set into a first image subset and a second image subset, training an initial model by utilizing the first image subset to obtain a target model, inputting the second image subset into the trained target model, enabling the target model to conduct recognition segmentation of a wire intersection point and a steel wire on each web image with preset scaling in the second image subset, outputting a web image segmentation result, obtaining the web image set, marking and data enhancement, training a segmentation model, effectively improving the accuracy of web image segmentation, and enhancing the feature extraction capability of the segmentation model by constructing a cross attention module and a cavity space pyramid pooling module to be fused to a U-Net framework, so that the continuity retention of a ' global context capture ' and ' thin line continuity are balanced better.
Inventors
- LI GEN
- WANG JIN
- HUANG XIAOHUA
- LIU HANGFEI
- YUAN TAIPING
- PANG GUOLIANG
Assignees
- 中国水产科学研究院南海水产研究所
Dates
- Publication Date
- 20260505
- Application Date
- 20251127
Claims (10)
- 1. A method for segmenting a web image, comprising: Acquiring a multi-scale netting image set, wherein the multi-scale netting image set comprises a plurality of netting images with preset scaling; Dividing the multi-scale netting image set into a first image subset and a second image subset; Training the untrained initial model by utilizing the first image subset to obtain a target model; inputting the second image subset into a trained target model, so that the target model carries out recognition and segmentation of network line intersection points and steel wires on each network clothing image with preset scaling in the second image subset, and outputting a network clothing image segmentation result.
- 2. The method of claim 1, wherein the first subset of images comprises a training subset and a validation subset; The training process is performed on the initial model by using the first image subset to obtain a target model, including: inputting a training subset in the first image subset into an initial model to train the initial model, and adjusting super parameters of the initial model in the training process of the initial model; After the initial model is trained, verifying the performance index of the initial model by utilizing a verification subset in the first image subset to obtain a verification result; And under the condition that the verification result meets the preset performance index, taking the trained initial model as a target model.
- 3. The method of claim 1, wherein the initial model is established by: Constructing a cross-attention module according to horizontal attention and vertical attention, wherein the horizontal attention is determined by diagonal masks, and the vertical attention is determined by feature association; Constructing a hole space pyramid pooling module by performing splicing processing on parallel branches in a channel dimension, wherein the parallel branches comprise convolution branches, four hole convolution branches with different hole ratios and a global average pooling branch; And fusing the cross attention module and the cavity pyramid pool module to a U-Net architecture to obtain an initial model.
- 4. The method according to claim 1, wherein the method further comprises: Determining the overlapping precision of the network line intersection points in the network clothing image segmentation result based on a matching strategy of connected domain analysis; determining the segmentation precision of the steel wires in the netting image segmentation result based on a polygon intersection ratio matching strategy; and under the condition that the overlapping precision and the segmentation precision do not meet a preset precision rule, re-executing the training processing of the initial model by using the first image subset to obtain a target model.
- 5. The method of claim 1, wherein the acquiring a set of multi-scale web images comprises: Acquiring an original netting image set; Respectively labeling each netting image in the original netting image set by utilizing an intelligent data platform to obtain labeled netting images; Presetting a plurality of different scaling scales, and respectively performing scaling treatment on the marked netting images according to each scaling scale to obtain netting images corresponding to each scaling scale one by one, so as to combine the netting images into a multi-scale netting image set.
- 6. The method of claim 5, wherein the labeling each of the web images in the original web image set with the intelligent data platform to obtain a labeled web image comprises: identifying each netting image in the original netting image set by utilizing an intelligent data platform, and determining the intersection point of the net wires and the steel wires of each netting image; filtering out network line intersection points and steel wires with definition which does not meet a preset definition rule for any network clothing image; and respectively labeling intersection point labels and steel wire labels on the filtered intersection points of the net wires and the steel wires to obtain labeled net clothing images.
- 7. The method of claim 5, wherein the method further comprises: and respectively adding corresponding salt and pepper noise to each netting image with preset scaling in the multi-scale netting image set.
- 8. A web image segmentation apparatus, comprising: The acquisition module is used for acquiring a multi-scale netting image set, wherein the multi-scale netting image set comprises a plurality of netting images with preset scaling; the dividing module is used for dividing the multi-scale netting image set into a first image subset and a second image subset; The training module is used for training the untrained initial model by utilizing the first image subset to obtain a target model; The segmentation module is used for inputting the second image subset into the trained target model so that the target model can conduct recognition segmentation of the intersection points of the net wires and the steel wires on each net image with preset scaling in the second image subset, and a net image segmentation result is output.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the web image segmentation method according to any one of claims 1-7 when the computer program is executed.
- 10. A storage medium having a computer program stored thereon, wherein the computer program when executed by a processor performs the steps of the method for web image segmentation of any one of claims 1 to 7.
Description
Method, system, electronic equipment and storage medium for segmenting netting images Technical Field The present application relates to the field of data processing technologies, and in particular, to a method and system for dividing a web image, an electronic device, and a storage medium. Background The net is used as a core component of an aquaculture net cage and an ocean protection facility, and the integrity (such as whether net wire intersection points fall off or not and whether steel wires are broken or not) directly influences the facility safety and the culture efficiency, so that accurate segmentation of net images (namely positioning of net wire intersection points and extraction of steel wire contours) is a key technical link of net quality detection and fault early warning. However, due to the insufficient extraction capability of model features, poor pertinence of data processing and enhancement schemes and lack of model training and optimization closed loop, the current netting image segmentation is difficult to balance global context capture and fine line continuity retention, lacks a noise enhancement strategy for adapting to fine granularity features of the netting, has low efficiency, is difficult to ensure performance stability of the model, cannot adapt to netting detection scenes, and is difficult to meet actual application requirements. Accordingly, there is a need to develop a web image segmentation method, system, electronic device, and storage medium that address one or more of the above-mentioned problems. Disclosure of Invention In view of the above, in order to solve the above technical problems or part of the technical problems, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for segmenting a web image, where the method obtains a web image set, marks a web image with an intelligent data platform, then performs scaling processing on the marked image, and inputs an enhanced image set into an untrained initial model to output a segmentation result, thereby obtaining an accurate web image segmentation scheme; and on the model construction, a cross attention module and a cavity space pyramid pooling module are constructed and fused to a U-Net framework to obtain a training model, so that the extraction capability and accuracy of the model to the image features of the netting are effectively improved. In a first aspect, the present application provides a method for segmenting a web image, the method comprising: Acquiring a multi-scale netting image set, wherein the multi-scale netting image set comprises a plurality of netting images with preset scaling; Dividing the multi-scale netting image set into a first image subset and a second image subset; Training the untrained initial model by utilizing the first image subset to obtain a target model; inputting the second image subset into a trained target model, so that the target model carries out recognition and segmentation of network line intersection points and steel wires on each network clothing image with preset scaling in the second image subset, and outputting a network clothing image segmentation result. In one possible embodiment, the first subset of images includes a training subset and a validation subset; The training process is performed on the initial model by using the first image subset to obtain a target model, including: inputting a training subset in the first image subset into an initial model to train the initial model, and adjusting super parameters of the initial model in the training process of the initial model; After the initial model is trained, verifying the performance index of the initial model by utilizing a verification subset in the first image subset to obtain a verification result; And under the condition that the verification result meets the preset performance index, taking the trained initial model as a target model. In one possible embodiment, the initial model is built by: Constructing a cross-attention module according to horizontal attention and vertical attention, wherein the horizontal attention is determined by diagonal masks, and the vertical attention is determined by feature association; Constructing a hole space pyramid pooling module by performing splicing processing on parallel branches in a channel dimension, wherein the parallel branches comprise convolution branches, four hole convolution branches with different hole ratios and a global average pooling branch; And fusing the cross attention module and the cavity pyramid pool module to a U-Net architecture to obtain an initial model. In one possible embodiment, the method further comprises: Determining the overlapping precision of the network line intersection points in the network clothing image segmentation result based on a matching strategy of connected domain analysis; determining the segmentation precision of the steel wires in the netting image segmentation re