Cable detection method and device, electronic equipment, storage medium and product
By acquiring cable image data, using a semantic segmentation network to identify cable locations and calculate neighborhood spatial entropy, the problem of optical signal transmission caused by messy fiber optic cabling is solved, improving the accuracy and efficiency of cable detection and making it suitable for automatic inspection of fiber optic communication systems.
Patent Information
- Application Number
- CN202510492858.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-12-16
AI Technical Summary
In existing technologies, messy fiber optic cabling leads to unstable optical signal transmission quality, making it difficult to objectively quantify and evaluate using neighborhood spatial entropy. Reliance on manual annotation results in unstable evaluation results and low accuracy.
By acquiring cable image data, using a semantic segmentation network to identify cable locations, and calculating neighborhood spatial entropy to assess the degree of disorder of the cables, an objective quantitative assessment method that does not require manual annotation is provided.
It improves the accuracy and efficiency of cable inspection, reduces labor costs, and enhances the stability and reliability of evaluation, making it suitable for automatic inspection of fiber optic communication systems.
Smart Images

Figure CN121147084A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to a cable inspection method and apparatus, electronic equipment, storage medium and product. Background Technology
[0002] In fiber optic communication systems, the standardized arrangement of optical fibers is crucial to the transmission quality of optical signals. During use, fiber optic loops should be avoided as much as possible to reduce signal attenuation during transmission; scientifically coiled fibers ensure a reasonable layout, minimal additional loss, and resilience to time and harsh environments. However, in actual construction, due to various reasons, fiber optic cabling often results in a messy situation. In such cases, how to assess fiber optic standardization becomes a key concern in this field.
[0003] In related technologies, a pre-trained neural network model is used to process image data to assess the conformity of optical fibers. However, this assessment method relies on manual annotation of training samples, but the standards for data annotation are difficult to quantify and are also subject to the subjective influence of human annotation. This leads to unstable optical fiber assessment results with low accuracy and reliability. Summary of the Invention
[0004] This disclosure is made in view of the above-mentioned problems. This disclosure provides a cable testing method and apparatus, electronic equipment, storage medium, and product.
[0005] According to one aspect of this disclosure, a cable testing method is provided, comprising:
[0006] Acquire the first image data of the cable to be inspected;
[0007] Identify the cables in the first image data to obtain the second image data;
[0008] Determine the neighborhood spatial entropy of the second image data; wherein the neighborhood spatial entropy is used to indicate the degree of cable disorder; the neighborhood spatial entropy is related to the cable distribution in each sub-region and its associated region in the second image data;
[0009] The detection result of the cable to be detected is determined based on the neighborhood spatial entropy.
[0010] According to another aspect of this disclosure, a cable detection device is provided, comprising:
[0011] The image acquisition module is used to acquire the first image data of the cable to be inspected;
[0012] A prescriptive evaluation module is used to identify cables in the first image data to obtain the second image data;
[0013] The normative evaluation module is further configured to determine the neighborhood spatial entropy of the second image data; wherein the neighborhood spatial entropy is used to indicate the degree of cable disorder; the neighborhood spatial entropy is associated with the cable distribution in each sub-region and its associated region in the second image data;
[0014] The normative evaluation module is also used to determine the detection result of the cable to be tested based on the neighborhood space entropy.
[0015] According to another aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method described in any of the above embodiments.
[0016] According to another aspect of this disclosure, a computer-readable storage medium is provided that stores a computer program / instructions thereon, which, when executed by a processor, implement the methods described in any of the above embodiments.
[0017] According to another aspect of this disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the methods described in any of the above embodiments.
[0018] As will be described in detail below, a cable inspection method, apparatus, electronic device, storage medium, and product according to embodiments of this disclosure acquire first image data of the cable to be inspected, identify the cables therein to obtain second image data, and then determine the neighborhood spatial entropy of the second image data to determine the degree of disorder of the cable, thereby determining whether the cable to be inspected meets the requirements and obtaining the inspection result. This disclosure proposes an objective evaluation standard for cable standardization: neighborhood spatial entropy. Based on the cable distribution in each sub-region and its associated regions in the second image data, this disclosure comprehensively determines the neighborhood spatial entropy of the second image data, thereby objectively quantifying and evaluating whether the cable arrangement is regular and whether it meets the standardization criteria for cable wiring construction in communication settings. Thus, this disclosure eliminates the need for additional manual annotation, enabling objective, accurate, and efficient determination of the inspection results for the cable to be inspected. In summary, the technical solution provided by this disclosure can improve the accuracy and efficiency of cable inspection and help reduce labor costs.
[0019] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description
[0020] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0021] Figure 1 This is a schematic diagram of a cable routing configuration provided in an embodiment of this disclosure.
[0022] Figure 2 This is a schematic flowchart of a cable testing method provided in an embodiment of the present disclosure.
[0023] Figure 3 This is a schematic diagram of a cable identification process provided in an embodiment of the present disclosure.
[0024] Figure 4 This is a schematic diagram of a neighborhood space entropy acquisition process provided in an embodiment of the present disclosure.
[0025] Figure 5 This is a schematic diagram illustrating the relationship between neighborhood space entropy and cable disorder level provided in an embodiment of this disclosure.
[0026] Figure 6 This is a schematic diagram of neighborhood space entropy statistics provided in an embodiment of this disclosure.
[0027] Figure 7 This is a schematic flowchart of another cable detection method provided in an embodiment of the present disclosure.
[0028] Figure 8 This is a structural block diagram of a cable detection device provided in an embodiment of the present disclosure.
[0029] Figure 9 This is a hardware block diagram of an electronic device provided in an embodiment of the present disclosure.
[0030] Figure 10 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of this disclosure. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.
[0032] The standardization of cable routing has a significant impact on the quality of optical signal transmission. However, in real-world scenarios, cable routing can become messy due to factors such as negligence on the part of workers. Please refer to... Figure 1 , Figure 1 This is a schematic diagram illustrating a cable routing configuration provided in an embodiment of this disclosure. Figure 1 As shown, a) represents a qualified cable layout, which has little impact on optical signal transmission quality; b) shows a substandard cable layout, which has a significant impact on optical signal transmission quality and requires intervention to improve it; c) shows a cable layout that falls between qualified and substandard, making it difficult to determine whether it is qualified or not. Different situations require different handling.
[0033] This disclosure can be applied to any scenario involving the standardization assessment of cables. Furthermore, this disclosure can be applied to, but is not limited to, one or more application scenarios such as cable assessment, cable testing, and cable inspection. In addition, this disclosure does not have any particular limitations on cable type, and may specifically include, but is not limited to, optical fibers, pigtails, etc.
[0034] For cable standardization assessment scenarios, related technologies suffer from one or more problems, such as difficulty in objectively quantifying standardization assessment, reliance on data annotation, and poor robustness of neural network models leading to poor stability and reliability of assessment results. This disclosure provides a novel design concept: acquiring cable images and then assessing cable standardization through target detection and calculation of neighborhood spatial entropy. Neighborhood spatial entropy comprehensively considers the mutual influence of closely related regions in the cable image, enabling a more accurate measurement of the degree of disorder in the cable image. Based on this, cable standardization can be objectively and quantitatively assessed. This method is simple and convenient, requiring no additional manual annotation process, and can objectively, accurately, and efficiently determine the detection results of the cable to be inspected. The following is a detailed description.
[0035] This disclosure provides a cable testing method.
[0036] Please refer to Figure 2 , Figure 2 This is a schematic flowchart illustrating a cable testing method provided in an embodiment of this disclosure. Figure 2 As shown, the method includes:
[0037] S202, acquire the first image data of the cable to be tested.
[0038] In practice, cable data can be collected manually by the user or by controlling automated equipment, such as surveillance cameras or robots with cameras (e.g., inspection robots) to achieve cable detection.
[0039] In one exemplary embodiment, a camera robot can be controlled to move and collect cable data of the cable to be tested; or, the cable data of the cable to be tested collected by a handheld device can be obtained; thereby, the first image data can be determined based on the cable data.
[0040] The cable data can be considered as directly collected data. The cable data involved in this disclosure may include, but is not limited to, video data or image data. The first image data in this disclosure can be considered as the detection object (or detection subject) for subsequent cable detection. The first image data may also be one or more images, video data, etc.
[0041] There are several ways to collect cable data. For example, cable data can be collected using inspection robots. Specifically, the inspection robot is activated and performs a self-check to ensure that the sensors and cameras are functioning properly. Then, using its built-in GPS and map data, the robot navigates to the area of cable to be inspected. Next, the robot uses environmental perception devices such as LiDAR and ultrasonic sensors to avoid obstacles and ensure safe approach to the cable under inspection, and then points its camera at the cable to begin capturing video or image data (i.e., cable data). This video or image data may include the physical condition of the cable, the surrounding environment, etc. Alternatively, cable data can be collected using handheld inspection devices. Inspectors can activate the handheld device, point the camera at the cable to be inspected, and control the device to capture video or image data. Further details are omitted.
[0042] After collecting the cable data, this disclosure allows for the direct identification of the cable data as the first image data. Alternatively, this disclosure can further process the cable data to identify the processed data as the first image data. The processing methods may include, but are not limited to, at least one of the following: preprocessing, keyframe extraction, and image cropping. Preprocessing is used to improve image quality and enhance the accuracy of subsequent analysis. The preprocessing methods involved in this disclosure may include, but are not limited to, at least one of the following: noise reduction, contrast enhancement, and image sharpening.
[0043] In the following text, for ease of explanation, an image will be used as the detection object to illustrate this solution. For the first image data in video format, each frame of the video can be used as the first image data for subsequent detection processing. Alternatively, a portion can be selected (e.g., one or more keyframes) for subsequent detection processing. In cable detection scenarios, the video data is relatively short. Therefore, in practical implementation, keyframes can be extracted or selected from the video data as the core elements to implement subsequent processes. It should be understood that there are multiple ways to select keyframes for video data. For example, one or more conditions can be selected, such as high cable clarity, frontal cable shooting angle, or comprehensive cable shooting range, to determine the keyframes.
[0044] In addition, keyframes can also be selected based on the inter-frame differences between frames in the video data. In one exemplary embodiment, when the first image data acquired is video data, the following processing can be performed when acquiring the first image data of the cable to be inspected: determining the inter-frame difference data corresponding to each frame in the video data; acquiring the frame corresponding to the minimum inter-frame difference data to obtain the first image data.
[0045] In practice, for the Q-frame images contained in the video data, the inter-frame difference intensity between adjacent frames is calculated sequentially. The inter-frame difference intensity can be used to measure the changes between two frames. The grayscale value of any pixel (x, y) in the image at frame t and frame (t-1) is denoted as v, respectively. t (x,y) and v t-1 (x,y), then d t (x, y) can represent the absolute value of the difference between the pixel at frame t and frame (t-1), where T is the threshold. Based on this, for any pixel (x, y), if |v... t (x,y)-v t-1 (x,y)|>T, then d t (x,y) takes the value 1; if |v t (x,y)-v t-1 (x,y)|≤T, then d t (x,y) takes a value of 0. Based on this, the inter-frame difference intensity M between any two adjacent frames in the video data is... t This can be denoted as d corresponding to each pixel in the image data. t The sum of (x,y). At this point, the inter-frame difference intensity M t The inter-frame difference value d corresponding to pixel (x,y) t The following relationship exists between (x, y):
[0046]
[0047] Based on this, the inter-frame difference intensity {M} between any two adjacent frames of image data in the video data can be calculated. t ,t=1…N}. Subsequently, when selecting keyframes, this disclosure selects the image corresponding to the minimum inter-frame difference intensity as the keyframe. Unlike keyframe selection schemes in related technologies, this disclosure requires stable and clear cable images as the basis for cable conformity inspection. Therefore, this disclosure does not focus on cases with significant image changes, but rather on images that can characterize a stable and clear cable environment.
[0048] The above-mentioned processing of determining the first image data based on cable data can be performed locally on the data acquisition device (such as the handheld inspection device, inspection robot, etc. mentioned above), or it can be processed locally on the execution device or in the cloud after receiving the data from the data acquisition device, without any particular restrictions.
[0049] S204, identify the cable in the first image data to obtain the second image data.
[0050] This step is specifically used to identify (or detect) cables in the first image data. Cables are entities with linear shapes, and in practice, cable recognition can be achieved through a semantic segmentation network.
[0051] In one exemplary embodiment, this disclosure can utilize a semantic segmentation network to process the first image data to obtain the second image data. The semantic segmentation network is used to detect the cable position in the input data.
[0052] For easier understanding, please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating a cable identification process provided in an embodiment of this disclosure. Figure 3 As shown, the input data of the semantic segmentation network is the first image data, and the output data is the second image data. The first image data can be a real-world image (or pre-processed) and the second image data can be used to display the cable location in the first image data. It should be understood that the first and second image data have the same size and therefore the same pixel data; however, the second image data removes irrelevant data and only displays the cable location in the first image data, thereby constructing a semantic segmentation network. Figure 3 The cable shown is in the following shape.
[0053] This disclosure does not impose any particular restrictions on the type of semantic segmentation network or the pre-training process. Any neural network model or AI / ML model capable of semantic segmentation or specific line detection can be used to implement this step.
[0054] For example, the semantic segmentation networks involved in this disclosure may include, but are not limited to, linear segmentation models. Specifically, semantic segmentation networks may include, but are not limited to, at least one of the following: Self-Attention U-Net (SU-Net), Immune-Recognition-Based Neural Network (IRNN), Random Forest Algorithm (RFA), Deep Learning-Based Color Recognition Model (DLCRM), Parallel Neural Network (PNN), etc., without exhaustive list. This disclosure does not limit the recognition principle of the semantic segmentation network. For example, SU-Net can effectively extract image features based on attention mechanisms and skip connections to achieve cable differentiation and localization; DLCRM, for example, is based on a combination of deep learning and machine vision to identify and locate cable positions through cable color; PNN can apply Long Short-Term Memory (LSTM) neural networks to capture the spatiotemporal dependency features of plastic optical fiber link signals and identify and locate cable positions accordingly; further examples are not exhaustive.
[0055] For ease of understanding, the linear segmentation network SU-Net is briefly used as an example. This disclosure enhances the open-source network model U-Net by incorporating cable characteristics to improve cable recognition capabilities. Specifically, the SU-Net structure consists of two main parts: a main network branch comprising an encoder and decoder, and a fusion network branch. In the main network branch, the encoder extracts image features through a series of convolutional and pooling layers, while the decoder consists of convolutional layers, upsampling operations, and a spatial attention module (or attention module). To address the class imbalance problem in cable segmentation, an attention module is introduced, enabling the network to more accurately locate cable target regions in the image. Skip connections are used between the encoder and decoder to minimize information loss. Furthermore, the fusion network branch uses upsampling, convolution, and connections to combine feature maps of different scales with varying representational capabilities. Subsequently, the fused features are reconstructed using channel attention. The reconstructed feature maps are then passed through two convolutional layers, followed by a convolutional layer with a sigmoid activation function, achieving multi-scale feature fusion and significantly improving the network's performance in segmenting fiber optic lines.
[0056] It should be understood that, prior to performing S204, the method may further include: training a semantic segmentation network.
[0057] In one exemplary embodiment, this disclosure can also perform transfer learning based on the initial weights of the semantic segmentation network to obtain a trained semantic segmentation network. The initial weights include at least one of the following: initial weights of the linear segmentation model, randomly initialized weights of the attention module, and randomly initialized weights of the prediction heads in the fusion network branches.
[0058] Let's continue with SU-Net as an example. During network training, the weights of U-Net can be reused, and the weights of the prediction heads in the attention module and fusion network branch can be randomly initialized. Then, the model is transferred to other networks using training samples. The trained model is the semantic segmentation network, also known as the object detection model. It should be understood that the number of training samples is at least one, for example, 50. Furthermore, any training sample includes an input sample and an output sample. The input sample can be any real-world scene image containing cables, and the output sample is the image showing the cable location corresponding to the input sample, for example... Figure 3 As shown.
[0059] S206, determine the neighborhood spatial entropy of the second image data; wherein, the neighborhood spatial entropy is used to indicate the degree of cable disorder; the neighborhood spatial entropy is related to the cable distribution of each sub-region and its associated region in the second image data.
[0060] In this disclosure, after extracting second image data that can be used to characterize the cable position, the degree of disorder (or chaos) of the cable position in the second image data can be evaluated. This disclosure uses entropy value as an indicator to measure the degree of cable chaos in the image; thus, the higher the entropy value, the higher the degree of cable disorder, and the more likely it is to not meet the cable specification requirements; the lower the entropy value, the lower the degree of cable disorder, and the more likely it is to meet the cable specification requirements.
[0061] In addition, in order to reasonably determine the entropy value of the neighborhood space entropy corresponding to the second image data, this disclosure first divides the second image data into multiple sub-regions when performing this step, then determines the cable distribution of each sub-region, and then comprehensively determines the entropy value corresponding to the second image data based on this.
[0062] Furthermore, cables exhibit strong continuity. For example, if any sub-region A contains cables, then sub-region B, which is near sub-region A, may also contain cables, while sub-region C, which is far from sub-region A (e.g., the farthest sub-region on the diagonal), is less likely to contain cables. Based on this characteristic, this disclosure does not determine the cable distribution of each sub-region in isolation, but rather comprehensively considers the cable distribution of each sub-region and its associated regions to determine the corresponding cable distribution of each sub-region. The spatial entropy determined accordingly can also reflect the continuity characteristic of cables to a certain extent, which is the neighborhood spatial entropy used in this disclosure.
[0063] For example, when performing this step, this disclosure can be implemented as follows: First, obtain cable distribution data in each sub-region of the second image data; then, determine the neighborhood distribution probability of each sub-region based on the first cable distribution data of each sub-region and the second cable distribution data of the associated region of each sub-region; thereby, determine the neighborhood spatial entropy of the second image data based on the neighborhood distribution probability of each sub-region.
[0064] For ease of understanding, combined with Figure 4 Exemplary illustration. Figure 4 This is a schematic diagram illustrating a neighborhood space entropy acquisition process provided in an embodiment of this disclosure. Figure 4 As shown, before performing this step, the second image data (denoted as R) can first be divided into M×N sub-regions, each of which can be denoted as: C i,j It satisfies the following relationship: {C i,j ,i=1…N,j=1…N}. M and N are any positive integers greater than or equal to 1, and they can be the same or different; Figure 4 An example is shown where M=N=3. Furthermore, any sub-region includes at least two pixels. It should also be understood that in real-world scenarios, this partitioning step can be an actual partition or a virtual partition (i.e., no actual processing of the second image data is performed), for example, by using a sliding window and treating the area enclosed by the sliding window as a sub-region.
[0065] In the specific processing, the cable distribution data of each sub-region is first obtained. This cable distribution data indicates the cable distribution within the sub-region. This data can be characterized by the number of pixels occupied by the cables in the sub-region. That is, for any given sub-region, the number of pixels occupied by the cables in that sub-region is obtained to acquire the cable distribution data for that sub-region.
[0066] For any subregion C i,j The cable distribution data within this sub-region is defined as T. i,j , among which, Ti,j Used to represent sub-region C i,j The number of pixels occupied by the middle cable. Let H and W represent sub-region C respectively. i,j Given the length (horizontal length, also denoted as the length in the first direction) and width (vertical length, also denoted as the length in the second direction) of subregion C, then for subregion C... i,j The h-th horizontal and w-th vertical pixel C in i,j For (h,w), if the pixel belongs to the cable, its value is 1; if the pixel belongs to the background, its value is 0. After processing sub-region C... i,j By examining each pixel individually and summing the results, any sub-region C can be obtained. i,j Corresponding cable distribution data T i,j At this point, any subregion C i,j Corresponding cable distribution data T i,j The following relationship must be satisfied:
[0067]
[0068] Based on this, after obtaining the C of each sub-region i,j Corresponding cable distribution data T i,j Subsequently, the conventional approach is to determine the cable distribution probability of a sub-region based on the cable distribution data of that sub-region in isolation, compared with the cable distribution data of all sub-regions; that is, to determine the probability of cable distribution for any sub-region C. i,j The corresponding cable distribution probability is denoted as P. i,j Then it is related to T i,j The following relationship exists between them: However, this approach ignores the continuity between cables, resulting in significant noise in the spatial entropy calculation and inaccurate evaluation results.
[0069] This disclosure determines the neighborhood distribution probability of each sub-region based on the first cable distribution data of each sub-region and the second cable distribution data of the associated regions of each sub-region. Specifically, for any sub-region, the ratio between the first cable distribution data and the third cable distribution data of the sub-region is obtained to obtain the neighborhood distribution probability; wherein, the third cable distribution data is the sum of the first cable distribution data and the second cable distribution data of each associated region.
[0070] For ease of understanding, this disclosure will use any subregion C i,j The corresponding neighborhood distribution probability is denoted as Then the neighborhood distribution probability With the distribution data of each cable T i,j The following relationship exists between them:
[0071]
[0072] Among them, s1 to s4 represent the range of the associated region. i,j This represents the first cable distribution data. This represents the third cable distribution data, wherein the third cable distribution data packet contains the first cable distribution data and the second cable distribution data of the associated area other than the first cable distribution data.
[0073] It should be understood that in practical scenarios, the values of s1 to s4 can be customized. That is, in this embodiment of the disclosure, the range of the associated region can be customized. In one exemplary embodiment, the associated region corresponding to any one of the sub-regions includes at least one of the following:
[0074] In the first direction, there are one or more sub-regions whose distance from the sub-region does not exceed a preset first threshold;
[0075] In the second direction, there are one or more sub-regions whose distance from the sub-region does not exceed a preset second threshold; the first direction is perpendicular to the second direction;
[0076] One or more sub-regions whose distance from the sub-region does not exceed a preset third threshold.
[0077] The first direction can be horizontal, and the second direction can be vertical; or vice versa. Furthermore, the number of first thresholds can be one or two, such as s1 and s2 mentioned above, and the number of second thresholds can also be one or two, such as s3 and s4 mentioned above. Additionally, a third threshold can be used to limit the radius of the circular region. When using this scheme, sub-regions falling within the radius area at a preset proportion (e.g., exceeding 80%, 70%, etc.) can be identified as associated regions; or, any region overlapping with the radius area can be considered an associated region; or, the center point of a sub-region falling within the radius area can be considered an associated region; the list is not exhaustive and can be customized. In practical scenarios, the first to third thresholds can be pixel thresholds.
[0078] Based on the neighborhood distribution probability of each sub-region This allows us to determine the neighborhood spatial entropy of the second image data as a whole. Let H be the neighborhood spatial entropy of the second image data R. Then, H is related to the neighborhood distribution probability of each sub-region. The following relationship can be satisfied between them:
[0079]
[0080] To better understand the relationship between neighborhood spatial entropy and the degree of disorder in cables, please refer to... Figure 5 , Figure 5This diagram illustrates the relationship between neighborhood spatial entropy and cable disorder level, as provided in embodiments of this disclosure. Figure 5 As shown, as the disorder of the cable arrangement in the image (equivalent to the first image data) increases, the determined neighborhood spatial entropy also gradually increases. In other words, the neighborhood spatial entropy provided by this disclosure can effectively characterize the disorder of the cable arrangement; that is, the magnitude of the neighborhood spatial entropy can be used to measure the disorder of the cables in the image.
[0081] Based on the above processing, this disclosure can comprehensively consider the spatial continuity of the cable, using neighborhood spatial entropy as a characterizing parameter of the cable's disorder level to determine the degree of disorder for each cable. Subsequently, the detection results of the cable to be tested can be determined accordingly.
[0082] S208, based on the neighborhood spatial entropy, determines the detection result of the cable to be tested.
[0083] In practice, the neighborhood spatial entropy determined in the aforementioned steps can be directly compared with a preset threshold to determine the detection result of the cable to be detected. There can be one or more preset thresholds.
[0084] In one exemplary embodiment, this step may involve the following processing:
[0085] When the entropy of the neighborhood space is greater than or equal to a preset fourth threshold, the detection result of the cable to be tested is determined to be unqualified.
[0086] When the entropy of the neighborhood space is less than the fourth threshold, the detection result of the cable to be tested is determined to be qualified.
[0087] In the above embodiment, a single fourth threshold is used as a benchmark to classify the compliance test results of the cable under test into two categories: qualified or unqualified. This method is simple, easy to implement, and highly efficient.
[0088] In another possible embodiment, this step can also construct a first interval range using two thresholds, thereby dividing the detection results into three categories based on these two thresholds: qualified, unqualified, and difficult-to-distinguish samples (e.g., ...). Figure 1 (as shown in c). For example, the first interval range is determined by a fifth threshold and a sixth threshold, where the fifth threshold is greater than the sixth threshold. Then, when the neighborhood spatial entropy is greater than or equal to the preset fifth threshold, the detection result of the cable to be tested is determined to be unqualified; when the neighborhood spatial entropy is less than the sixth threshold, the detection result of the cable to be tested is determined to be qualified; when the neighborhood spatial entropy is greater than or equal to the sixth threshold and the neighborhood spatial entropy is less than the fifth threshold, that is, when the neighborhood spatial entropy is within the preset first interval range, the cable to be tested is marked as a difficult sample and / or archived.
[0089] It should be understood that the fourth to sixth thresholds mentioned above can be customized. Please refer to [the relevant documentation / reference]. Figure 6 , Figure 6 This is a schematic diagram illustrating neighborhood spatial entropy statistics provided in an embodiment of this disclosure. This embodiment of the disclosure statistically analyzes the neighborhood spatial entropy of a certain number of images, such as... Figure 6 As shown, the neighborhood spatial entropy of an image ranges from 20 to 120. Images with a neighborhood spatial entropy less than 60 are considered to be in a well-organized arrangement (acceptable); images with a neighborhood spatial entropy greater than 70 are considered to be in a disordered arrangement (unacceptable); and images with a neighborhood spatial entropy between 60 and 70 are considered difficult-to-distinguish samples, but these images are relatively few in number. This disclosure provides a method for setting the threshold: the fourth threshold is set to 65. In another embodiment, the fifth threshold is set to 70 and the sixth threshold is set to 60. Further details are omitted.
[0090] Furthermore, in one embodiment of this disclosure, the following method may also be included:
[0091] When the test result indicates that the cable under test is unqualified, an alarm is triggered and / or the data is archived.
[0092] Specifically, if the cable under inspection is determined to be unqualified, an inspection alarm can be triggered or a photo can be taken for archiving. In this embodiment, when the inspection robot detects unqualified communication facilities, it can perform different operations through different settings. For example, during the construction acceptance phase, if unqualified construction is found, a warning mechanism can be immediately activated to notify construction personnel to handle the issue. Or, for example, during the daily inspection phase, if unqualified facilities are found, the location information of the current communication facilities can be archived, and photos and related data information can be sent and stored in the system database for subsequent analysis and traceability, providing strong support for equipment maintenance and fault diagnosis.
[0093] To facilitate understanding of this solution, the following will be combined with... Figure 7 Exemplary illustration. Figure 7 This is a schematic flowchart illustrating another cable detection method provided in an embodiment of this disclosure. Figure 7 As shown, this method can be implemented in a cable inspection device, which may include three modules: an image acquisition module, a standardization evaluation module, and an inspection feedback control module.
[0094] In practical implementation, it should be as follows: Figure 7 As shown, the method includes the following steps:
[0095] S1, for the image acquisition module, uses the camera in the inspection robot or handheld inspection device to acquire video or images of cables (such as optical fibers and pigtails) in the communication facilities and transmits (first image data) to the standardization evaluation module.
[0096] S2, the prescriptive evaluation module uses a semantic segmentation network to detect cables such as fiber optic cables in the first image data (to obtain the second image data).
[0097] S3, the normative evaluation module calculates the neighborhood spatial entropy of the image (second image data).
[0098] S4, the standardization assessment module classifies based on the entropy of the neighborhood space and transmits the classification results (i.e. the detection results: qualified or unqualified) to the inspection result feedback module.
[0099] S5, if the inspection result feedback module finds that the inspection result is unqualified, it will trigger an inspection alarm and take a picture for archiving.
[0100] This solution can be widely used in automated inspections in fields such as fiber optic communication systems, data centers, and industrial production, improving the accuracy and efficiency of inspections and reducing labor costs.
[0101] Furthermore, compared to related technologies that struggle to quantify and evaluate the standardization of fiber optic cables, this disclosure calculates the neighborhood spatial entropy of the image, providing an objective and quantitative evaluation method that avoids confusion and inconsistency. Compared to related technologies that rely on large amounts of labeled data, resulting in a heavy workload and a high risk of errors, this disclosure uses neighborhood spatial entropy for detection and classification, improving detection accuracy and consistency. Compared to related technologies that exhibit unstable performance across different datasets, affecting the accuracy and reliability of inspections, this disclosure demonstrates more stable performance across different datasets, improving model robustness and ensuring the accuracy and reliability of inspections. Moreover, this disclosure is highly efficient, requires minimal resources, and the program can be executed entirely on the terminal device, only communicating with the server when an alarm or archiving mechanism is triggered, meeting real-time requirements. In summary, this invention, by introducing the concept of neighborhood spatial entropy, realizes an unsupervised method for evaluating cable standardization, significantly improving inspection efficiency and accuracy, while possessing good adaptability and dynamic adjustment capabilities, providing a novel solution for automated inspections in complex environments.
[0102] The cable inspection method according to embodiments of the present disclosure has been described above with reference to the accompanying drawings. The present disclosure acquires first image data of the cable to be inspected, identifies the cables within it to obtain second image data, and then determines the neighborhood spatial entropy of the second image data to determine the degree of disorder of the cable, thereby determining whether the cable to be inspected meets the requirements and obtaining the inspection result. The present disclosure proposes an objective evaluation standard for cable standardization: neighborhood spatial entropy. Based on the cable distribution in each sub-region and its associated regions in the second image data, the present disclosure comprehensively determines the neighborhood spatial entropy of the second image data, thereby objectively quantifying and evaluating whether the cable arrangement is regular and whether it meets the standardization criteria for cable wiring construction in communication settings. Thus, the present disclosure eliminates the need for additional manual annotation, enabling objective, accurate, and efficient determination of the inspection results for the cable to be inspected. In summary, the technical solution provided by the present disclosure can improve the accuracy and efficiency of cable inspection and help reduce labor costs.
[0103] This disclosure also provides a cable testing device. Figure 8 This is a structural block diagram of a cable detection device provided in an embodiment of the present disclosure, such as... Figure 8 As shown, the cable inspection device 800 includes: an image acquisition module 810, a standardization evaluation module 820, and an inspection result feedback module 830.
[0104] The image acquisition module 810 is used to acquire the first image data of the cable to be tested.
[0105] The normative evaluation module 820 is used to identify cables in the first image data to obtain the second image data;
[0106] The normative evaluation module 820 is further configured to determine the neighborhood spatial entropy of the second image data; wherein the neighborhood spatial entropy is used to indicate the degree of cable disorder; the neighborhood spatial entropy is associated with the cable distribution in each sub-region and its associated region in the second image data;
[0107] The normative evaluation module 820 is also used to determine the detection result of the cable to be tested based on the neighborhood space entropy.
[0108] In one exemplary embodiment, the prescriptive evaluation module 820 is specifically used for:
[0109] Obtain cable distribution data for each sub-region in the second image data;
[0110] Based on the first cable distribution data of each sub-region and the second cable distribution data of the associated regions of each sub-region, the neighborhood distribution probability of each sub-region is determined.
[0111] The neighborhood spatial entropy of the second image data is determined based on the neighborhood distribution probability of each sub-region.
[0112] In one exemplary embodiment, the prescriptive evaluation module 820 is specifically used for:
[0113] For any given sub-region, the ratio between the first cable distribution data and the third cable distribution data of the sub-region is obtained to obtain the neighborhood distribution probability;
[0114] The third cable distribution data is the sum of the first cable distribution data and the second cable distribution data of each associated region.
[0115] In one exemplary embodiment, the associated region corresponding to any one of the sub-regions includes at least one of the following:
[0116] In the first direction, there are one or more sub-regions whose distance from the sub-region does not exceed a preset first threshold;
[0117] In the second direction, there are one or more sub-regions whose distance from the sub-region does not exceed a preset second threshold; the first direction is perpendicular to the second direction;
[0118] One or more sub-regions whose distance from the sub-region does not exceed a preset third threshold.
[0119] In one exemplary embodiment, the prescriptive evaluation module 820 is specifically used for:
[0120] For any given sub-region, the number of pixels occupied by the cable in the sub-region is obtained to obtain the cable distribution data of the sub-region.
[0121] In one exemplary embodiment, the image acquisition module 810 is specifically used for:
[0122] Control the camera robot to move and collect cable data of the cable to be tested; or, acquire the cable data of the cable to be tested collected by a handheld device; wherein the cable data includes: video data or image data;
[0123] The first image data is determined based on the cable data.
[0124] In one exemplary embodiment, the image acquisition module 810 is further specifically used for:
[0125] When the cable data is video data, the inter-frame difference data corresponding to each frame of the video data is determined respectively;
[0126] The frame corresponding to the smallest inter-frame difference data is determined as the first image data.
[0127] In one exemplary embodiment, the prescriptive evaluation module 820 is specifically used for:
[0128] The first image data is processed using a semantic segmentation network to obtain the second image data;
[0129] The semantic segmentation network is used to detect the cable location in the input data; the semantic segmentation network includes a linear segmentation model.
[0130] In one exemplary embodiment, the prescriptive evaluation module 820 is specifically used for:
[0131] Based on the initial weights of the semantic segmentation network, transfer learning is performed to obtain the trained semantic segmentation network.
[0132] The initial weights include at least one of the following: initial weights of the linear segmentation model, random initial weights of the attention module, and random initial weights of the prediction heads in the fusion network branches.
[0133] In one exemplary embodiment, the prescriptive evaluation module 820 is specifically used for:
[0134] When the entropy of the neighborhood space is greater than or equal to a preset fourth threshold, the detection result of the cable to be tested is determined to be unqualified.
[0135] When the entropy of the neighborhood space is less than the fourth threshold, the detection result of the cable to be tested is determined to be qualified.
[0136] In one exemplary embodiment, the inspection result feedback module 830 is specifically used for:
[0137] When the test result indicates that the cable under test is unqualified, an alarm is triggered and / or the data is archived.
[0138] In one exemplary embodiment, the inspection result feedback module 830 is specifically used for:
[0139] When the entropy of the neighborhood space is within a preset first interval, the cable to be detected is marked as a difficult sample and / or archived.
[0140] Figure 9 This is a hardware block diagram of an electronic device provided according to an embodiment of the present disclosure. The electronic device 900 according to an embodiment of the present disclosure includes at least a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the cable detection method described in any of the above embodiments.
[0141] Figure 9The illustrated electronic device 900 specifically includes a central processing unit (CPU) 901, a graphics processing unit (GPU) 902, and a memory 903. These units are interconnected via a bus 904. The CPU 901 and / or GPU 902 can function as the aforementioned processor, and the memory 903 can function as the aforementioned memory storing computer-readable instructions. Furthermore, the electronic device 900 may also include a communication unit 905, a storage unit 906, an output unit 907, an input unit 908, and an external device 909, all of which are also connected to the bus 904.
[0142] Figure 10 This is a schematic diagram of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium according to an embodiment of the present disclosure stores a computer program / instructions (including but not limited to computer-readable instructions). Specifically, as shown... Figure 10 As shown, a computer-readable storage medium 1000 stores computer-readable instructions 1001. When executed by a processor, this computer program / instruction implements the cable detection method described in any of the preceding embodiments of this disclosure. The computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.
[0143] This disclosure further provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the cable detection method described in any of the preceding embodiments of this disclosure.
[0144] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.
[0145] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.
[0146] Additionally, as used herein, the “or” used in a list of items beginning with “at least one” indicates a separate list, such that a list of, for example, “at least one of A, B, or C” means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word “exemplary” does not imply that the described example is preferred or better than other examples.
[0147] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.
[0148] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.
[0149] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.
[0150] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.
Claims
1. A cable testing method, characterized in that, include: Acquire the first image data of the cable to be inspected; Identify the cables in the first image data to obtain the second image data; Determine the neighborhood spatial entropy of the second image data; wherein the neighborhood spatial entropy is used to indicate the degree of cable disorder; the neighborhood spatial entropy is related to the cable distribution in each sub-region and its associated region in the second image data; The detection result of the cable to be detected is determined based on the neighborhood spatial entropy.
2. The method according to claim 1, characterized in that, Determining the neighborhood spatial entropy of the second image data includes: Obtain cable distribution data for each sub-region in the second image data; Based on the first cable distribution data of each sub-region and the second cable distribution data of the associated regions of each sub-region, the neighborhood distribution probability of each sub-region is determined. The neighborhood spatial entropy of the second image data is determined based on the neighborhood distribution probability of each sub-region.
3. The method according to claim 2, characterized in that, The determination of the neighborhood distribution probability of each sub-region based on the first cable distribution data of each sub-region and the second cable distribution data of the associated regions of each sub-region includes: For any given sub-region, the ratio between the first cable distribution data and the third cable distribution data of the sub-region is obtained to obtain the neighborhood distribution probability; The third cable distribution data is the sum of the first cable distribution data and the second cable distribution data of each associated region.
4. The method according to any one of claims 1-3, characterized in that, The associated region corresponding to any one of the sub-regions includes at least one of the following: In the first direction, there are one or more sub-regions whose distance from the sub-region does not exceed a preset first threshold; In the second direction, there are one or more sub-regions whose distance from the sub-region does not exceed a preset second threshold; the first direction is perpendicular to the second direction; One or more sub-regions whose distance from the sub-region does not exceed a preset third threshold.
5. The method according to claim 2, characterized in that, The step of obtaining cable distribution data in each sub-region of the second image data includes: For any given sub-region, the number of pixels occupied by the cable in the sub-region is obtained to obtain the cable distribution data of the sub-region.
6. The method according to any one of claims 1-5, characterized in that, The acquisition of the first image data of the cable to be inspected includes: Control the camera robot to move and collect cable data of the cable to be tested; or, acquire the cable data of the cable to be tested collected by a handheld device; wherein the cable data includes: video data or image data; The first image data is determined based on the cable data.
7. The method according to claim 6, characterized in that, The step of determining the first image data based on the cable data further includes: When the cable data is video data, the inter-frame difference data corresponding to each frame of the video data is determined respectively; The frame corresponding to the smallest inter-frame difference data is determined as the first image data.
8. The method according to any one of claims 1-7, characterized in that, The step of identifying cables in the first image data to obtain second image data includes: The first image data is processed using a semantic segmentation network to obtain the second image data; The semantic segmentation network is used to detect the cable location in the input data; the semantic segmentation network includes a linear segmentation model.
9. The method according to claim 8, characterized in that, The method further includes: Based on the initial weights of the semantic segmentation network, transfer learning is performed to obtain the trained semantic segmentation network. The initial weights include at least one of the following: initial weights of the linear segmentation model, random initial weights of the attention module, and random initial weights of the prediction heads in the fusion network branches.
10. The method according to any one of claims 1-9, characterized in that, The step of determining the detection result of the cable to be detected based on the neighborhood spatial entropy includes: When the entropy of the neighborhood space is greater than or equal to a preset fourth threshold, the detection result of the cable to be tested is determined to be unqualified. When the entropy of the neighborhood space is less than the fourth threshold, the detection result of the cable to be tested is determined to be qualified.
11. The method according to any one of claims 1-10, characterized in that, The method further includes: When the test result indicates that the cable under test is unqualified, an alarm is triggered and / or the data is archived.
12. The method according to any one of claims 1-10, characterized in that, The method further includes: When the entropy of the neighborhood space is within a preset first interval, the cable to be detected is marked as a difficult sample and / or archived.
13. A cable testing device, characterized in that, include: The image acquisition module is used to acquire the first image data of the cable to be inspected. A prescriptive evaluation module is used to identify cables in the first image data to obtain the second image data; The normative evaluation module is further configured to determine the neighborhood spatial entropy of the second image data; wherein the neighborhood spatial entropy is used to indicate the degree of cable disorder; the neighborhood spatial entropy is associated with the cable distribution in each sub-region and its associated region in the second image data; The normative evaluation module is also used to determine the detection result of the cable to be tested based on the neighborhood space entropy.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1-12.
15. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1-12.
16. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1-12.