A network degree detection method, device, storage medium and electronic equipment

The network density of chemical fiber filaments is detected through image processing and semantic segmentation models, which solves the problem of unstable manual detection and achieves efficient and accurate network density detection.

CN116563598BActive Publication Date: 2025-09-16NORTHEASTERN UNIV CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310330426.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2025-09-16
Estimated Expiration
2043-03-30

AI Technical Summary

Technical Problem

The existing artificial network degree detection method in chemical fiber spinning plants is unstable and unreliable, and cannot meet the detection needs of high-speed production.

Method used

Image processing and semantic segmentation models are used to extract network node features from the test image. The network degree of chemical fiber filament is calculated through mask detection of target contour image and node prediction image.

Benefits of technology

The accuracy and efficiency of chemical fiber filament network detection are improved, human errors are reduced, and the requirements of high-speed production are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563598B_ABST
    Figure CN116563598B_ABST
Patent Text Reader

Abstract

This application discloses a network degree detection method, device, storage medium, and electronic device. The method includes: performing image processing on a test image to obtain a plurality of target contour images corresponding to the test image, wherein each target contour image includes the contour of a target spinning object; performing network node feature extraction processing on the test image based on a preset semantic segmentation model to obtain a node prediction image corresponding to the test image; using each target contour image as a mask image, detecting the node prediction image to obtain a network degree detection result for each target spinning object. The detection method of obtaining network degree indicators based on image processing in this application is highly efficient and provides more accurate detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chemical fibers, and in particular to a network degree detection method, device, storage medium and electronic equipment. Background Art

[0002] Chemical fiber products are closely intertwined with our daily lives, from clothing to our living environments. my country's chemical fiber industry boasts a large inventory and a long history, creating enormous market potential for intelligent transformation and industrial upgrading. Furthermore, with the implementation of the global fiber industry's innovation-driven strategy, the convergence and integration of the fiber sector with emerging technologies is placing new demands on chemical fiber manufacturers. Therefore, the quality inspection of chemical fiber products has a significant impact on subsequent production processes. Interlocking density, a key quality indicator for chemical fiber products, refers to the number of interlocking nodes per unit length of chemical fiber filament. For chemical fiber filament, the interlocking density per unit length must fall within a certain range. Excessive interlocking density results in looseness, which prevents the yarn from fully untwisting during processing. This, combined with varying dye uptake during dyeing, can lead to interlocking spots on the fabric surface. Excessive interlocking density can lead to loosening and fuzzing of the interlocking nodes during weaving. Therefore, the correct interlocking density is crucial for subsequent production processes.

[0003] Many chemical fiber spinning plants currently use traditional manual methods for measuring interwoven fabric density. This involves placing multiple yarns in parallel in a water bath and visually counting them to determine the interwoven fabric density. However, this method has significant limitations in practice. First, manual testing relies on subjective evaluation, which is influenced by subjective and objective factors such as mood, thinking, and lighting. This results in significant instability, unreliability, and non-quantification, introducing numerous uncertainties and unreliability into product quality assessments. Second, the human eye cannot accurately measure the interwoven fabric density required during high-speed production. Summary of the Invention

[0004] In view of this, the present invention provides a network degree detection method, device, electronic device and storage medium, the main purpose of which is to solve the problem that manual network degree detection is not accurate enough.

[0005] To solve the above problems, the present application provides a network degree detection method, comprising:

[0006] Performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images includes a contour of a target spinning object;

[0007] Performing network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested;

[0008] The target contour images are used as mask images to detect the node prediction images, thereby obtaining network degree detection results of the target spinning.

[0009] Optionally, performing image processing on the image to be tested to obtain a target contour image corresponding to the target spinning in the image to be tested specifically includes:

[0010] Performing pre-processing on the image to be tested to obtain a first image after pre-processing;

[0011] performing threshold processing on the first image to obtain a second image in which a spinning area is separated from a non-spinning area;

[0012] performing dilation and corrosion processing on the second image to obtain a spinning profile image;

[0013] Contour detection is performed based on the spinning contour image to obtain a target contour image corresponding to the target spinning in the image to be tested.

