A network equipment image integrity detection system and detection method thereof
Through the image segmentation model and adaptive discrimination module, combined with the yolov8 model, the accuracy problem of image integrity detection of network equipment in complex background is solved, and high accuracy and robustness detection in complex environments is achieved, suitable for different sizes and shape target.
Patent Information
- Application Number
- CN202410354759.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-03-27
AI Technical Summary
The prior art is difficult to accurately detect the target integrity of network device images in complex backgrounds and interference with text, stripes, etc., and is limited by the viewing angle and target size, and it is impossible to adaptively determine targets of different sizes and shapes.
The image segmentation model acquisition module, the target area extraction module and the target area integrity adaptive discrimination module are used to calculate the adaptive threshold, expansion operation and intersection length comparison, and combine the yolov8 model to perform image segmentation and target area extraction to realize the image of network equipment adaptive integrity detection.
It improves the accuracy and reliability of network equipment detection, can effectively detect completeness in complex environments, and is suitable for targets of different sizes and shapes, without artificial adjustment of thresholds, reducing dependence on viewing angles and distances.
Smart Images

Figure CN118052807B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a network equipment image integrity detection system and a detection method thereof. Background Art
[0002] With the continuous development of computer vision technology and artificial intelligence technology, many tasks are gradually becoming intelligent. Through relevant technologies to assist or even replace manual intelligent detection, we can avoid the problems of heavy workload, strong subjectivity and low efficiency of manual quality inspection. When performing intelligent detection tasks, image target integrity detection is an important link, which aims to determine whether the target in the image is complete and whether there are problems such as truncation. This technology has important practical value in many application fields, such as industrial quality inspection, autonomous driving, object recognition, etc. In industrial quality inspection tasks, integrity detection is used to determine whether the target is shot completely and improve the accuracy and reliability of the detection system. For autonomous driving, integrity detection is used to predict whether obstacles on the road are complete, help decision-making and plan paths. In object recognition tasks, integrity detection can improve the accuracy and robustness of the recognition system for targets. In summary, image target integrity detection is a key computer vision task. By analyzing the integrity of the target in the image, the accuracy of target recognition and understanding can be improved.
[0003] Network equipment is a dedicated hardware device used to connect various servers, PCs, application terminals and other nodes to form an information communication network. At present, the detection of network equipment still relies mainly on manual work. In order to realize intelligent detection, the first task is to perform integrity detection on the collected network equipment images. The existing target integrity detection method usually determines whether the target is complete based on the edge of the target in the image and compares it with the actual situation. When there is a complex background in the image, especially when there are interferences such as text and stripes, it is difficult to obtain a clear real edge of the target, so it is impossible to accurately judge whether the integrity requirements are met. Secondly, some existing discrimination methods have restrictions on the shooting distance and viewing angle based on the area they detect, and the integrity of the target may change with the change of viewing angle. In addition, the threshold setting needs to be manually changed according to the situation and target size, and it is impossible to reasonably distinguish different targets. Summary of the invention
[0004] To solve the above problems, the present invention adopts the following technical solution: a network device image integrity detection method, using an image segmentation model acquisition module, a target area extraction module and a target area integrity adaptive discrimination module, the output end of the image segmentation model acquisition module is connected to the input end of the target area extraction module, the output end of the target area extraction module is connected to the input end of the target area integrity adaptive discrimination module, characterized in that it includes the following specific steps:
[0005] Step S1. using the image segmentation model acquisition module to acquire a model for performing image segmentation on network devices in an image;
[0006] Step S2. Use the target area extraction module to input the data to be detected into the model to obtain the target area and other areas;
[0007] Step S3: using the target region integrity adaptive discrimination module to discriminate the target region, and the determination method using the target region integrity adaptive discrimination module is:
[0008] a. Calculate the adaptive threshold for the target area of the network device being identified. The threshold calculation takes into account the size of the detected device target area, the overall size of the image and its perimeter to adapt to targets of different sizes and shapes. The specific calculation formula is as follows:
[0009]
[0010] Among them, θ represents the calculated adaptive threshold; α is the integrity discrimination coefficient, which is used to set the overall scaling ratio and adjust the tolerance of the global discrimination of the device, and can be set according to the actual situation; C img Represents the perimeter of the image, and its value is also equal to the area value of the edge mask; S obj S is the area occupied by the target connected area of a single network device in the image; img To detect the area size of the image.
[0011] b. Perform a dilation operation on the current target area: use a rectangular structure element of size (30,30) and perform a dilation operation.
[0012] c. Calculate the intersection length: bitwise AND the dilated region with the edge mask created previously.
[0013] d. Compare the intersection length with the adaptive threshold. If the intersection length is less than the adaptive threshold, the output detection is a global device, the traversal ends, and the target area integrity adaptive judgment module is exited. Otherwise, the above judgment is performed on the next network device target area in the order of distance sorting.
[0014] e. If all detected network device target areas do not meet the global device conditions, the output detection is a local device, the target area integrity adaptive judgment module is exited, and the detection results are transmitted to the backend for recording and statistics.
[0015] Furthermore, in the step S1, the image segmentation model acquisition module is used to collect or gather production environment data, and image segmentation data sets of equipment targets are obtained through image segmentation and annotation.
[0016] Furthermore, in the step S1, the data set is used for segmentation task training of the yolov8 model to obtain the model.
[0017] Furthermore, in the step S2, the target area extraction module is first used to obtain the data to be detected, and then the data to be detected is input into the model to obtain a segmentation map with the area where the network device is located as the target area and other areas as the background.
[0018] Furthermore, in step S2, the segmentation map of the target area is converted into a grayscale image, and then converted into a binary image, and the target area in the obtained binary image is white, and other areas are black.
[0019] Furthermore, in step S3, the target area integrity adaptive discrimination module is first used to determine whether a target area exists. If not, the inspection result is output as no qualified area is detected, and the target area integrity adaptive discrimination module is exited.
[0020] Furthermore, in step S3, if there is a target area, an edge mask is created on each of the four sides of the image, the long side size of each mask is the length or width of the image, and the short side size is 1, and the extracted and sorted network device target areas are traversed to determine in turn whether the target area is global to the network device.
[0021] Furthermore, in the step S3, after the determination is completed, the detection result of whether the network device image is a global device or a local device is transmitted to the back end for recording and statistics according to the determination result.
[0022] The beneficial effects of the present invention are: using this network device image integrity detection system, a complete solution can be provided to solve the integrity detection of network devices in complex environments and with stripes and holes inside, and it can effectively solve the network device image integrity detection that is difficult to achieve with other methods, thereby improving the accuracy and reliability of network device detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings further illustrate the present invention, but the embodiments in the accompanying drawings do not constitute any limitation to the present invention.
[0024] Figure 1 A schematic diagram of a network device image integrity detection system provided by an embodiment;
[0025] Figure 2A flowchart of an image segmentation model acquisition module acquiring a model provided by an embodiment;
[0026] Figure 3 A flowchart of a network device image integrity detection method provided by an embodiment;
[0027] Figure 4 A flow chart of the target area integrity adaptive determination module provided in one embodiment. DETAILED DESCRIPTION
[0028] The technical solution of the present invention will be further described below in conjunction with the accompanying drawings of the embodiments of the present invention, and the present invention is not limited to the following specific implementation methods. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0029] like Figure 1 As shown, a network device image integrity detection system includes: an image segmentation model acquisition module, a target area extraction module and a target area integrity adaptive discrimination module; the output end of the image segmentation model acquisition module is connected to the input end of the target area extraction module, and the output end of the target area extraction module is connected to the input end of the target area integrity adaptive discrimination module.
[0030] like Figures 2 to 4 As shown, a network device image integrity detection method, using the above-mentioned network device image integrity detection system, includes the following specific steps:
[0031] Step S1. Use the image segmentation model acquisition module to acquire a model for performing image segmentation on network devices in an image.
[0032] That is to say, the image segmentation model acquisition module is directly used to collect network device images, and then the image segmentation model acquisition module is used to operate, so as to finally form a model for network device image segmentation.
[0033] Step S2: using the target region extraction module to input the data to be detected into the model to obtain the target region and other regions.
[0034] That is, the network device image segmentation model is output from the image segmentation model acquisition module to the target area extraction module, and after a series of operations are performed inside the target area extraction module, the target area and other areas are obtained.
[0035] Step S3: Use the target area integrity adaptive identification module to identify the target area, and transmit the detection results to the back end for recording and statistics.
[0036] That is to say, the target area integrity adaptive discrimination module is directly used to discriminate the input data, first confirming whether the target area exists, and then performing a series of calculations through the target area integrity adaptive discrimination module to finally obtain the discrimination result, and the result is transmitted to the external backend for recording and statistics.
[0037] Example 1
[0038] A network device image integrity detection method, using the network device image integrity detection system described above, comprises the following specific steps:
[0039] Step S1. Use the image segmentation model acquisition module to acquire a model for performing image segmentation on network devices in an image.
[0040] That is, the image segmentation model acquisition module is used to collect or gather production environment data, and image segmentation and annotation are performed to obtain an image segmentation dataset of the equipment target. The dataset is then used for segmentation task training of the yolov8 model to obtain the model.
[0041] Step S2: using the target region extraction module to input the data to be detected into the model to obtain the target region and other regions.
[0042] That is, the target area extraction module is first used to obtain the data to be detected, and then the data to be detected is input into the model to obtain a segmentation map with the area where the network device is located as the target area and other areas as the background. The segmentation map of the target area is then converted into a grayscale image, and then converted into a binary image, and the target area in the binary image is white and other areas are black.
[0043] Step S3: Use the target area integrity adaptive identification module to identify the target area, and transmit the detection results to the back end for recording and statistics.
[0044] That is to say, firstly, the target area integrity adaptive discrimination module needs to be used to determine whether the target area exists. If not, the inspection result is output as no qualified area is detected, and the target area integrity adaptive discrimination module is exited. If the target area exists, an edge mask is created on each of the four sides of the image. The long side size of each mask is the length or width of the image, and the short side size is 1. The extracted and sorted network device target areas are traversed to determine whether the target area is the global network device.
[0045] In the above embodiment, in step S3, the determination method using the target area integrity adaptive determination module is:
[0046] a. Calculate the adaptive threshold for the target area of the network device being identified. The threshold calculation takes into account the size of the detected device target area, the overall size of the image and its perimeter to adapt to targets of different sizes and shapes. The specific calculation formula is as follows:
[0047]
[0048] Among them, θ represents the calculated adaptive threshold; α is the integrity discrimination coefficient, which is used to set the overall scaling ratio and adjust the tolerance of the global discrimination of the device, and can be set according to the actual situation; C img Represents the perimeter of the image, and its value is also equal to the area value of the edge mask; S obj S is the area occupied by the target connected area of a single network device in the image; img To detect the area size of the image.
[0049] b. Perform a dilation operation on the current target area: use a rectangular structure element of size (30,30) and perform a dilation operation.
[0050] c. Calculate the intersection length: bitwise AND the dilated region with the edge mask created previously.
[0051] d. Compare the intersection length with the adaptive threshold. If the intersection length is less than the adaptive threshold, the output detection is a global device, the traversal ends, and the target area integrity adaptive judgment module is exited. Otherwise, the above judgment is performed on the next network device target area in the order of distance sorting.
[0052] e. If all detected network device target areas do not meet the global device conditions, the output detection is a local device and the target area integrity adaptive judgment module is exited.
[0053] Furthermore, after the determination is completed, the detection result of the network device image as a global device or a local device is transmitted to the back end for recording and statistics according to the determination result.
[0054] That is to say, by designing this network device image integrity detection system and using this detection system for detection, since the system has a complete solution to solve the integrity detection of network devices in complex environments and with stripes and holes inside, it can effectively solve the network device image integrity detection that is difficult to achieve with other methods, and improve the accuracy and reliability of network device detection. Furthermore, due to the use of yolov8 image segmentation to extract the network device area, compared with other integrity detection methods such as edge detection to obtain the target edge for detection, it has higher accuracy and robustness in the face of network devices in complex environments and with stripes and holes inside. Furthermore, this system proposes and designs to determine whether it is a global network device by calculating the degree of overlap between the device and the image boundary. Compared with other methods that compare by area, it is not limited to the shooting distance and viewing angle, which improves the applicability of integrity detection. In addition, it proposes and designs to obtain an adaptive threshold by the area of the device target area and the image size, and adapts to targets of different sizes in the image without manually modifying the threshold to use various situations. Solving other methods requires artificially setting and changing the threshold according to the situation and target size, and cannot reasonably distinguish the limitations of different targets.
[0055] In summary, the above-mentioned embodiments are not limitative embodiments of the present invention, and any modifications or equivalent variations made by those skilled in the art on the basis of the essential contents of the present invention are within the technical scope of the present invention.
Claims
1. A network device image integrity detection method, using an image segmentation model acquisition module, a target area extraction module and a target area integrity adaptive discrimination module, wherein the output end of the image segmentation model acquisition module is connected to the input end of the target area extraction module, and the output end of the target area extraction module is connected to the input end of the target area integrity adaptive discrimination module, characterized in that: The specific steps include: Step S1. Using the image segmentation model acquisition module to acquire a model for performing image segmentation on network devices in an image; Step S2. Use the target area extraction module to input the data to be detected into the model to obtain the target area and other areas; Step S3: using the target region integrity adaptive discrimination module to discriminate the target region, and the determination method using the target region integrity adaptive discrimination module is: a. Calculate the adaptive threshold for the target area of the network device being identified. The threshold calculation takes into account the size of the detected device target area, the overall size of the image and its perimeter to adapt to targets of different sizes and shapes. The specific calculation formula is as follows: Among them, θ represents the calculated adaptive threshold; α is the integrity discrimination coefficient, which is used to set the overall scaling ratio and adjust the tolerance of the global discrimination of the device, and can be set according to the actual situation; C img Represents the perimeter of the image, and its value is also equal to the area value of the edge mask; S obj S is the area occupied by the target connected area of a single network device in the image; img To detect the area size of the picture; b. Perform an expansion operation on the current target area: use a rectangular structure element of size (30, 30) and perform an expansion operation; c. Calculate the intersection length: perform a bitwise AND operation on the dilated area and the edge mask created previously; d. Compare the intersection length with the adaptive threshold. If the intersection length is less than the adaptive threshold, the output detection is a global device, the traversal ends and the target area integrity adaptive judgment module is exited. Otherwise, the above judgment is performed on the next network device target area in the order of distance sorting; e. If all detected network device target areas do not meet the global device conditions, the output detection is a local device, the target area integrity adaptive judgment module is exited, and the detection results are transmitted to the backend for recording and statistics.
2. The network device image integrity detection method according to claim 1, characterized in that: In the step S1, the image segmentation model acquisition module is used to acquire or collect production environment data, and image segmentation data sets of equipment targets are obtained through image segmentation and annotation.
3. The network device image integrity detection method according to claim 2, characterized in that: In the step S1, the data set is used for segmentation task training of the yolov8 model to obtain the model.
4. The network device image integrity detection method according to claim 3, characterized in that: In the step S2, the target area extraction module is first used to obtain the data to be detected, and then the data to be detected is input into the model to obtain a segmentation map with the area where the network device is located as the target area and other areas as the background.
5. The network device image integrity detection method according to claim 4, characterized in that: In the step S2, the segmentation map of the target area is converted into a grayscale image, and then converted into a binary image. The target area in the obtained binary image is white, and other areas are black.
6. The network device image integrity detection method according to claim 5, characterized in that: In step S3, the target area integrity adaptive discrimination module is first used to determine whether a target area exists. If not, the inspection result is output as no qualified area is detected, and the target area integrity adaptive discrimination module is exited.
7. The network device image integrity detection method according to claim 6, characterized in that: In step S3, if there is a target area, an edge mask is created on each of the four sides of the image, the long side size of each mask is the length or width of the image, and the short side size is 1, and the extracted and sorted network device target areas are traversed to determine whether the target area is the global network device.
8. The network device image integrity detection method according to claim 7, characterized in that: In step S3, after the determination is completed, the detection result of whether the network device image is a global device or a local device is transmitted to the back end for recording and statistics according to the determination result.
