Method and system for improving work safety risk target identification precision of power distribution network
Through adaptive segmentation and precise position correction of video stream images in distribution network operation scenarios, combined with confidence judgment, the problems of low detection accuracy and poor robustness of weak and small targets in the existing technology are solved, and the efficiency of distribution network operations is improved. The accuracy and reliability of security risk target identification realize plug-and-play algorithm modules.
Patent Information
- Application Number
- CN202410636444.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-09-24
AI Technical Summary
Existing target recognition technology has low detection accuracy and poor robustness for weak and small targets in distribution network operation scenarios, and the algorithm is generally not universal, has high cost of use, requires a lot of computing resources, and is difficult to achieve plug-and-play .
By adaptively dividing the original video stream image into multiple squares, the center points of the target are distributed in different squares. Combined with the category and confidence of the target, the local attention matching algorithm and Euclidean distance correction are used to determine the accuracy of the target. location, and perform information fusion to improve recognition results.
It improves the accuracy and reliability of safety risk target identification in distribution network operations, reduces the false alarm rate and target recognition flicker rate, and implements a plug-and-play algorithm module with strong adaptability and suitable for scenarios with tight resources.
Smart Images

Figure CN118692004A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing and distribution network operation safety risk management and control, and in particular to a method and system for improving the accuracy of identifying safety risk targets in distribution network operations. Background Art
[0002] Target recognition is to find all objects of interest in the image and determine the category and location of the objects. The current mainstream technology trend is target recognition based on deep learning algorithms. It mainly focuses on the semantic understanding of the target image, extracts the edge features of the image through the convolutional integral network, and gradually extracts deep-level target features as the network deepens. The target location is detected by understanding the semantics of the image. The difficulties of the target recognition algorithm for distribution network operation safety risks mainly include:
[0003] 1. Due to the large number of weak (low signal-to-noise ratio) and small (targets occupying a small portion of the full frame) targets in distribution network operation scenarios, and the small amount of information they contain, the current domestic and foreign target recognition technologies generally have low detection accuracy for weak and small targets, or the use conditions of the algorithms are more stringent and not universal. Some algorithms are only effective for certain specific scenarios, and some algorithms are only effective for signals in certain characteristic bands. The algorithms are not plug-and-play and have high usage costs. Many algorithms contain steps to modify the target recognition model, and once the model is modified, the user needs to provide video data again and retrain, which is time-consuming.
[0004] Most algorithms with better recognition capabilities have more complex calculation steps and require additional computing power. Some distribution network operation scenarios with limited hardware resources may not be able to provide so many computing resources. Summary of the invention
[0005] In order to solve the problem that the existing target recognition technology generally has poor detection ability for weak targets and poor robustness, the present invention proposes a method for improving the accuracy of identifying safety risk targets in distribution network operations, including:
[0006] Based on the original video stream image and the safety risk target recognition algorithm of the distribution network engineering operation, the location, category and confidence of the target are obtained;
[0007] Based on the position of the target, the original video stream image is adaptively divided into a plurality of squares, so that the center point of the target is distributed in different squares;
[0008] Based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, the target and its precise location are determined by combining the category and confidence.
[0009] The precise position of the target is fused with the original video stream image to obtain a recognition result.
[0010] Optionally, the adaptively dividing the original video stream image into a plurality of squares based on the position of the target so that the center point of the target is distributed in different squares includes:
[0011] Based on the detailed size of the original video stream image in the width and height directions and the maximum value of the pixels in the width and height directions of the target output by the target recognition algorithm, determine the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction;
[0012] The original video stream image is grid-divided based on the number of squares in the width direction and the length direction of the original video stream image adaptively segmented to obtain M×N squares, where M and N are the number of squares in the width direction and the length direction of the original video stream image adaptively segmented, and M and N are positive integers.
[0013] Optionally, the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction are calculated as follows:
[0014]
[0015]
[0016] Where W and H are the pixel sizes in width and height directions of the output image respectively; w max 、h max The maximum values of the pixels in the width and height directions of all the targets output by the target recognition algorithm respectively; and are the adaptive coefficients in width and height directions respectively; k M and k N are the loop control constants in the width and height directions, and M and N are the number of squares in the width and length directions of the adaptive segmentation of the original video stream image.
[0017] Optionally, the determination of the target and the precise location of the target based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, combined with the category and confidence, includes:
[0018] Based on the previous and next multi-frame information of the same target and the previous and next frame association algorithm, the accuracy of the category of the target is judged, and the target with inaccurate category is deleted;
[0019] The local attention matching algorithm is used to match the feature information of the area A where the center point of the target with accurate category is located with the adjacent square area to obtain similarity information, and then determine the adjacent square area group with higher correlation;
[0020] Expand each square so that there is some overlap between every two adjacent squares;
[0021] If the position of the target detected in the next frame does not appear in the A grid area but appears in a group of adjacent areas with a higher correlation, it is considered to be correctly identified and the position of the target is taken as the precise position; otherwise, the target position is corrected based on the Euclidean distance between the center point of the target in the current frame and the next frame combined with the similarity information.
[0022] Optionally, the using of the local attention matching algorithm to match the adjacent grid area group with a high correlation degree according to the feature information of the area A where the center point of the target is located includes:
[0023] The convolutional network is used to extract the feature map of the square area A where the center point of the target is located and each square area in each adjacent square area group;
[0024] Matching the feature map of the grid area A defined by the center point with the feature maps of each adjacent grid area group, and calculating the similarity information between the grid area A defined by the center point and each adjacent grid area;
[0025] The similarity information of the two upper and lower adjacent squares of A, the two left and right adjacent squares, and the four corner adjacent squares are averaged respectively;
[0026] The square area corresponding to the value with the smallest average value is regarded as the adjacent square area group with a higher correlation with A;
[0027] The adjacent square area groups include: two square areas adjacent to A above and below, a square area group adjacent to A left and right, and a square area group located at the four corners of A.
[0028] Optionally, the correcting the target position based on the Euclidean distance between the center point position of the target in the current frame and the next frame combined with similarity information includes:
[0029] Calculate the Euclidean distance between the center point of the target in the current frame and the next frame;
[0030] The Euclidean distance is multiplied by the average value of similarity information of adjacent square area groups with a high correlation degree to obtain a corrected distance value;
[0031] The center point position of the target in the next frame is corrected based on the correction distance value and is still located on the line connecting the center points of the target in the current frame and the next frame; if the center point of the target in the next frame returns to area A after correction, the corrected target in the next frame is retained, otherwise the confidence level of the target output detected by the target recognition algorithm in the next frame is combined to determine whether to retain or discard the target.
[0032] Optionally, judging whether to retain or discard the target based on the confidence level of the target output detected in the next frame in combination with the target recognition algorithm includes:
[0033] If the output confidence level is greater than a set threshold, the target is retained, otherwise it is discarded.
[0034] Optionally, the obtaining of a recognition result by fusing information based on the precise position of the target with the original video stream image includes:
[0035] The precise position of the target is marked in the original video stream image to obtain a recognition result.
[0036] On the other hand, the present invention also provides a system for improving the accuracy of identifying safety risk targets in distribution network operations, comprising:
[0037] The original recognition module is used to obtain the location, category and confidence of the target based on the original video stream image and the safety risk target recognition algorithm of the distribution network engineering operation;
[0038] A grid segmentation module is used to adaptively segment the original video stream image into a plurality of grids based on the position of the target, so that the center point of the target is distributed in different grids;
[0039] A location determination module is used to determine the target and its precise location based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, combined with the category and confidence;
[0040] The fusion module is used to fuse information based on the precise position of the target with the original video stream image to obtain a recognition result.
[0041] Optionally, the grid segmentation module is specifically used to:
[0042] Based on the detailed size of the original video stream image in the width and height directions and the maximum value of the pixels in the width and height directions of the target output by the target recognition algorithm, determine the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction;
[0043] The original video stream image is grid-divided based on the number of squares in the width direction and the length direction of the original video stream image adaptively segmented to obtain M×N squares.
[0044] Optionally, the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction are calculated as follows:
[0045]
[0046]
[0047] Wherein, W and H are the pixel sizes in width and height directions of the output image respectively; max 、h maxThe maximum values of the pixels in the width and height directions of all the targets output by the target recognition algorithm respectively; and are the adaptive coefficients in width and height directions respectively; k i is the loop control constant, i takes M or N to represent the width and height direction respectively, that is, k M and k N Constants for loop control in width and height directions.
[0048] Optionally, the location determination module includes:
[0049] A determination submodule is used to match the feature information of the area A where the center point of the target is located with the adjacent square area using a local attention matching algorithm to obtain similarity information, and then determine a group of adjacent square areas with a high degree of correlation;
[0050] The expansion submodule is used to expand each square so that there is a partial overlap between every two adjacent square areas;
[0051] The correction submodule is used to correct the target position based on the Euclidean distance between the center point of the target in the current frame and the next frame combined with the similarity information and confidence level if the target position detected in the next frame does not appear in the A grid area but appears in a group of adjacent areas with a higher correlation.
[0052] Optionally, the determining submodule is specifically used for:
[0053] The convolutional network is used to extract the feature map of the square area A where the center point of the target is located and each square area in each adjacent square area group;
[0054] Matching the feature map of the grid area A defined by the center point with the feature maps of each adjacent grid area group, and calculating the similarity information between the grid area A defined by the center point and each adjacent grid area;
[0055] The similarity information of the two upper and lower adjacent squares of A, the two left and right adjacent squares, and the four corner adjacent squares are averaged respectively;
[0056] The square area corresponding to the value with the smallest average value is regarded as the adjacent square area group with a higher correlation with A;
[0057] The adjacent square area groups include: two square areas adjacent to A above and below, a square area group adjacent to A left and right, and a square area group located at the four corners of A.
[0058] Optionally, the correction submodule corrects the target position based on the Euclidean distance of the center point position of the target in the current frame and the next frame in combination with similarity information, and the implementation steps include:
[0059] Calculate the Euclidean distance between the center point of the target in the current frame and the next frame;
[0060] The Euclidean distance is multiplied by the average value of similarity information of adjacent square area groups with a high correlation degree to obtain a corrected distance value;
[0061] The center point position of the target in the next frame is corrected based on the correction distance value and is still located on the line connecting the center points of the target in the current frame and the next frame; if the center point of the target in the next frame returns to area A after correction, the corrected target in the next frame is retained, otherwise the confidence level of the target output detected by the target recognition algorithm in the next frame is combined to determine whether to retain or discard the target.
[0062] Optionally, the fusion module is specifically used for:
[0063] The precise position of the target is marked in the original video stream image to obtain a recognition result.
[0064] In another aspect, the present application further provides a computing device, comprising: at least one processor and a memory;
[0065] The memory is used to store one or more programs;
[0066] When the one or more programs are executed by the at least one processor, a method for improving the accuracy of identifying safety risk targets in distribution network operations as described above is implemented.
[0067] On the other hand, the present application also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, a method for improving the accuracy of identifying safety risk targets in distribution network operations as described above is implemented.
[0068] Compared with the prior art, the present invention has the following beneficial effects:
[0069] The present invention provides a method for improving the accuracy of identifying safety risk targets in distribution network operations, including: obtaining the position, category and confidence of the target based on the original video stream image and the safety risk target identification algorithm of the distribution network engineering operation; based on the position of the target, adaptively dividing the original video stream image into multiple grids so that the center point of the target is distributed in different grids; based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, combining the category and confidence to determine the target and the precise position of the target; based on the precise position of the target, information fusion is performed with the original video stream image to obtain the identification result. The present invention improves the reliability and accuracy of identifying safety risk targets in distribution network operations, and solves the problem that the existing target recognition technology generally has poor detection ability for weak and small targets and poor robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A flow chart of a method for improving the accuracy of identifying safety risk targets in distribution network operations according to the present invention;
[0071] Figure 2 It is a schematic diagram of the application of the method for identifying the accuracy of the safety risk target of the distribution network operation involved in the specific embodiment of the present invention;
[0072] Figure 3 It is a schematic diagram of adaptive segmentation of original video stream images of the present invention;
[0073] Figure 4 A schematic diagram of a grid area A and its adjacent grid area group defined by the center point of the target object of the present invention;
[0074] Figure 5 It is a schematic diagram of the feature graph information extraction structure of the present invention. DETAILED DESCRIPTION
[0075] The present invention proposes a method for improving the accuracy of identifying safety risk targets in distribution network operations, thereby improving the reliability and accuracy of identifying safety risk targets in distribution network operations, and solving the problem that existing target recognition technologies generally have poor detection capabilities for weak and small targets and poor robustness.
[0076] Embodiment 1:
[0077] A method for improving the accuracy of identifying safety risk targets in distribution network operations, such as Figure 1 As shown, including:
[0078] Step S1: obtaining the location, category and confidence of the target based on the original video stream image and the safety risk target recognition algorithm of the distribution network engineering operation;
[0079] Step S2: Based on the position of the target, the original video stream image is adaptively divided into a plurality of squares, so that the center point of the target is distributed in different squares;
[0080] Step S3: Based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, the target and the precise location of the target are determined in combination with the category and confidence;
[0081] Step S4: fusing information based on the precise position of the target and the original video stream image to obtain a recognition result.
[0082] The embodiment of the present invention provides a method for improving the accuracy of identifying safety risk targets in distribution network operations, such as Figure 2 As shown, including:
[0083] Before step S1, the method further includes: acquiring an original video stream image.
[0084] Step S1 specifically includes:
[0085] Based on the original video stream image, the location, category and confidence of all targets are output according to the distribution network engineering operation safety risk target recognition algorithm;
[0086] Step S2: Based on the position of the target, the original video stream image is adaptively divided into a plurality of squares so that the center point of the target is distributed in different squares, specifically including:
[0087] The original video stream image is adaptively divided into M×N squares, where M and N are the numbers of squares in the width direction and the length direction of the adaptive division of the original video stream image.
[0088] The number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction are calculated as follows:
[0089]
[0090]
[0091] Wherein, W and H are the pixel sizes in width and height directions of the output image respectively; max 、h max The maximum values of the pixels in the width and height directions of all the targets output by the target recognition algorithm respectively; and are the adaptive coefficients in width and height directions respectively; k i is the loop control constant, i takes M or N to represent the width and height direction respectively, that is, k M and k N Constants for loop control in width and height directions.
[0092] Step S3: Based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, the target and the precise location of the target are determined in combination with the category and confidence, which specifically includes:
[0093] Based on the previous and next multi-frame information of the same target and the previous and next frame association algorithm, the accuracy of the category of the target is judged, and the target with inaccurate category is deleted;
[0094] The local attention matching algorithm is used to match the feature information of the area A where the center point of the target with accurate category is located with the adjacent square area to obtain similarity information, and then determine the adjacent square area group with higher correlation;
[0095] Expand each square so that there is some overlap between every two adjacent squares;
[0096] If the position of the target detected in the next frame does not appear in the A grid area but appears in a group of adjacent areas with a higher correlation, it is considered to be correctly identified and the position of the target is taken as the precise position; otherwise, the target position is corrected based on the Euclidean distance between the center point of the target in the current frame and the next frame combined with the similarity information.
[0097] Furthermore, the use of the local attention matching algorithm to match the adjacent grid area group with a high correlation degree according to the feature information of the area A where the center point of the target is located includes:
[0098] The convolutional network is used to extract the feature map of the square area A where the center point of the target is located and each square area in each adjacent square area group;
[0099] Matching the feature map of the grid area A defined by the center point with the feature maps of each adjacent grid area group, and calculating the similarity information between the grid area A defined by the center point and each adjacent grid area;
[0100] The similarity information of the two upper and lower adjacent squares of A, the two left and right adjacent squares, and the four corner adjacent squares are averaged respectively;
[0101] The square area corresponding to the value with the smallest average value is regarded as the adjacent square area group with a higher correlation with A;
[0102] The adjacent square area groups include: two square areas adjacent to A above and below, a square area group adjacent to A left and right, and a square area group located at the four corners of A.
[0103] Step S3 specifically includes:
[0104] Based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, it is judged whether the position of the target needs to be corrected, and when it is judged that correction is needed, the position is corrected;
[0105] Based on the previous and next n frames of information of the same target output by the target recognition algorithm, the accuracy of the category of the target is judged through the previous and next frame association algorithm, and the target with inaccurate category judgment is deleted, and n is a positive integer.
[0106] Among them, the adjacent grid area group includes an upper and lower grid area group, a left and right grid area group and a four-corner grid area group adjacent to the grid area where the center point of the target is located; there is a partial overlapping area between every two adjacent grid areas; the upper and lower grid area group includes two grid areas C1 and C2 adjacent to the upper and lower grid area A where the center point of the target is located, the left and right grid area group includes two grid areas D1 and D2 adjacent to the left and right of A; the four-corner grid area group includes four grid areas B1, B2, B3, and B4 located at the four corners of A.
[0107] Further, judging whether the position of the target needs to be corrected based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group includes:
[0108] If the position of the target detected in the next frame does not appear in the A grid area but appears in the adjacent area group with the highest correlation, it is considered to be correctly identified and the target is retained; otherwise, it is determined that the target position needs to be corrected;
[0109] Furthermore, when it is determined that correction is needed, position correction is performed, including: obtaining a correction distance value based on the Euclidean distance between the center point of the target in the current frame and the next frame multiplied by the similarity information between the A grid area and the grid area group where the target is located detected in the next frame; correcting the center point position of the target in the next frame based on the correction distance value, and the specific correction is to move the correction distance value along the line where the center point of the target in the current frame and the next frame is located; if the center point of the target in the next frame returns to the A grid area after correction, the target is retained, otherwise the target is retained or discarded based on the confidence level of the target output detected in the next frame by the target recognition algorithm.
[0110] The process of determining the adjacent grid area group with a high correlation degree includes:
[0111] The feature maps of the grid area A located at the center point of the target and each grid area in each adjacent grid area group are extracted through a convolutional network, and matching and comparison are performed to obtain the adjacent grid area group with a high correlation degree.
[0112] Furthermore, the convolutional network is used to extract the feature map of each square in the grid area A where the center point of the target is located and each adjacent grid area group, including:
[0113] A and 8 adjacent square area images are used as inputs, and each square area feature map is output through 9 3-1 structures, each 3-1 structure includes 3×3 convolution and 1×1 convolution. Further, the adjacent square area group with the highest correlation is obtained, including:
[0114] The similarity information β(A, B1) between the A and B1 grid areas is obtained by the following formula:
[0115]
[0116] Among them, A i,j is the pixel value of the i-th row and j-th column in the feature map of the A square area, B1 i,j is the pixel value of the i-th row and j-th column of the B1 square area feature map; w is the total number of rows, h is the total number of columns, i is the sequence number of the row, and j is the sequence number of the column.
[0117] Similarly, β(A,B2), β(A,B3), and β(A,B4) are obtained, where β(A,B2) is the similarity information between the A and B2 grid areas, β(A,B3) is the similarity information between the A and B3 grid areas, and β(A,B4) is the similarity information between the A and B4 grid areas.
[0118] β(A,B)=[β(A,B1)+β(A,B2)+β(A,B3)+β(A,B4)] / 4,
[0119] Where β(A,B) is the average similarity of the grid area groups located at the four corners of A.
[0120] Similarly, calculate β(A,C) and β(A,D); compare β(A,B), β(A,C), and β(A,D), and take the square area corresponding to the smallest β value among the three as the group of adjacent square areas with the highest correlation. β(A,C) is the average similarity of the two square areas adjacent to A above and below, and β(A,D) is the average similarity of the two square areas adjacent to A on the left and right.
[0121] Furthermore, based on the previous and next n frames of information of the same target output by the target recognition algorithm, the accuracy of the category of the target is judged by the previous and next frame association algorithm, including: updating the confidence of the current frame according to the following formula:
[0122] P=p i +a i ×p i-1 +a i ×p i-2 +…+a i ×p1
[0123] Among them, P is the confidence of the updated current frame, pi is the confidence of the current frame, p i-1 is the confidence of the previous frame, p i-2 is the confidence of the previous two frames, p1 is the confidence of the first frame, a i is the attenuation coefficient of the current frame, and the range is [0, 1]; if P is obtained to be greater than the confidence threshold p th , it is considered that the category recognition of this target is accurate, and the result is output;
[0124] If the confidence P of the updated current frame is lower than the confidence threshold p th , then determine whether the category of this target is accurate by executing a multi-frame voting strategy;
[0125] Furthermore, determining whether the category of this target is accurate by executing a multi-frame voting strategy includes:
[0126] Take the detection results of the nearest p frames. If the P of q frames among them is greater than the threshold p th , where q < p, it is determined that this detection result is accurate; if less than q frames meet the requirements, it is determined that the category detection of this target is inaccurate, and this target is discarded. Furthermore, fuse the corrected target position and the accurately judged target category with the pictures in the original video stream obtained, and output the recognition result, where p and q are positive integers.
[0127] Step S4: Fuse the accurate position of the target with the original video stream image to obtain a recognition result, including:
[0128] Mark the accurate position of the target in the original video stream image to obtain a recognition result.
[0129] The present invention provides a method for improving the recognition accuracy of safety risk targets in distribution network operations, achieving the purpose of improving the performance of existing target recognition algorithms;
[0130] The present invention provides a plug-and-play algorithm module with strong adaptability. As long as the position coordinates and category information output by the original video stream image and the original recognition algorithm can be obtained, the position accuracy of the original target recognition algorithm can be improved, and the false alarm rate can be reduced. Combining with the confidence level can improve the target category recognition accuracy of the original target recognition algorithm, and at the same time reduce the target recognition flicker rate of the original target recognition algorithm.
[0131] Embodiment 2:
[0132] Step 1: Obtain the original video stream image, and according to the position, category and confidence of all targets output by the recognition algorithm for safety risk targets in distribution network engineering operations.
[0133] The original video stream image is used as input to the adaptive segmentation algorithm, the position information of all targets is used as input to the local attention matching algorithm, the category information of all targets is used as input to the previous and next frame association algorithm, and the confidence information of all targets is used as input to the local attention matching algorithm and the previous and next frame association algorithm.
[0134] Step 2: Based on the positions of all targets, the original video stream image is adaptively divided into multiple squares and the centers of all targets are distributed in different squares as much as possible. The position distribution information of the original target recognition algorithm recognition results is counted, and the image in the original video stream is adaptively divided into M×N squares, such as Figure 3 The centers of all detected targets are distributed in different squares as much as possible, and the targets are placed in 9 squares at most.
[0135] By formula Calculate the number of segmentations M and N in the width and height directions of the original video stream image respectively;
[0136] Wherein, W and H are the pixel sizes in width and height directions of the output image respectively; max 、h max The maximum values of the pixels in the width and height directions of all the targets output by the target recognition algorithm respectively; and They are the adaptive coefficients in the width and height directions respectively. A smaller coefficient can make M and N as small as possible to reduce the computing space. A larger coefficient can make each target more independent in different grids to increase accuracy. and The minimum value is 1, and the maximum value is generally around 4, which can be adjusted according to needs; k i is the loop control constant, i takes M or N to represent the width and height directions respectively, and is determined as follows:
[0137] a) Let k i = 0, check whether there are two target centers divided into the same square, if not, go to c), if yes, continue to b);
[0138] b) Let k i =k i +1, repeat into a);
[0139] c) Check whether the target width and height pixel sizes w and h exceed 3W / M and 3H / N respectively. If not, complete k i Determination, if yes, continue to d);
[0140] d)k i =k i -1, repeat c).
[0141] Step 3: Based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, determine whether the position of the target needs to be corrected, and perform position correction when it is determined that correction is needed.
[0142] A local attention matching algorithm is used to match the area with a high correlation according to the feature information of the area where the center point of the target is located, so as to improve the stability of the detected target position in the next frame. Specifically, there are 3 key points.
[0143] Determine the grid area A where the center point of the target is located and its adjacent grid area group.
[0144] Based on the division of the acquired original video stream image into M×N squares in step 2, each square is enlarged so that there is a partial overlap between every two adjacent square areas, so as to stabilize the detection results and avoid flickering when the detection results fall on the junction of two squares. Grid area A includes the square where the center point of the target is located and the area expanded to the surrounding areas. The adjacent square area group includes an upper and lower grid area group, a left and right square area group, and a four-corner grid area group adjacent to the grid area A where the center point of the target is located; the upper and lower grid area group includes two grid areas C1 and C2 adjacent to A above and below, and the left and right square area group includes two grid areas D1 and D2 adjacent to A on the left and right; the four-corner grid area group includes four grid areas B1, B2, B3, and B4 located at the four corners of A, as follows Figure 4 .
[0145] A local attention matching algorithm is used to match the group of adjacent grid areas with the highest correlation according to the feature information of the grid area where the center point of the target is located.
[0146] The convolutional network extracts the feature maps of the grid area A where the center point of the target is located and each grid area in each adjacent grid area group, and performs matching and comparison to select the adjacent grid area group with the highest correlation. The local attention matching algorithm mainly uses a small convolutional network to extract the feature maps of area A and its eight adjacent areas, and performs matching and comparison to select the area group with a higher correlation.
[0147] The specific steps for extracting feature maps are as follows:
[0148] A and the eight adjacent square area images are taken as input, and each square area feature map is output through nine 3-1 structures. Each 3-1 structure includes 3×3 convolution and 1×1 convolution. Figure 5As shown in the figure; 3×3 convolution extracts the input as the first layer feature map, and its main purpose is to extract the key point information in the map to provide basic information for the subsequent comparison of different regions; 1 refers to 1×1 convolution, which converts the first layer feature map into the feature map to be output, and its main purpose is to integrate the key point information of different regions and fuse them to prevent the two images with similar contours but different details from being matched.
[0149] The specific steps of selecting the area group with higher correlation include:
[0150] The similarity information β(A,B1) between A and B1 is obtained by the following formula:
[0151]
[0152] Among them, A i,j is the pixel value of the i-th row and j-th column in the feature map of the A square area, B1 i,j is the pixel value of the i-th row and j-th column of the B1 square area feature map; A i,j and B1 i,j The value range is [0,255];
[0153] Similarly, find β(A,B2), β(A,B3), β(A,B4);
[0154] Let β(A,B)=[β(A,B1)+β(A,B2)+β(A,B3)+β(A,B4)] / 4. Similarly, find β(A,C) and β(A,D);
[0155] Compare β(A,B), β(A,C), and β(A,D), and take the grid area corresponding to the smallest β value among the three as the adjacent grid area group with the highest correlation.
[0156] If the position of the target detected in the next frame does not appear in the A grid area but appears in the adjacent area group with the highest correlation, it is considered to be correctly identified and the target is retained; otherwise, the target position is corrected.
[0157] The specific steps of correction include:
[0158] The Euclidean distance between the center point position of the target in the current frame and the next frame is multiplied by min(β(A, B), β(A, C), β(A, D)) to obtain a corrected distance value. Based on the corrected distance value, the center point position of the target in the next frame is corrected and still located on the line connecting the center points of the target in the current frame and the next frame. If the center point of the target in the next frame returns to area A after correction, the target is retained; otherwise, based on the confidence level judgment output by the target recognition algorithm for the target detected in the next frame, the target is retained or discarded. If the output confidence level is very high, the target is retained; otherwise, it is discarded. It should be noted that all the detected targets are subjected to the above judgment, and the positions of the misjudged targets are corrected.
[0159] Step 4: Based on the information of the previous and next n frames of the same target output by the target recognition algorithm, through the front and back frame correlation algorithm, judge the category accuracy of the target, and delete the targets with inaccurate category judgments, where n is a positive integer.
[0160] Store the information of the previous and next n frames of the same target output by the original algorithm. Through the front and back frame correlation algorithm composed of front frame confidence weighted filtering and multi-frame voting, the reliability of the target category information output by the original target recognition algorithm is improved.
[0161] Update the confidence level of the current frame.
[0162] P = p i + a i × p i-1 + a i × p i-2 +…+ a i × p1
[0163] where p i is the confidence level of the current frame, p i-1 is the confidence level of the previous frame, p1 is the confidence level of the first frame, and a i is the attenuation coefficient of the current frame, and the range is [0, 1]; the value that can make the detection result the most stable can be taken as a by taking 0.1 as the step through experiments i ; if P obtained is greater than the confidence level threshold p th , it is considered that the category recognition of the target is accurate and the result is output; if P obtained is lower than the confidence level threshold p th , the multi-frame voting strategy is executed.
[0164] Take the detection results of the nearest p frames. If the P of q frames among them is greater than the threshold p th , where q < p, it is determined that this detection result is accurate, even if the P of this frame is lower than the confidence level threshold p th, but the previous frames have always identified it as a target, and this frame also identifies it as a target; if less than q frames meet the requirements, then the detection result is considered inaccurate and the target is deleted.
[0165] Step 5: Fuse the corrected target position and the accurately determined target category with the image in the original video stream and output the recognition result.
[0166] The method for improving the performance of a distribution network video stream target recognition algorithm provided in this embodiment solves the problem of poor detection capability and poor robustness of weak and small targets in the prior art. The present invention provides a low computing power occupancy algorithm that does not require too much processing time; it is also a plug-and-play algorithm module with strong adaptability. As long as the original video stream image and the position coordinates and category information output by the original recognition algorithm can be obtained, the position accuracy of the original target recognition algorithm can be improved and the false alarm rate can be reduced. Combined with the confidence level, the target category recognition accuracy of the original target recognition algorithm can be improved, while the target recognition flicker rate of the original target recognition algorithm can be reduced.
[0167] To implement all or part of the process of the above-mentioned embodiment method, a computer program can be used to instruct related hardware to complete the process, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0168] Embodiment 3:
[0169] On the other hand, the present invention also provides a system for improving the accuracy of identifying safety risk targets in distribution network operations, comprising:
[0170] The original recognition module is used to obtain the location, category and confidence of the target based on the original video stream image and the safety risk target recognition algorithm of the distribution network engineering operation;
[0171] A grid segmentation module is used to adaptively segment the original video stream image into a plurality of grids based on the position of the target, so that the center point of the target is distributed in different grids;
[0172] A location determination module is used to determine the target and its precise location based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, combined with the category and confidence;
[0173] The fusion module is used to fuse information based on the precise location of the target and the picture in the original video stream to obtain a recognition result.
[0174] Optionally, the grid segmentation module is specifically used to:
[0175] Based on the detailed size of the original video stream image in the width and height directions and the maximum value of the pixels in the width and height directions of the target output by the target recognition algorithm, determine the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction;
[0176] The original video stream image is grid-divided based on the number of squares in the width direction and the length direction of the original video stream image adaptively segmented to obtain M×N squares.
[0177] Optionally, the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction are calculated as follows:
[0178]
[0179] Where W and H are the pixel sizes in width and height directions of the output image respectively; w max 、h max The maximum values of the pixels in the width and height directions of all the targets output by the target recognition algorithm respectively; and are the adaptive coefficients in width and height directions respectively; k M and k N are the loop control constants in the width and height directions, and M and N are the number of squares in the width and length directions of the adaptive segmentation of the original video stream image.
[0180] Optionally, the location determination module includes:
[0181] A determination submodule is used to match the feature information of the area A where the center point of the target is located with the adjacent square area using a local attention matching algorithm to obtain similarity information, and then determine a group of adjacent square areas with a high degree of correlation;
[0182] The expansion submodule is used to expand each square so that there is a partial overlap between every two adjacent square areas;
[0183] The correction submodule is used to correct the target position based on the Euclidean distance between the center point of the target in the current frame and the next frame combined with the similarity information if the target position detected in the next frame does not appear in the A grid area but appears in the adjacent area group with a higher correlation.
[0184] Optionally, the determining submodule is specifically used for:
[0185] The convolutional network is used to extract the feature map of the square area A where the center point of the target is located and each square area in each adjacent square area group;
[0186] Matching the feature map of the grid area A defined by the center point with the feature maps of each adjacent grid area group, and calculating the similarity information between the grid area A defined by the center point and each adjacent grid area;
[0187] The similarity information of the two upper and lower adjacent squares of A, the two left and right adjacent squares, and the four corner adjacent squares are averaged respectively;
[0188] The square area corresponding to the value with the smallest average value is regarded as the adjacent square area group with a higher correlation with A;
[0189] The adjacent square area groups include: two square areas adjacent to A above and below, a square area group adjacent to A left and right, and a square area group located at the four corners of A.
[0190] Optionally, the correction submodule corrects the target position based on the Euclidean distance of the center point position of the target in the current frame and the next frame in combination with similarity information, and the implementation steps include:
[0191] Calculate the Euclidean distance between the center point of the target in the current frame and the next frame;
[0192] The Euclidean distance is multiplied by the average value of similarity information of adjacent square area groups with a high correlation degree to obtain a corrected distance value;
[0193] The center point position of the target in the next frame is corrected based on the correction distance value and is still located on the line connecting the center points of the target in the current frame and the next frame; if the center point of the target in the next frame returns to area A after correction, the corrected target in the next frame is retained, otherwise the confidence level of the target output detected by the target recognition algorithm in the next frame is combined to determine whether to retain or discard the target.
[0194] Optionally, the fusion module is specifically used for:
[0195] The precise position of the target is marked in the original video stream image to obtain a recognition result.
[0196] Embodiment 4:
[0197] Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of a method for improving the accuracy of identifying safety risk targets in distribution network operations in the above embodiment.
[0198] Embodiment 5:
[0199] Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It can be understood that the computer-readable storage medium here can include both built-in storage media in a computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of a method for improving the accuracy of identifying safety risk targets in distribution network operations in the above embodiment.
[0200] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0201] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0202] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0203] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0204] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A method for improving the accuracy of identifying safety risk targets in distribution network operations, characterized in that: include: Based on the original video stream image and the safety risk target recognition algorithm of the distribution network engineering operation, the location, category and confidence of the target are obtained; Based on the position of the target, the original video stream image is adaptively divided into a plurality of squares, so that the center point of the target is distributed in different squares; Based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, the target and its precise location are determined by combining the category and confidence. The precise position of the target is fused with the original video stream image to obtain a recognition result.
2. The method according to claim 1, characterized in that The method of adaptively dividing the original video stream image into a plurality of squares based on the position of the target so that the center point of the target is distributed in different squares includes: Based on the detailed size of the original video stream image in the width and height directions and the maximum value of the pixels in the width and height directions of the target output by the target recognition algorithm, determine the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction; The original video stream image is grid-divided based on the number of squares in the width direction and the length direction of the original video stream image adaptively segmented to obtain M×N squares, where M and N are the number of squares in the width direction and the length direction of the original video stream image adaptively segmented.
3. The method according to claim 2, characterized in that The number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction are calculated as follows: Wherein, W and H are the pixel sizes in width and height directions of the output image respectively; max 、h max The maximum values of the pixels in the width and height directions of all the targets output by the target recognition algorithm respectively; and are the adaptive coefficients in width and height directions respectively; k i is the loop control constant, i takes M or N to represent the width and height direction respectively, that is, k M and k N Constants for loop control in width and height directions.
4. The method according to claim 1, characterized in that The target is determined based on the correlation between the grid area located by the center point of the target and the adjacent grid area group, combined with the category and confidence, and the precise location of the target, including: Based on the previous and next multi-frame information of the same target and the previous and next frame association algorithm, the accuracy of the category of the target is judged, and the target with inaccurate category is deleted; The local attention matching algorithm is used to match the feature information of the area A where the center point of the target with accurate category is located with the adjacent square area to obtain similarity information, and then determine the adjacent square area group with higher correlation; Expand each square so that there is some overlap between every two adjacent squares; If the position of the target detected in the next frame does not appear in the A grid area but appears in a group of adjacent areas with a higher correlation, it is considered to be correctly identified and the position of the target is accurate; otherwise, the target position is corrected based on the Euclidean distance between the center point of the target in the current frame and the next frame combined with the similarity information and confidence.
5. The method according to claim 4, characterized in that The local attention matching algorithm is used to match the feature information of the area A where the center point of the target with accurate category is located with the adjacent grid area to obtain similarity information, and then determine the adjacent grid area group with high correlation, including: The convolutional network is used to extract the feature map of the square area A where the center point of the target is located and each square area in each adjacent square area group; Matching the feature map of the grid area A defined by the center point with the feature maps of each adjacent grid area group, and calculating the similarity information between the grid area A defined by the center point and each adjacent grid area; The similarity information of the two upper and lower adjacent squares of A, the two left and right adjacent squares, and the four corner adjacent squares are averaged respectively; The square area corresponding to the value with the smallest average value is regarded as the adjacent square area group with a higher correlation with A; The adjacent square area groups include: two square areas adjacent to A above and below, a square area group adjacent to A left and right, and a square area group located at the four corners of A.
6. The method according to claim 4, characterized in that The target position is corrected based on the Euclidean distance between the center point position of the target in the current frame and the next frame combined with similarity information and confidence, including: Calculate the Euclidean distance between the center point of the target in the current frame and the next frame; The Euclidean distance is multiplied by the average value of similarity information of adjacent square area groups with a high correlation degree to obtain a corrected distance value; The center point position of the target in the next frame is corrected based on the correction distance value and is still located on the line connecting the center points of the target in the current frame and the next frame; if the center point of the target in the next frame returns to area A after correction, the corrected target in the next frame is retained, otherwise the confidence level of the target output detected by the target recognition algorithm in the next frame is combined to determine whether to retain or discard the target.
7. The method according to claim 6, characterized in that The step of determining whether to retain or discard the target based on the confidence level of the target output detected in the next frame in combination with the target recognition algorithm comprises: If the output confidence level is greater than a set threshold, the target is retained, otherwise it is discarded.
8. The method according to claim 1, characterized in that The information fusion based on the precise position of the target and the original video stream image to obtain the recognition result includes: The precise position of the target is marked in the original video stream image to obtain a recognition result.
9. A system for improving the accuracy of identifying safety risk targets in distribution network operations, characterized in that: include: The original recognition module is used to obtain the location, category and confidence of the target based on the original video stream image and the safety risk target recognition algorithm of the distribution network engineering operation; A grid segmentation module is used to adaptively segment the original video stream image into a plurality of grids based on the position of the target, so that the center point of the target is distributed in different grids; A location determination module is used to determine the target and its precise location based on the correlation between the grid area where the center point of the target is located and the adjacent grid area group, combined with the category and confidence; The fusion module is used to fuse information based on the precise position of the target with the original video stream image to obtain a recognition result.
10. The system according to claim 9, characterized in that The grid segmentation module is specifically used for: Based on the detailed size of the original video stream image in the width and height directions and the maximum value of the pixels in the width and height directions of the target output by the target recognition algorithm, determine the number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction; The original video stream image is grid-divided based on the number of squares in the width direction and the length direction of the original video stream image adaptively segmented to obtain M×N squares, where M and N are the number of squares in the width direction and the length direction of the original video stream image adaptively segmented.
11. The system according to claim 10, characterized in that The number of divisions M of the original video stream image in the width direction and the number of divisions N in the height direction are calculated as follows: Where W and H are the pixel sizes in width and height directions of the output image respectively; w max 、h max The maximum values of the pixels in the width and height directions of all the targets output by the target recognition algorithm respectively; and are the adaptive coefficients in width and height directions respectively; k M and k N Constants for loop control in width and height directions.
12. The system according to claim 9, characterized in that The position determination module comprises: A determination submodule is used to match the feature information of the area A where the center point of the target is located with the adjacent square area using a local attention matching algorithm to obtain similarity information, and then determine a group of adjacent square areas with a high degree of correlation; The expansion submodule is used to expand each square so that there is a partial overlap between every two adjacent square areas; The correction submodule is used to correct the target position based on the Euclidean distance between the center point of the target in the current frame and the next frame combined with the similarity information and confidence level if the target position detected in the next frame does not appear in the A grid area but appears in a group of adjacent areas with a higher correlation.
13. The system of claim 12, wherein: The determination submodule is specifically used for: The convolutional network is used to extract the feature map of the square area A where the center point of the target is located and each square area in each adjacent square area group; Matching the feature map of the grid area A defined by the center point with the feature maps of each adjacent grid area group, and calculating the similarity information between the grid area A defined by the center point and each adjacent grid area; The similarity information of the two upper and lower adjacent squares of A, the two left and right adjacent squares, and the four corner adjacent squares are averaged respectively; The square area corresponding to the value with the smallest average value is regarded as the adjacent square area group with a higher correlation with A; The adjacent square area groups include: two square areas adjacent to A above and below, a square area group adjacent to A left and right, and a square area group located at the four corners of A.
14. The system of claim 12, wherein: The correction submodule corrects the target position based on the Euclidean distance of the center point position of the target in the current frame and the next frame combined with similarity information, and the implementation steps include: Calculate the Euclidean distance between the center point of the target in the current frame and the next frame; The Euclidean distance is multiplied by the average value of similarity information of adjacent square area groups with a high correlation degree to obtain a corrected distance value; The center point position of the target in the next frame is corrected based on the correction distance value and is still located on the line connecting the center points of the target in the current frame and the next frame; if the center point of the target in the next frame returns to area A after correction, the corrected target in the next frame is retained, otherwise the confidence level of the target output detected by the target recognition algorithm in the next frame is combined to determine whether to retain or discard the target.
15. The system of claim 9, wherein: The fusion module is specifically used for: The precise position of the target is marked in the original video stream image to obtain a recognition result.
16. A computer device, characterized in that: include: at least one processor and memory; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, a method for improving the accuracy of identifying safety risk targets in distribution network operations as described in any one of claims 1 to 8 is implemented.
17. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, a method for improving the accuracy of identifying safety risk targets in distribution network operations as described in any one of claims 1 to 8 is implemented.