[0014] Optionally, after performing network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested, the method further includes: training to obtain the semantic segmentation model, specifically including:

[0015] Acquire a plurality of historical images and a label image corresponding to each of the historical images;

[0016] performing grouping processing on the historical images and the label images to obtain a first data set including a plurality of first historical images and label images corresponding to the first historical images; and a second data set including a plurality of second historical images and label images corresponding to the second historical images;

[0017] Each of the first data sets is used as a training sample, and a preset semantic segmentation method is used to perform model training to obtain a current semantic segmentation model and current model parameters. The current semantic segmentation model and current model parameters are detected based on the second data set to obtain the semantic segmentation model.

[0018] Optionally, the method of using each of the first data sets as training samples, adopting a preset semantic segmentation method to perform model training, obtaining a current semantic segmentation model and current model parameters, and detecting the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model specifically includes the following steps:

[0019] Step 1: Based on each of the first data sets as training samples, a preset semantic segmentation method is used to perform model training to obtain a current semantic segmentation model;

[0020] Step 2: Determine whether the current model accuracy value meets the preset accuracy value. If the current model accuracy value is less than the preset accuracy value, execute step 3; if the current model accuracy value is greater than or equal to the preset accuracy value, repeat step 1 to obtain an updated current semantic segmentation model and updated current model parameters;

[0021] Step 3: Detect the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model.

[0022] Optionally, obtaining a label image corresponding to each of the historical images specifically includes:

[0023] Performing image labeling processing on each of the historical images to obtain a label file corresponding to each of the historical images, wherein the label file includes node area information and label category information of the historical image;

[0024] Based on the node area information and the label category information corresponding to each of the historical images, label images are produced for the label files corresponding to each of the historical images to obtain label images corresponding to each of the historical images.

[0025] Optionally, the detecting of the node prediction image based on each target contour image as a mask image to obtain the network degree detection result of each target spinning specifically includes:

[0026] Using each target contour image as a mask image, detecting the node prediction image, and extracting the node image corresponding to the target spinning;

[0027] Based on the node image corresponding to the target spinning, the network degree of the target spinning is calculated to obtain a detection result of the network degree.

[0028] Optionally, the calculating and obtaining the network degree of the target spinning based on the node image corresponding to the target spinning to obtain the detection result of the network degree specifically includes:

[0029] Obtaining the number of nodes corresponding to the target spinning based on the node image corresponding to the target spinning;

[0030] Calculating the actual length of the target spinning based on the number of pixels of the node image and the actual distance corresponding to each pixel;

[0031] Based on the number of nodes corresponding to the target spinning and the actual length of the target spinning, the network degree of the target spinning is calculated to obtain a detection result of the network degree.

[0032] To solve the above problems, the present application provides a network degree detection device, comprising:

[0033] Image processing module: used for performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images contains the contour of the target spinning;

[0034] Feature extraction module: used to perform network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested;

[0035] Detection module: used for detecting the node prediction image by using each target contour image as a mask image to obtain the network degree detection result of each target spinning.

[0036] To solve the above problem, the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above network degree detection method are implemented.

[0037] To solve the above problems, the present application provides an electronic device, which includes at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above network degree detection method when executing the computer program on the memory.

[0038] In the present application, image processing is performed on the image of the test spinning to obtain a target contour image corresponding to the target spinning, feature extraction is performed on the test image based on a preset semantic segmentation model to obtain a node prediction image, and the node prediction image is detected based on the target contour image as a mask image to obtain a network degree detection result of the target spinning. The detection method for obtaining the network degree index based on image processing is highly efficient and the detection result is more accurate.

[0039] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0041] Figure 1 This is a flow chart of a network degree detection method according to an embodiment of the present application;

[0042] Figure 2This is a flowchart of a network degree detection method according to another embodiment of the present application;

[0043] Figure 3 A structural block diagram of a network degree detection device according to another embodiment of the present application;

[0044] Figure 4 (a) The image to be tested in this application;

[0045] Figure 4 (b) Spinning profile image obtained after corrosion expansion treatment in this application;

