Power transmission line risk target identification method based on sliding window and positive and negative samples
By using sliding windows and positive and negative samples recognition methods in transmission line scenarios, combined with real-time thermal updates of dynamic base map libraries, the problems of high identification difficulty and high maintenance cost in the existing technology are solved, and high accuracy and high efficiency risk target recognition is achieved.
Patent Information
- Application Number
- CN202411760935.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-28
AI Technical Summary
In the transmission line scenario, it is difficult to accurately identify fuzzy, small-scale targets and risk targets in complex backgrounds. The base map library is costly and has a long update cycle, making it difficult to adapt to the needs of short-term inspections.
The recognition method based on sliding window and positive and negative samples is adopted, and the target to be analyzed is identified through sliding window technology and instance segmentation model, and a dynamic base map library is constructed for real-time thermal updates, combining positive and negative samples comparison analysis to improve identification accuracy and efficiency.
The recognition accuracy of small and medium-sized and fuzzy targets in high-resolution but poor imaging quality is improved, real-time update of dynamic base map libraries is achieved, adapting to short-term inspection needs, and enhancing the ability to identify risk targets.
Smart Images

Figure CN119723443A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image recognition and provides a method for identifying risk targets of power transmission lines based on sliding windows and positive and negative samples. Background Art
[0002] In the current technical field, the identification of ground risk targets of transmission lines is an important and critical issue, which is closely related to the stable and safe operation of the power grid. The specific task requirement is to identify risk targets in the image to be detected, including its target category, risk type, and a bounding box or circumscribed polygon that is sufficient to identify its location. The existing technical solutions usually include: using the transmission line risk target data obtained by collection or simulation, annotating the predefined fixed category targets that may have risks with a minimum circumscribed rectangular box or minimum circumscribed polygon, and then training a target detection model or an instance segmentation model based on the annotated data, and identifying the category targets that may have risks in the image to be detected through the trained target detection or instance segmentation model; or using the existing risk-free target data and risk target data to build and maintain a sample base map library, annotate the ROI area of the risk target for the data samples in the base map library, and compare and analyze the image to be detected with the annotated samples of the corresponding base map library to determine whether there is a risk in the ROI area.
[0003] However, both of the above two prior art solutions have some problems.
[0004] Direct recognition methods based on target detection or instance segmentation models can only identify predefined fixed categories of targets that may pose risks, but cannot determine whether the identified targets have already pose risks and the type of risk. At the same time, these target detection or instance segmentation models are often directly transplanted from open source target detection or instance segmentation models on public data sets, and are difficult to adapt to the characteristics of power transmission line scenes, such as high resolution but poor imaging quality, unclear target boundaries, and unclear features. They are prone to missing small and blurred targets, and misdetecting background objects with similar features to the targets to be identified.
[0005] The comparison and analysis method based on the base map library can only determine whether a risk occurs in the ROI area, but cannot determine the specific risk target category where the risk occurs. At the same time, such a comparison and analysis method requires a lot of resources and manpower to maintain a huge static base map library with a long update cycle, which is difficult to adapt to the shorter inspection cycle of the transmission line scenario. When in use, the correct and available base map cannot be updated in time, resulting in the degradation of the recognition effect of the comparison analysis. Summary of the invention
[0006] The core problem that the present invention aims to solve is how to improve the recognition accuracy and efficiency of risk targets in the transmission line scenario, especially the recognition capability when dealing with blurred, small targets and complex backgrounds.
[0007] In order to achieve the above purpose, the present invention adopts the following technical means:
[0008] The present invention provides a transmission line risk target identification method based on sliding window and positive and negative samples, comprising the following steps:
[0009] Step 1: Collect and select a small amount of transmission line point data, pre-process, pre-label, and manually correct them to establish an initial dynamic base map library;
[0010] Step 2: For the input detection image, identify the target to be analyzed through the instance segmentation model based on the sliding window;
[0011] Step 3: For the input detection map, match the only best base map in the dynamic base map library corresponding to the point corresponding to the detection map;
[0012] Step 4: Compare and analyze the target to be analyzed with the positive and negative samples in the matching base map, and output the final risk target identification result;
[0013] Step 5: Based on the detection map and its risk target identification results, perform real-time hot update of the dynamic base map library corresponding to the points corresponding to the detection map.
[0014] In the above scheme, the above step 1 specifically includes the following steps:
[0015] Step 1.1: Collect several recent images of transmission line points with good imaging quality under different weather conditions and at different time periods as initial base maps with timestamps;
[0016] Step 1.2: For each initial base map, identify several targets of a fixed category through a sliding window-based instance segmentation model. The specific identification process will be described in detail in step 2. The identification results are used as pre-labeling of positive and negative sample targets in the form of target categories and segmentation polygons of the labeled targets.
[0017] Step 1.3: Filter out erroneous pre-annotations, correct pre-annotations of poor quality, and add risk types to the annotated targets. When the risk type is no risk, that is, the target is normal, the annotated target will be regarded as a positive sample in the basemap library; when the risk type is any of the predefined risk types, the annotated target will be regarded as a negative sample in the basemap library.
[0018] In the above scheme, step 2 specifically includes the following steps:
[0019] Step 2.1: Divide the input original detection image into several sliding window sub-images. Each sliding window sub-image will be evenly overlapped with the adjacent sliding window sub-images to ensure the effect at the edge of the sub-image during subsequent reasoning.
[0020] Step 2.2: Perform instance segmentation model inference on each sliding window sub-image to obtain a segmentation mask on each sub-image with the number of target categories as the number of channels and the width and height of the window sub-image as the width and height; (If no target is obtained on the sub-image, a full False mask is returned. When merging, whether or not a target is obtained on each sub-image is handled the same way; if no target is obtained on the entire image after merging, the comparison and analysis phase is also entered, because the target on the base image may disappear, which is also a risk.)
[0021] Step 2.3: Merge the segmentation masks obtained by reasoning on each sub-image to obtain a segmentation mask on the original detection image with the number of target categories as the number of channels and the width and height of the original detection image as the width and height, and convert the segmentation mask into the minimum circumscribed polygons of several targets to be analyzed.
[0022] In the above scheme, step 2.1 specifically includes the following steps:
[0023] Step 2.1.1: Given a sliding window size interval [min_size, max_size] and a minimum fixed pixel block size patch_size, randomly obtain an integer multiple of the minimum fixed pixel block size within the sliding window size interval as the current sliding window size window_size;
[0024] Step 2.1.2: For the width and height of the image, find the integer value of the quotient of the side length length in the corresponding direction and the sliding window size window_size, and use it as the number of sliding windows window_num in the corresponding direction; find the integer value of the quotient of the difference between the side length length in that direction and the window size window_size and the number of sliding windows window_num minus one, and use it as the sliding step size step_size of the sliding window in that direction;
[0025] Step 2.1.3: Based on the sliding step size step_size and the window size window_size, window_num sliding windows in the corresponding direction can be obtained; the starting position of the i-th sliding window in the corresponding direction is min(step_size*(i-1), length-window_size-1), and the ending position is min(step_size*(i-1)+window_size-1, length-1); the number of sliding windows in the width and height directions are recorded as window_num_w and window_num_h respectively, and a total of window_num_w*window_num_h sliding windows are generated.
[0026] In the above scheme, step 2.2 specifically includes the following steps:
[0027] Step 2.2.1: Construct a one-hot-mask with the number of channels as the number of target categories and the width and height of the sliding window sub-image as the width and height of the sub-image;
[0028] Step 2.2.2: If there is a valid reasoning result on the corresponding subgraph, traverse all valid reasoning results on the corresponding subgraph, and perform a logical OR operation on the segmentation mask of the result and the one-hot mask of the subgraph on the corresponding category index to accumulate the segmentation results on the sliding window subgraph;
[0029] In the above scheme, step 2.3 specifically includes the following steps:
[0030] Step 2.3.1: Construct a full-Fa1se Boolean mask with the number of target categories as the number of channels and the width and height of the original detection image as the one-hot-mask;
[0031] Step 2.3.2: Traverse all sliding window sub-images, and for each sub-image, perform a logical OR operation on the one-hot mask of the sub-image and the one-hot mask of the original detection image at the corresponding category index and sliding window position to accumulate the segmentation results of the sliding window sub-image;
[0032] Step 2.3.3: After the traversal is completed, mark the connected components of the one-hot mask, obtain several segmentation polygons, filter out segmentation polygons whose areas are less than the preset target area threshold or whose aspect ratios exceed the preset target aspect ratio threshold, and use the remaining valid segmentation polygons as the target instances to be analyzed obtained by the final instance segmentation recognition.
[0033] In the above scheme, step 3 specifically includes the following steps:
[0034] Step 3.1: Calculate the pixel-level similarity index between the original detection image and each base image in the dynamic base image library;
[0035] Step 3.2: If the pixel-level similarities calculated above are all lower than the preset similarity threshold, the base map with the closest timestamp to the detection map is selected as the best matching base map; otherwise, the base map with a pixel-level similarity index higher than the preset similarity threshold and the closest timestamp to the detection map is selected as the best matching base map.
[0036] In the above scheme, step 4 specifically includes the following steps:
[0037] Step 4.1: Calculate the area intersection over union (IoU) of several target instances to be analyzed on the detection map obtained in step 2.3 and all positive samples and negative samples in the best matching base map obtained in step 3.2, and form an IoU matrix to match the target to be analyzed with the positive and negative samples; preset two IoU thresholds, high and low, representing the lower limits of good matching and suboptimal matching, respectively, to determine the risk type of the target instance of the sample to be analyzed;
[0038] (The IOU matrix is calculated here to match the positive and negative samples on the target to be analyzed and the base map)
[0039] Step 4.2: Perform minimum cost Hungarian matching on the IoU matrix obtained in step 4.1 to obtain several candidate matching sample pairs and several isolated samples that are not matched;
[0040] Step 4.3: Traverse the matching sample pairs obtained in step 4.2.
[0041] If the IoU value of the sample pair is greater than or equal to the high IoU threshold, it is a good match. The sample on the detection map has no visible change relative to the corresponding sample on the base map, and the risk type is consistent with the base map sample.
[0042] If the IoU value is less than the high IoU threshold but still greater than or equal to the low IoU threshold, it is a suboptimal match. The sample to be analyzed on the detection map has a visible change relative to the corresponding sample on the base map, but it has not caused the matching relationship to be lost. The risk type is set to target change;
[0043] If the IoU threshold is less than the low IoU threshold, the match fails. In this case, the candidate matching sample pair is split into two isolated samples in the sample to be analyzed and the base map sample respectively.
[0044] Step 4.4: Traverse the isolated samples among the samples to be analyzed obtained in steps 4.2 and 4.3. These samples have no effective match with the base map samples, that is, they are new samples relative to the base map samples, and the risk type is set to target new;
[0045] Step 4.5: Traverse the isolated samples in the base map samples that may be obtained in step 4.2 and step 4.3. These samples have no effective match with the samples to be analyzed, that is, they are disappeared samples relative to the samples to be analyzed, and the risk type is set to target disappearance;
[0046] Step 4.6: After the traversal is completed, the detection map and the sample information after comparison and analysis on it are integrated to generate a reporting map containing risk type annotations. The reporting map not only contains the original detection map, but also includes the risk type information of each analyzed sample. Then the reporting map and its sample information are reported to the system.
[0047] In the above scheme, step 5 specifically includes the following steps:
[0048] Step 5.1: Perform image quality analysis on the reported image after the recognition analysis in step 4.6. If the image quality of the reported image after the recognition analysis is good or still within the usable range, proceed to the subsequent steps. Otherwise, the real-time hot update of the dynamic base map library will not be performed after this recognition analysis.
[0049] Step 5.2: For the reported images obtained in step 5.1 with good or usable image quality after recognition analysis, reuse the pixel-level similarity obtained in step 3.1, and remove the image in the dynamic base map library whose pixel-level similarity is higher than the preset similarity threshold and whose timestamp is farthest from the reported image;
[0050] Step 5.3: Add the reported map after identification and analysis to the dynamic base map library. At the same time, mark the samples with risk type of no risk or normal on the base map as positive samples, and mark the samples with risk type of any predefined risk type as negative samples. At this point, the dynamic base map library is updated in real time after identification and analysis.
[0051] Because the present invention adopts the above technical means, it has the following beneficial effects:
[0052] Sliding window-based instance segmentation model for risky target recognition: By combining sliding window technology and instance segmentation model, the recognition accuracy of small and blurred targets in high-resolution but poor-quality transmission line images is improved. This method ensures accurate detection of subtle and irregular areas, solving the problems of missed detection and false detection in traditional methods.
[0053] Real-time hot update mechanism of dynamic basemap library: A dynamic basemap library that can be updated at any time is built to achieve real-time adjustment of risk target data to meet the short-term inspection needs of transmission line scenarios. Each image after recognition and analysis automatically replaces the basemap library image with the furthest timestamp, ensuring that the basemap library always contains the latest and most reference sample data, thereby improving the accuracy and efficiency of recognition.
[0054] Positive and negative sample comparison analysis: Through the construction and matching of positive and negative samples, the ability to distinguish the target risk status and risk category is increased. This method can not only identify the target itself, but also determine whether the risk has occurred and the type of risk, etc., effectively overcoming the limitations of fixed categories and fixed states in traditional methods.
[0055] IoU threshold layered matching and risk type determination: set high and low IoU thresholds during comparison analysis, and use the Hungarian matching algorithm to ensure the optimal match between the identified samples and the base map library samples. This method can detect risk changes more carefully (such as target disappearance, new additions, etc.), thereby improving the accuracy of risk type determination.
[0056] Target risk type determination function: This proposal uses positive and negative sample comparison and combines the IoU matching threshold to carefully determine the risk type of the target, making the recognition results more valuable for decision-making reference.
[0057] Higher recognition efficiency and stability: This proposal designs an efficient, step-by-step comparison and analysis process. By combining the sliding window segmentation mask merging and IoU threshold screening with the Hungarian matching method, the comparison calculation efficiency is improved while ensuring the stability of recognition accuracy.
[0058] In general, this technical solution effectively improves the accuracy and timeliness of transmission line risk target identification by combining a sliding window-based instance segmentation model, a real-time hot-updated dynamic base map library, and positive and negative sample comparison analysis, overcomes the limitations of existing methods, and provides an efficient and reliable technical means for transmission line inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a simplified flow chart of the present invention;
[0060] Figure 2 Identify the target to be analyzed for the sliding window based instance segmentation model;
[0061] Figure 3 A simplified flow chart of dividing the input original detection image into several sliding window sub-images;
[0062] Figure 4 A simplified flow chart for merging the targets to be analyzed obtained by identifying each sub-graph;
[0063] Figure 5 A simplified flow chart for comparing and analyzing the target to be analyzed with the positive and negative samples in the matching base map and outputting the final risk target identification result;
[0064] Figure 6 This is a simplified diagram of the real-time hot update process of the dynamic basemap library. DETAILED DESCRIPTION
[0065] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions made to the present invention should all be included in the scope of the claims of the present invention.
[0066] In addition, in order to better illustrate the present invention, numerous specific details are given in the following specific embodiments. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.
[0067] The present invention aims to solve the problems in the identification of risk targets of transmission lines, that the direct identification method based on target detection or instance segmentation model has high identification difficulty, is prone to false detection and missed detection, and cannot judge whether the identified target has already incurred risk and the risk type, and the comparison and analysis method based on base map library only focuses on limited ROI area, has high maintenance cost and long update cycle. By constructing a dynamic base map library with the whole map as the ROI area, containing both positive and negative samples and real-time hot update, an instance segmentation model based on a sliding window is used to identify the target to be analyzed of a fixed category, the target to be analyzed is compared and analyzed with the positive and negative samples in the dynamic base map library, and the final risk target identification result is output after the comparison and analysis, and the dynamic base map library is subsequently hot updated in real time, thereby improving the accuracy and efficiency of transmission line risk target identification.
[0068] The present invention provides a transmission line risk target identification method based on sliding window and positive and negative samples, comprising the following steps:
[0069] Step 1: Collect and select a small amount of transmission line point data, pre-process, pre-label, and manually correct them to establish an initial dynamic base map library;
[0070] Step 1.1: Collect several recent images of the location with good imaging quality under different weather conditions and at different time periods as the initial base map with timestamps;
[0071] Step 1.2: For each initial base map, identify several targets of a fixed category through a sliding window-based instance segmentation model. The specific identification process will be described in detail in step 2. The identification results are used as pre-labeling of positive and negative sample targets in the form of target categories and segmentation polygons of the labeled targets.
[0072] Step 1.3: Filter out erroneous pre-annotations, correct pre-annotations of poor quality, and add risk types to the annotated targets. When the risk type is no risk, that is, the target is normal, the annotated target will be regarded as a positive sample in the basemap library; when the risk type is any of the predefined risk types, the annotated target will be regarded as a negative sample in the basemap library.
[0073] Step 2: For the input detection image, identify the target to be analyzed through the instance segmentation model based on the sliding window;
[0074] Step 2.1: Divide the input original detection image into several sliding window sub-images. Each sliding window sub-image will be evenly overlapped with the adjacent sliding window sub-images to ensure the effect at the edge of the sub-image during subsequent reasoning.
[0075] Step 2.1.1: Given a sliding window size interval [min_size, max_size] and a minimum fixed pixel block size patch_size, randomly obtain an integer multiple of the minimum fixed pixel block size within the sliding window size interval as the current sliding window size window_size;
[0076] Step 2.1.2: For the width and height of the image, find the rounded value of the quotient of the side length length in that direction and the sliding window size window_size, and use it as the number of sliding windows window_num in that direction; find the rounded value of the quotient of the difference between the side length length in that direction and the window size window_size and the number of sliding windows window_num minus one, and use it as the sliding step size step_size of the sliding window in that direction;
[0077] Step 2.1.3: Based on the sliding step size step_size and the window size window_size, window_num sliding windows in this direction can be obtained; the starting position of the i-th sliding window in this direction is min(step_size*(i-1), length-window_size-1), and the ending position is min(step_size*(i-1)+window_size-l, length-1); the number of sliding windows in the width and height directions are recorded as window_num_w and window_num_h respectively, and a total of window_num_w*window_num_h sliding windows are generated.
[0078] Step 2.2: Perform instance segmentation model inference on each sliding window sub-image to obtain a segmentation mask on each sub-image with the number of target categories as the number of channels and the width and height of the window sub-image as the width and height;
[0079] Step 2.2.1: Construct a one-hot-mask with the number of channels as the number of target categories and the width and height of the sliding window sub-image as the width and height of the sub-image;
[0080] Step 2.2.2: If there is a valid reasoning result on the corresponding subgraph, traverse all valid reasoning results on the corresponding subgraph, and perform a logical OR operation on the segmentation mask of the result and the one-hot mask of the subgraph on the corresponding category index to accumulate the segmentation results on the sliding window subgraph;
[0081] Step 2.3: Merge the segmentation masks obtained by reasoning on each sub-image to obtain a segmentation mask on the original detection image with the number of target categories as the number of channels and the width and height of the original detection image as the width and height, and convert the segmentation mask into the minimum circumscribed polygons of several targets to be analyzed.
[0082] Step 2.3.1: Construct a full-Fa1se Boolean mask with the number of target categories as the number of channels and the width and height of the original detection image as the one-hot-mask;
[0083] Step 2.3.2: Traverse all sliding window sub-images, and for each sub-image, perform a logical OR operation on the one-hot mask of the sub-image and the one-hot mask of the original detection image at the corresponding category index and sliding window position to accumulate the segmentation results of the sliding window sub-image;
[0084] Step 2.3.3: After the traversal is completed, mark the connected components of the one-hot mask, obtain several segmentation polygons, filter out segmentation polygons whose areas are less than the preset target area threshold or whose aspect ratios exceed the preset target aspect ratio threshold, and use the remaining valid segmentation polygons as the target instances to be analyzed obtained by the final instance segmentation recognition.
[0085] Step 3: For the input detection map, match the only best base map in the dynamic base map library corresponding to the point corresponding to the detection map;
[0086] Step 3.1: Calculate the pixel-level similarity index between the original detection image and each base image in the dynamic base image library;
[0087] Step 3.2: If the pixel-level similarities calculated above are all lower than the preset similarity threshold, the base map with the closest timestamp to the detection map is selected as the best matching base map; otherwise, the base map with a pixel-level similarity index higher than the preset similarity threshold and the closest timestamp to the detection map is selected as the best matching base map.
[0088] Step 4: Compare and analyze the target to be analyzed with the positive and negative samples in the matching base map, and output the final risk target identification result;
[0089] Step 4.1: Calculate the area intersection over union (IoU) of several target instances to be analyzed on the detection map obtained in step 2.3 and all positive samples and negative samples in the best matching base map obtained in step 3.2, and form an IoU matrix to match the target to be analyzed with the positive and negative samples; preset two IoU thresholds, high and low, representing the lower limits of good matching and suboptimal matching, respectively, to determine the risk type of the target instance of the sample to be analyzed;
[0090] Step 4.2: Perform minimum cost Hungarian matching on the IoU matrix obtained in step 4.1 to obtain several candidate matching sample pairs and several isolated samples that are not matched;
[0091] Step 4.3: Traverse the matching sample pairs obtained in step 4.2.
[0092] If the IoU value of the sample pair is greater than or equal to the high IoU threshold, it is a good match. The sample on the detection map has no visible change relative to the corresponding sample on the base map, and the risk type is consistent with the base map sample.
[0093] If the IoU value is less than the high IoU threshold but still greater than or equal to the low IoU threshold, it is a suboptimal match. The sample to be analyzed on the detection map has a visible change relative to the corresponding sample on the base map, but it has not caused the matching relationship to be lost. The risk type is set to target change;
[0094] If the IoU value is less than the low IoU threshold, the match fails. In this case, the candidate matching sample pair is split into two isolated samples in the sample to be analyzed and the base map sample respectively;
[0095] Step 4.4: Traverse the isolated samples among the samples to be analyzed obtained in steps 4.2 and 4.3. These samples have no effective match with the base map samples, that is, they are new samples relative to the base map samples, and the risk type is set to target new;
[0096] Step 4.5: Traverse the isolated samples in the base map samples that may be obtained in step 4.2 and step 4.3. These samples have no effective match with the samples to be analyzed, that is, they are disappeared samples relative to the samples to be analyzed, and the risk type is set to target disappearance;
[0097] Step 4.6: After the traversal is completed, the sample after comparison and analysis between the detection image and the detection image is reported.
[0098] Step 5: Based on the detection map and its risk target identification results, perform real-time hot update of the dynamic base map library corresponding to the point.
[0099] Step 5.1: Perform image quality analysis on the reported image after the recognition analysis in step 4.6. If the image quality of the reported image after the recognition analysis is good or still within the usable range, proceed to the subsequent steps. Otherwise, the real-time hot update of the dynamic base map library will not be performed after this recognition analysis.
[0100] Step 5.2: For the reported images obtained in step 5.1 with good or usable image quality after recognition analysis, reuse the pixel-level similarity obtained in step 3.1, and remove the image in the dynamic base map library whose pixel-level similarity is higher than the preset similarity threshold and whose timestamp is farthest from the reported image;
[0101] Step 5.3: Add the reported map after identification and analysis to the dynamic base map library. At the same time, mark the samples with risk type of no risk or normal on the base map as positive samples, and mark the samples with risk type of any predefined risk type as negative samples. At this point, the dynamic base map library is updated in real time after identification and analysis.
Claims
1. A transmission line risk target identification method based on sliding window and positive and negative samples, characterized in that: The following steps are involved: Step 1: Collect and select a small amount of transmission line point data, pre-process, pre-label, and manually correct them to establish an initial dynamic base map library; Step 2: For the input detection image, identify the target to be analyzed through the instance segmentation model based on the sliding window; Step 3: For the input detection map, match the only best base map in the dynamic base map library corresponding to the point corresponding to the detection map; Step 4: Compare and analyze the target to be analyzed with the positive and negative samples in the matching base map, and output the final risk target identification result; Step 5: Based on the detection map and its risk target identification results, perform real-time hot update of the dynamic base map library corresponding to the points corresponding to the detection map.
2. A transmission line risk target identification method based on sliding window and positive and negative samples, characterized in that: The above step 1 specifically includes the following steps: Step 1.1: Collect several recent images of transmission line points with good imaging quality under different weather conditions and at different time periods as initial base maps with timestamps; Step 1.2: For each initial base map, identify several targets of a fixed category through a sliding window-based instance segmentation model. The specific identification process will be described in detail in step 2. The identification results are used as pre-labeling of positive and negative sample targets in the form of target categories and segmentation polygons of the labeled targets. Step 1.3: Filter out erroneous pre-annotations, correct pre-annotations of poor quality, and add risk types to the annotated targets. When the risk type is no risk, that is, the target is normal, the annotated target will be regarded as a positive sample in the basemap library; when the risk type is any of the predefined risk types, the annotated target will be regarded as a negative sample in the basemap library.
3. According to claim 1, a transmission line risk target identification method based on sliding window and positive and negative samples is characterized in that: Step 2 specifically includes the following steps: Step 2.1: Divide the input original detection image into several sliding window sub-images. Each sliding window sub-image will be evenly overlapped with the adjacent sliding window sub-images to ensure the effect at the edge of the sub-image during subsequent reasoning. Step 2.2: Perform instance segmentation model inference on each sliding window sub-image to obtain a segmentation mask on each sub-image with the number of target categories as the number of channels and the width and height of the window sub-image as the width and height; Step 2.3: Merge the segmentation masks obtained by reasoning on each sub-image to obtain a segmentation mask on the original detection image with the number of target categories as the number of channels and the width and height of the original detection image as the width and height, and convert the segmentation mask into the minimum circumscribed polygons of several targets to be analyzed.
4. According to claim 3, a transmission line risk target identification method based on sliding window and positive and negative samples is characterized in that: Step 2.1 specifically includes the following steps: Step 2.1.1: Given a sliding window size interval [min_size, max_size] and a minimum fixed pixel block size patch_size, randomly obtain an integer multiple of the minimum fixed pixel block size within the sliding window size interval as the current sliding window size window_size; Step 2.1.2: For the width and height of the image, find the integer value of the quotient of the side length length in the corresponding direction and the sliding window size window_size, and use it as the number of sliding windows window_num in the corresponding direction; find the integer value of the quotient of the difference between the side length length in that direction and the window size window_size and the number of sliding windows window_num minus one, and use it as the sliding step size step_size of the sliding window in that direction; Step 2.1.3: Based on the sliding step size step_size and the window size window_size, window_num sliding windows in the corresponding direction can be obtained; the starting position of the i-th sliding window in the corresponding direction is min(step_size*(i-1), length-window_size-1), and the ending position is min(step_size*(i-1)+window_size-1, length-1); the number of sliding windows in the width and height directions are recorded as window_num_w and window_num_h respectively, and a total of window_num_w*window_num_h sliding windows are generated.
5. According to claim 3, a transmission line risk target identification method based on sliding window and positive and negative samples is characterized in that: Step 2.2 specifically includes the following steps: Step 2.2.1: Construct a one-hot-mask with the number of channels as the number of target categories and the width and height of the sliding window sub-image as the width and height of the sub-image; Step 2.2.2: If there is a valid inference result on the corresponding subgraph, traverse all valid inference results on the corresponding subgraph, and perform a logical OR operation on the segmentation mask of the result and the subgraph one-hot mask on the corresponding category index to accumulate the segmentation results on the sliding window subgraph.
6. According to claim 3, a transmission line risk target identification method based on sliding window and positive and negative samples is characterized in that: Step 2.3 specifically includes the following steps: Step 2.3.1: Construct a one-hot-mask with the number of target categories as the number of channels and the width and height of the original detection image as the width and height of the full False Boolean mask; Step 2.3.2: Traverse all sliding window sub-images, and for each sub-image, perform a logical OR operation on the one-hot mask of the sub-image and the one-hot mask of the original detection image at the corresponding category index and sliding window position to accumulate the segmentation results of the sliding window sub-image; Step 2.3.3: After the traversal is completed, mark the connected components of the one-hot mask, obtain several segmentation polygons, filter out segmentation polygons whose areas are less than the preset target area threshold or whose aspect ratios exceed the preset target aspect ratio threshold, and use the remaining valid segmentation polygons as the target instances to be analyzed obtained by the final instance segmentation recognition.
7. The method for identifying transmission line risk targets based on sliding window and positive and negative samples according to claim 1 is characterized in that: Step 3 specifically includes the following steps: Step 3.1: Calculate the pixel-level similarity index between the original detection image and each base image in the dynamic base image library; Step 3.2: If the pixel-level similarities calculated above are all lower than the preset similarity threshold, the base map with the closest timestamp to the detection map is selected as the best matching base map; otherwise, the base map with a pixel-level similarity index higher than the preset similarity threshold and the closest timestamp to the detection map is selected as the best matching base map.
8. The method for identifying transmission line risk targets based on sliding windows and positive and negative samples according to claim 6 is characterized in that: Step 4 specifically includes the following steps: Step 4.1: Calculate the area intersection over union (IoU) of several target instances to be analyzed on the detection map obtained in step 2.3 and all positive samples and negative samples in the best matching base map obtained in step 3.2, and form an IoU matrix to match the target to be analyzed with the positive and negative samples; preset two IoU thresholds, high and low, representing the lower limits of good matching and suboptimal matching, respectively, to determine the risk type of the target instance of the sample to be analyzed; (The IOU matrix is calculated here to match the positive and negative samples on the target to be analyzed and the base map) Step 4.2: Perform minimum cost Hungarian matching on the IoU matrix obtained in step 4.1 to obtain several candidate matching sample pairs and several isolated samples that are not matched; Step 4.3: Traverse the matching sample pairs obtained in step 4.
2. If the IoU value of the sample pair is greater than or equal to the high IoU threshold, it is a good match. The sample on the detection map has no visible change relative to the corresponding sample on the base map, and the risk type is consistent with the base map sample. If the IoU value is less than the high IoU threshold but still greater than or equal to the low IoU threshold, it is a suboptimal match. The sample to be analyzed on the detection map has a visible change relative to the corresponding sample on the base map, but it has not caused the matching relationship to be lost. The risk type is set to target change; If the IoU threshold is less than the low IoU threshold, the match fails. In this case, the candidate matching sample pair is split into two isolated samples in the sample to be analyzed and the base map sample respectively. Step 4.4: Traverse the isolated samples among the samples to be analyzed obtained in steps 4.2 and 4.
3. These samples have no effective match with the base map samples, that is, they are new samples relative to the base map samples, and the risk type is set to target new; Step 4.5: Traverse the isolated samples in the base map samples that may be obtained in step 4.2 and step 4.
3. These samples have no effective match with the samples to be analyzed, that is, they are disappeared samples relative to the samples to be analyzed, and the risk type is set to target disappearance; Step 4.6: After the traversal is completed, the detection map and the sample information after comparison and analysis on it are integrated to generate a reporting map containing risk type annotations. The reporting map not only contains the original detection map, but also includes the risk type information of each analyzed sample. Then the reporting map and its sample information are reported to the system.
9. The method for identifying transmission line risk targets based on sliding window and positive and negative samples according to claim 7 is characterized in that: Step 5 specifically includes the following steps: Step 5.1: Perform image quality analysis on the reported image after the recognition analysis in step 4.
6. If the image quality of the reported image after the recognition analysis is good or still within the usable range, proceed to the subsequent steps. Otherwise, the real-time hot update of the dynamic base map library will not be performed after this recognition analysis. Step 5.2: For the reported images obtained in step 5.1 with good or usable image quality after recognition analysis, reuse the pixel-level similarity obtained in step 3.1, and remove the image in the dynamic base map library whose pixel-level similarity is higher than the preset similarity threshold and whose timestamp is farthest from the reported image; Step 5.3: Add the reported map after identification and analysis to the dynamic base map library. At the same time, mark the samples with risk type of no risk or normal on the base map as positive samples, and mark the samples with risk type of any predefined risk type as negative samples. At this point, the dynamic base map library is updated in real time after identification and analysis.