[0046] Figure 4 (c) In this application, the node prediction image obtained after the semantic segmentation model performs network node feature extraction processing on the test image;

[0047] Figure 4 (d) target contour image corresponding to the target spinning in this application;

[0048] Figure 4 (e) Node image corresponding to the target spinning in this application;

[0049] Figure 4 (f) The image obtained by marking the circumscribed rectangle of the node outline on the test image. DETAILED DESCRIPTION

[0050] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0051] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but merely as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0052] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0053] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0054] It should also be understood that although the present application has been described with reference to certain specific examples, those skilled in the art will readily be able to implement many other equivalent forms of the present application.

[0055] The above and other aspects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

[0056] Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments described are merely examples of the present application and may be implemented in a variety of ways. Familiar and / or repetitive functions and structures are not described in detail to avoid obscuring the present application with unnecessary or redundant details. Therefore, the specific structural and functional details described herein are not intended to be limiting, but rather serve merely as a basis and representative basis for the claims to teach those skilled in the art to variously utilize the present application with substantially any suitable detailed structure.

[0057] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may all refer to one or more of the same or different embodiments according to the present application.

[0058] The present application embodiment provides a network degree detection method, such as Figure 1 Shown, including:

[0059] Step S101: performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images contains the contour of the target spinning;

[0060] During the specific implementation of this step, the image to be tested is first pre-processed, mean filtering is performed, and prominent noise points are smoothed, the picture size is adjusted to obtain a first image, and threshold processing is performed on the first image. The threshold processing can adopt the ostu threshold detection method. Through threshold detection, the spinning area in the image is separated from the non-spinning area to obtain a second image. Finally, the second image is eroded and expanded to separate the silk thread area and the background area in the second image to obtain the spinning contour image. Finally, the spinning contour image is subjected to contour detection processing to obtain the contour corresponding to each spinning, so as to obtain the target contour image corresponding to the target spinning.

[0061] Step S102: performing network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested;

[0062] During the specific implementation of this step, network node features are extracted from the image to be tested based on the preset semantic segmentation model and model parameters. In this step, the semantic segmentation model first loads the trained model parameters, inputs the image to be tested into the trained semantic segmentation model, and outputs the node prediction image containing network node features. The node prediction image marks the node area in white and other areas in black.

[0063] Step S103: using each target contour image as a mask image, detecting the node prediction image to obtain a network degree detection result of each target spinning.

[0064] During the specific implementation of this step, the node prediction image is detected based on each target contour image as a mask image, and the node image corresponding to the target spinning is obtained by extraction. Based on the node image corresponding to the target spinning, the nodes are screened according to the length and width of the nodes in the node image corresponding to the target spinning to obtain the number of nodes corresponding to the target spinning. Based on the number of pixels of the node image and the actual distance corresponding to each pixel, the actual length of the target spinning is calculated. Based on the number of nodes corresponding to the target spinning and the actual length of the target spinning, the network degree of the target spinning is calculated to obtain the detection result of the network degree.

[0065] In the present application, image processing is performed on the image of the test spinning to obtain a target contour image corresponding to the target spinning, feature extraction is performed on the test image based on a preset semantic segmentation model to obtain a node prediction image, and the node prediction image is detected based on the target contour image as a mask image to obtain a network degree detection result of the target spinning. The detection method for obtaining the network degree index based on image processing is highly efficient and the detection result is more accurate.

[0066] Another embodiment of the present application provides a network degree detection method, such as Figure 2 Shown, including:

[0067] Step S201: Acquire several historical images;

[0068] During the specific implementation of this step, an industrial camera can be used to collect historical spinning images. The historical spinning is placed in a water tank through a network degree detection sampling device. When the historical spinning is spread out in the water tank and has a good shape, a number of historical spinning images are obtained by taking pictures with a camera. In order to enrich the sample set, the several historical spinning images are cropped and the image size is unified to a specified size. For example, 100 historical spinning images are obtained by taking pictures with a camera, and 276 sample images are obtained after cropping the 100 historical spinning images. The sample images are uniformly converted to images of 512*512 pixels in size to obtain 276 historical images. This embodiment does not limit the number of historical spinning images taken by the camera and the sample images obtained after cropping. The number of historical spinning images taken by the camera and the sample images obtained after cropping can be adjusted according to actual needs.

[0069] Step S202: Based on each of the historical images, obtaining a label image corresponding to each of the historical images;

[0070] In the specific implementation process of this step, first, each of the historical images is image-labeled to obtain a label file corresponding to each of the historical images. The label file includes the node area information and label category information of the historical image. Labelme software can be used to label the historical images, manually label the node areas in each image, and record the categories of the marked node areas as network node areas to obtain a label file corresponding to each of the historical images. The label file is a JSON file that records the point set information of the marked node areas in the image and their corresponding label category information. For example, for the 276 historical images described above, 276 label files can be obtained after image labeling using labelme software. Then, based on the node area information and label category information corresponding to each of the historical images, a label image is generated for the label file corresponding to each of the historical images to obtain a label image corresponding to each of the historical images. Specifically, based on the node area information and label category information in the label file, a label image is drawn using a Python program. The pixels in the node area in the label file are assigned a value of 255, and the areas other than the node area are assigned a value of 0, thereby obtaining a label image corresponding to the label file. In this embodiment, there is no restriction on the size of pixel assignment. The assignment in this solution is to make the node area more prominent.

[0071] Step S203: training a semantic segmentation model based on each of the historical images and each of the label images;

[0072] During the specific implementation of this step, first, the historical images and the labeled images are grouped to obtain a first dataset comprising a plurality of first historical images and the labeled images corresponding to each first historical image, and a second dataset comprising a plurality of second historical images and the labeled images corresponding to each second historical image. For example, the 276 historical images and the labeled images corresponding to these 276 historical images are grouped, and 221 of the first historical images and the labeled images corresponding to these 221 first historical images are randomly selected to form the first dataset, while the remaining 55 second historical images and the labeled images corresponding to these 55 second historical images form the second dataset.

[0073] Secondly, using each of the first data sets as training samples, a preset semantic segmentation method is used to perform model training to obtain a current semantic segmentation model and current model parameters, and the current semantic segmentation model and current model parameters are tested based on the second data set to obtain the semantic segmentation model. The specific steps are as follows:

[0074] Step 1: Based on each of the first data sets as training samples, a preset semantic segmentation method is used to perform model training to obtain a current semantic segmentation model;

[0075] Specifically, each of the first data sets is used as a training sample, and the U-Net deep semantic segmentation method is adopted for training. The BCEWithLogitsLoss loss function is used, and the current semantic segmentation model is obtained after training.

[0076] Step 2: Determine whether the current model accuracy value meets the preset accuracy value. If the current model accuracy value is less than or equal to the preset accuracy value, execute step 3; if the current model accuracy value is greater than the preset accuracy value, repeat step 1 to obtain an updated current semantic segmentation model and updated current model parameters;

[0077] During the specific implementation of this step, the preset accuracy value can be set to 0.01. When the current model accuracy value is less than or equal to 0.01, step three is executed to obtain the semantic segmentation model. When the current model accuracy value is greater than 0.01, step one is repeated to train and obtain the updated current semantic segmentation model. The preset accuracy value can be adjusted according to actual needs.

[0078] Step 3: Detect the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model.

[0079] The semantic segmentation model obtained after cyclic iterative training is tested based on the second data set. The output results of each second historical image are input into the semantic segmentation model, and compared with the label image corresponding to the second historical image. The similarity between the output image and the label image corresponding to the second image meets the requirements, and the semantic segmentation model is obtained.

[0080] Step S204: performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images includes a contour of a target spinning target;

[0081] In the specific implementation process of this step, the image of the spinning sample to be tested is first collected by an industrial camera, and the size of the collected image is adjusted. In this solution, in order to facilitate the input of the semantic segmentation network, the size of the image to be tested is adjusted to a multiple of 32 to obtain the image to be tested. The image to be tested is as follows: Figure 4(a) is shown. Then, the image to be tested is pre-processed, mean-filtered and the prominent noise is smoothed, the image size is adjusted to obtain a first image, the first image is threshold-processed, and the threshold processing can adopt the ostu threshold detection method. Through the threshold detection, the spinning area in the image is separated from the non-spinning area to obtain a second image. Finally, the second image is eroded and expanded to separate the silk thread area and the background area in the second image to obtain the spinning profile image. The spinning profile image is shown in FIG. Figure 4 As shown in (b), the spinning profile image is finally subjected to contour detection processing to obtain the contour corresponding to each spinning to obtain the target contour image corresponding to the target spinning. The target contour image is shown in FIG. Figure 4 (d) shown.

[0082] Step S205: performing network node feature extraction processing on the image to be tested based on the semantic segmentation model to obtain a node prediction image corresponding to the image to be tested;

[0083] In the specific implementation process of this step, network node features are extracted from the image to be tested based on the semantic segmentation model and model parameters. In this step, the semantic segmentation model first loads the trained model parameters, inputs the image to be tested into the trained semantic segmentation model, and outputs the node area marked in white and other areas marked in black, and performs filtering and expansion processing on the node prediction image with more obvious node features. The node prediction image is as follows: Figure 4 (c) shown.

[0084] Step S206: using each target contour image as a mask image, detecting the node prediction image, and extracting the node image corresponding to the target spinning;

[0085] In the specific implementation process of this step, the node prediction image is detected based on each target contour image as a mask image, and the contour of the node in the node prediction image corresponding to the target contour image is extracted to obtain the node image corresponding to the target spinning. The node image corresponding to the target spinning is as follows: Figure 4 (e) shown.

[0086] Step S207: Based on the node image corresponding to the target spinning, the network degree of the target spinning is calculated to obtain a detection result of the network degree.

[0087] In the specific implementation process of this step, first, based on the node image corresponding to the target spinning, the number of nodes corresponding to the target spinning is obtained; specifically, based on the node image of the target spinning, the nodes are screened according to the length and width of the nodes, and the interference nodes that do not meet the node characteristics are eliminated. The circumscribed rectangle of each node outline is taken to obtain the number of nodes corresponding to the target spinning, and the screened nodes are marked on the image to be tested, such as Figure 4 (f) is shown. Then, based on the number of pixels of the node image and the actual distance corresponding to each pixel, the actual length of the target spinning is calculated; for example, the image of 512*512 pixel size as described above is equivalent to an image composed of 512*512 pixels, and the actual spinning length is approximately equal to the product of 512 pixels and the actual length represented by each pixel. For example, when the actual distance corresponding to each pixel is 0.025cm based on the camera parameters, the actual spinning length obtained at this time is 512*0.025=12.8cm. Finally, based on the number of nodes corresponding to the target spinning and the actual length of the target spinning, the network degree of the target spinning is calculated to obtain the detection result of the network degree. Specifically, the network degree of the target spinning is calculated by dividing the number of nodes corresponding to the target spinning by the actual length of the target spinning. The detection result of the network degree is obtained.

[0088] In the present application, a target contour image corresponding to the target spinning is obtained by performing image processing on the image of the test spinning, a node prediction image is obtained by constructing a semantic segmentation model to perform feature extraction on the test image, and the node prediction image is detected based on the target contour image as a mask image to obtain a network degree detection result of the target spinning. The detection method for obtaining the network degree index based on image processing is highly efficient and the detection result is more accurate.

[0089] Another embodiment of the present application provides a network degree detection device, such as Figure 3 Shown, including:

[0090] Image processing module 1: used for performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images contains the contour of the target spinning;

[0091] Feature extraction module 2: used to perform network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested;

[0092] Detection module 3: used to use each target contour image as a mask image to detect the node prediction image, and obtain the network degree detection result of each target spinning.

[0093] During the specific implementation process, the image processing module is specifically used to: perform pre-processing on the image to be tested to obtain a first image after pre-processing; perform threshold processing on the first image to obtain a second image in which the spinning area is separated from the non-spinning area; perform expansion and corrosion processing on the second image to obtain a spinning contour image; perform contour detection based on the spinning contour image to obtain a target contour image corresponding to the target spinning in the image to be tested.

[0094] During the specific implementation process, the network degree detection device also includes: a model training module, which is specifically used to: obtain a number of historical images and label images corresponding to each of the historical images; group each of the historical images and each of the label images to obtain a first data set containing a number of first historical images and label images corresponding to each of the first historical images; and a second data set containing a number of second historical images and label images corresponding to each of the second historical images; use each of the first data sets as a training sample, adopt a preset semantic segmentation method to perform model training, obtain a current semantic segmentation model and current model parameters, and detect the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model.

[0095] During the specific implementation process, the model training module is also used to: use each of the first data sets as a training sample, adopt a preset semantic segmentation method to perform model training, obtain the current semantic segmentation model and current model parameters, and detect the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model, specifically including: Step 1: Based on each of the first data sets as a training sample, adopt a preset semantic segmentation method to perform model training to obtain the current semantic segmentation model; Step 2: Determine whether the current model accuracy value meets the preset accuracy value. When the current model accuracy value is less than the preset accuracy value, execute Step 3; When the current model accuracy value is greater than or equal to the preset accuracy value, repeat Step 1 to obtain the updated current semantic segmentation model and the updated current model parameters; Step 3: Detect the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model.

[0096] During the specific implementation process, the model training module is also used to: perform image labeling processing on each of the historical images to obtain a label file corresponding to each of the historical images, wherein the label file includes the node area information and label category information of the historical image; based on the node area information and the label category information corresponding to each of the historical images, produce a label image for the label file corresponding to each of the historical images to obtain a label image corresponding to each of the historical images.

[0097] During the specific implementation process, the detection module 3 is specifically used to: use each target contour image as a mask image, detect the node prediction image, and extract the node image corresponding to the target spinning; based on the node image corresponding to the target spinning, calculate the network degree of the target spinning and obtain the detection result of the network degree.

[0098] During the specific implementation process, the detection module 3 is also used to: obtain the number of nodes corresponding to the target spinning based on the node image corresponding to the target spinning; calculate the actual length of the target spinning based on the number of pixels of the node image and the actual distance corresponding to each pixel; calculate the network degree of the target spinning based on the number of nodes corresponding to the target spinning and the actual length of the target spinning, and obtain the detection result of the network degree.

[0099] Another embodiment of the present application provides a storage medium storing a computer program. When the computer program is executed by a processor, the following method steps are implemented:

[0100] Step 1: performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images contains the contour of the target spinning;

[0101] Step 2: Performing network node feature extraction on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested;

[0102] Step 3: Using each target contour image as a mask image, detecting the node prediction image to obtain a network degree detection result of each target spinning.

[0103] The specific implementation process of the above method steps can be found in any of the above embodiments of the network degree detection method, and will not be repeated in this embodiment.

[0104] In the present application, image processing is performed on the image of the test spinning to obtain a target contour image corresponding to the target spinning, feature extraction is performed on the test image based on a preset semantic segmentation model to obtain a node prediction image, and the node prediction image is detected based on the target contour image as a mask image to obtain a network degree detection result of the target spinning. The detection method for obtaining the network degree index based on image processing is highly efficient and the detection result is more accurate.

[0105] Another embodiment of the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the following method steps when executing the computer program in the memory:

[0106] Step 2: Performing network node feature extraction on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested;

[0107] Step 3: Using each target contour image as a mask image, detecting the node prediction image to obtain a network degree detection result of each target spinning.

[0108] The specific implementation process of the above method steps can be found in any of the above embodiments of the network degree detection method, and will not be repeated in this embodiment.

[0109] In the present application, image processing is performed on the image of the test spinning to obtain a target contour image corresponding to the target spinning, feature extraction is performed on the test image based on a preset semantic segmentation model to obtain a node prediction image, and the node prediction image is detected based on the target contour image as a mask image to obtain a network degree detection result of the target spinning. The detection method for obtaining the network degree index based on image processing is highly efficient and the detection result is more accurate.

[0110] The specific implementation process of the above method steps can be found in any of the above embodiments of the network degree detection method, and will not be repeated in this embodiment.

[0111] The above embodiments are merely exemplary embodiments of the present application and are not intended to limit the scope of the present application. The scope of protection of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and scope of protection of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the scope of protection of the present application.

Claims

1. A network degree detection method, characterized in that: include: Performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images includes a contour of a target spinning object; Performing network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested; The target contour images are used as mask images to detect the node prediction images, thereby obtaining network degree detection results of the target spinning.

2. The method according to claim 1, wherein The performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested specifically includes: Performing pre-processing on the image to be tested to obtain a first image after pre-processing; performing threshold processing on the first image to obtain a second image in which a spinning area is separated from a non-spinning area; performing dilation and corrosion processing on the second image to obtain a spinning profile image; Contour detection is performed based on the spinning contour image to obtain a target contour image corresponding to the target spinning in the image to be tested.

3. The method according to claim 1, wherein After performing network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested, the method further includes: training to obtain the semantic segmentation model, specifically including: Acquire a plurality of historical images and acquire a label image corresponding to each of the historical images; performing grouping processing on the historical images and the label images to obtain a first data set including a plurality of first historical images and label images corresponding to the first historical images; and a second data set including a plurality of second historical images and label images corresponding to the second historical images; Each of the first data sets is used as a training sample, and a preset semantic segmentation method is used to perform model training to obtain a current semantic segmentation model and current model parameters. The current semantic segmentation model and current model parameters are detected based on the second data set to obtain the semantic segmentation model.

4. The method according to claim 3, wherein The method of using each of the first data sets as training samples, performing model training using a preset semantic segmentation method, obtaining a current semantic segmentation model and current model parameters, and detecting the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model specifically includes the following steps: Step 1: Based on each of the first data sets as training samples, a preset semantic segmentation method is used to perform model training to obtain a current semantic segmentation model; Step 2: Determine whether the current model accuracy value meets the preset accuracy value. If the current model accuracy value is less than the preset accuracy value, execute step 3; if the current model accuracy value is greater than or equal to the preset accuracy value, repeat step 1 to obtain an updated current semantic segmentation model and updated current model parameters; Step 3: Detect the current semantic segmentation model and current model parameters based on the second data set to obtain the semantic segmentation model.

5. The method according to claim 3, wherein The obtaining of the label image corresponding to each of the historical images specifically includes: Performing image labeling processing on each of the historical images to obtain a label file corresponding to each of the historical images, wherein the label file includes node area information and label category information of the historical image; Based on the node area information and the label category information corresponding to each of the historical images, label images are produced for the label files corresponding to each of the historical images to obtain the label images corresponding to each of the historical images.

6. The method according to claim 1, wherein The method of using each target contour image as a mask image to detect the node prediction image to obtain the network degree detection result of each target spinning specifically includes: Using each target contour image as a mask image, detecting the node prediction image, and extracting the node image corresponding to the target spinning; Based on the node image corresponding to the target spinning, the network degree of the target spinning is calculated to obtain a detection result of the network degree.

7. The method according to claim 6, wherein The calculating and obtaining the network degree of the target spinning based on the node image corresponding to the target spinning, and obtaining the detection result of the network degree, specifically includes: Based on the node image corresponding to the target spinning, obtaining the number of nodes corresponding to the target spinning; Calculating the actual length of the target spinning based on the number of pixels of the node image and the actual distance corresponding to each pixel; Based on the number of nodes corresponding to the target spinning and the actual length of the target spinning, the network degree of the target spinning is calculated to obtain a detection result of the network degree.

8. A network degree detection device, characterized in that: include: Image processing module: used for performing image processing on the image to be tested to obtain a plurality of target contour images corresponding to the image to be tested, wherein each of the target contour images contains the contour of the target spinning; Feature extraction module: used to perform network node feature extraction processing on the image to be tested based on a preset semantic segmentation model to obtain a node prediction image corresponding to the image to be tested; Detection module: used for detecting the node prediction image by using each target contour image as a mask image to obtain the network degree detection result of each target spinning.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network degree detection method according to any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: The system comprises at least a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the network degree detection method according to any one of claims 1 to 7 when executing the computer program on the memory.