CN115690404B - Electric wire hidden danger detection method based on target detection - Google Patents

Electric wire hidden danger detection method based on target detection Download PDF

Info

Publication number
CN115690404B
CN115690404B CN202211705189.5A CN202211705189A CN115690404B CN 115690404 B CN115690404 B CN 115690404B CN 202211705189 A CN202211705189 A CN 202211705189A CN 115690404 B CN115690404 B CN 115690404B
Authority
CN
China
Prior art keywords
electric wire
scene content
picture
scene
wire
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211705189.5A
Other languages
Chinese (zh)
Other versions
CN115690404A (en
Inventor
李杰明
沈泳龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tisson Regaltec Communications Tech Co Ltd
Original Assignee
Tisson Regaltec Communications Tech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tisson Regaltec Communications Tech Co Ltd filed Critical Tisson Regaltec Communications Tech Co Ltd
Priority to CN202211705189.5A priority Critical patent/CN115690404B/en
Publication of CN115690404A publication Critical patent/CN115690404A/en
Application granted granted Critical
Publication of CN115690404B publication Critical patent/CN115690404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to a method for detecting hidden danger of an electric wire based on target detection, which belongs to the technical field of hidden danger detection of electric wires and comprises the following steps: s1, acquiring a shot picture, and determining key scene content in the shot picture according to the shot picture distance and the picture contained content; s2, determining an electric wire detection starting position according to the key scene content, reducing the electric wire detection range, and extending the electric wire to obtain the trend condition of the whole electric wire; s3, obtaining the extended picture, carrying out area segmentation on the electric wire in the picture according to the electric wire extension result, and formulating different straightening judgment methods; and S4, performing unqualified wire early warning when the wire is judged to be non-collimated based on the straightening judgment result. According to the method, after the picture is distinguished based on the details of key scene content, extension scene content and the like, specific wire segmentation and wire straightening judgment are carried out according to the distinguished contents, and the accuracy of straightening judgment is greatly improved.

Description

Electric wire hidden danger detection method based on target detection
Technical Field
The invention belongs to the technical field of electric wire hidden danger detection, and particularly relates to an electric wire hidden danger detection method based on target detection.
Background
With the continuous expansion of the demand of each business on electric power, the loss caused by power failure in accidents is more and more large. The power transmission line is directly built on the ground and is in direct contact with the surrounding environment, so that the power transmission line is more easily influenced and accidents frequently occur. Therefore, the arrangement of the electric wires needs to be standardized to reduce the occurrence of accidents. For example, the power line cable should be laid entirely without a joint in the middle, and the laying should be straight and bound firmly, and the laying route meets the design requirements.
Whether the arrangement of the electric wires is standard or not needs to be verified, and the conventional line inspection mode is manual line inspection. A large amount of human resources are consumed for manual line patrol, and the efficiency is low; if carry out the detection of circuit defense hidden danger through image identification, can improve work efficiency, but because the electric wire self condition is complicated various, reasons such as surrounding environment interference item are many, often appear misjudgement. Therefore, an efficient and accurate method for detecting hidden electric wire troubles is needed.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a method for detecting hidden electric wire troubles based on target detection, which is characterized in that after a picture is distinguished based on details of key scene content, extension scene content and the like, specific electric wire segmentation and electric wire straightening judgment are carried out aiming at the distinguished contents, so that the accuracy of straightening judgment is greatly improved; after all the wires are extended, the existing scattered wires are subjected to targeted detection again, and the wire extension comprehensiveness and the accuracy of the whole picture are improved.
The purpose of the invention can be realized by the following technical scheme:
a method for detecting hidden electric wire danger based on target detection comprises the following steps:
s1, acquiring a shot picture, and determining key scene content in the shot picture based on a target detection algorithm and a key scene content target detection model according to the shot picture distance and the picture contained content in the shot picture;
s2, determining an electric wire detection starting position according to the key scene content in the step S1, reducing the electric wire detection range according to the electric wire detection starting position, and extending the electric wire to obtain the trend condition of the whole electric wire;
s3, obtaining the extended picture, performing region segmentation on the electric wire in the picture according to the electric wire extension result in the whole picture, making different straightening judgment methods for each type of paragraph according to different paragraph conditions, wherein the requirements for straightening are different;
and S4, performing unqualified wire early warning when the wire is judged to be non-collimated based on the straight judgment result.
Further, the target detection algorithm adopts a Faster R-CNN algorithm, and specifically comprises the following steps:
s11, extracting the characteristics of the picture to be detected by the VGG network;
s12, outputting a candidate frame matrix and scores thereof after the feature map enters the RPN;
s13, the ROI Pooling layer processes the output of the RPN and the characteristic graph, and the characteristic graph with the same size is generated after fusion;
and S14, the full connection layer performs category classification and position regression on the feature map obtained in the step S13 to obtain position information and a score of the detection frame.
Further, the highlight scene content includes: the system comprises case scene content, support scene content, wall attachment scene content, ground scene content, climbing wall scene content and close-range shooting case scene content.
Further, step S2 specifically includes the following steps:
s21, combining a preset rule, counting the frequency of the simultaneous existence of the key scene content and the electric wire, and sequencing according to the frequency from high to low to obtain a key scene content electric wire sequencing table;
s22, based on the key scene content electric wire sorting table and the key scene content in the shot picture determined in the step S1, descending the first key scene content with the frequency existing at the same time with the electric wire to be used as the electric wire detection starting position;
s23, performing semantic segmentation on the electric wire according to the electric wire detection starting position to obtain electric wire pixels, determining the electric wire extending direction according to the electric wire pixels, obtaining the nearest next key scene content in the extending direction based on the electric wire extending direction, performing semantic segmentation again until the electric wire extends out of a picture, and finishing extension to obtain the trend of the whole electric wire;
s24, obtaining all wire extension results, obtaining a shot picture image, judging whether wires which are scattered and do not extend to exist in the image or not based on a target detection algorithm, if so, continuing to execute the step S23 to extend the wires again, after multiple cycles, judging whether the wires which are scattered and do not extend to exist or not, and if not, performing wire alignment identification on the wires according to the method in the step S3.
Further, step S22 further includes: and if the same more than two first key scene contents exist in the picture, taking the area with the target detection result which occupies the largest area compared with the whole picture as the electric wire detection starting position.
Further, step S22 further includes: and judging whether the electric wire content exists in the electric wire detection starting position, if not, judging that the electric wire detection starting position is invalid, traversing to determine the next electric wire detection starting position based on the key scene content electric wire sequencing table and the key scene content existing in the shot picture determined in the step S1, then judging whether the electric wire exists, and if not, judging that the electric wire does not exist in the picture.
Further, the specific steps of determining whether the wire content exists in the wire detection start position are: segmenting the electric wire detection starting position through a semantic segmentation algorithm, and determining whether the electric wire detection starting position comprises an electric wire or not;
the semantic segmentation algorithm specifically comprises the following steps: and marking a preset electric wire semantic segmentation picture by self, marking electric wire pixels in the picture, and training an electric wire semantic segmentation model.
Further, step S23 further includes: extending a preset first distance based on the extension direction of the electric wire, judging whether the next key scene content exists in the preset first distance, if so, determining the extension direction of the electric wire according to the pixels of the electric wire, performing semantic segmentation and electric wire extension on the next key scene content, and repeating the steps until the next key scene content extends to the whole picture;
defining extension contents within the preset first distance between the two key scene contents as first-class extension scene contents;
and defining the second type of extension scene content when the next key scene content does not exist in the preset first distance or the distance between the next key scene content and the preset first distance is far higher than the preset first distance.
Further, step S3 specifically includes:
based on the wire extending result and the whole wire direction in the step S2, acquiring different key scene contents and extending scene contents existing in the wire extending process, and performing image area cutting according to the scene contents so as to divide the whole picture into areas with different sizes, thereby realizing the segmentation of the wires, wherein the wire in each area is a segment; and aiming at the scene content type of each different area, making different straight judgment methods.
Further, the different straightening determination methods specifically include:
(1) When the electric wire in the scene is mainly straight, and the scene content comprises support scene content, climbing wall scene content, ground scene content and first-class extension scene content, the judging method comprises the following steps:
obtaining electric wires in a scene through semantic segmentation, judging whether the electric wires in the scene are straight lines or not, if not, judging whether the angle of the line bending exceeds a threshold value or not, judging whether the electric wires in the scene have a ribbon or not through a target detection algorithm, if so, judging that the electric wires are straight, and if the angle exceeds the threshold value, judging that the electric wires have the ribbon or not; judging the other conditions to be out of alignment;
(2) When the wires in the scene are mainly bent or have connection points with the case, and the scene content comprises case scene content, wall attachment scene content, short-distance shooting case scene content and second-class extension scene content, the judging method comprises the following steps:
through target detection, whether the messy electric wire condition occurs in the detection area or not is judged, if yes, whether the messy electric wire is provided with a ribbon or not is judged, if not, the messy electric wire is judged to be not straight, and if the messy electric wire is not provided with the ribbon, the messy electric wire is judged to be straight;
(3) When the electric wires in the scene mainly comprise scattered electric wires, the judging method comprises the following steps:
firstly, obtaining the electric wire in the scene through segmentation, then judging whether the electric wire is straight or bent, and then judging according to the judgment result by the judgment method (1) or (2).
The invention has the beneficial effects that:
according to the method, after the picture is distinguished based on the details of key scene content, extension scene content and the like, specific wire segmentation and wire straightening judgment are carried out according to the distinguished contents, so that the accuracy of straightening judgment is greatly improved; after all the wires are extended, the existing scattered wires are subjected to targeted detection again, and the wire extension comprehensiveness and the accuracy of the whole picture are improved.
Drawings
In order to facilitate understanding for those skilled in the art, the present invention will be further described with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of the steps of the detection method of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the embodiments, structures, characteristics and effects according to the present invention will be made with reference to the accompanying drawings and preferred embodiments.
Referring to fig. 1, a method for detecting hidden troubles of an electric wire based on target detection includes the following steps:
s1, acquiring a shot picture, determining key scene content in the shot picture based on a target detection algorithm and a key scene content target detection model according to the shot picture distance and the picture containing content in the shot picture, and specifically comprising the following steps:
detecting key scene content contained in the shot image through a target detection algorithm;
further, the target detection algorithm adopts a Faster R-CNN algorithm;
the Faster R-CNN adopts a classical two-stage detection algorithm, and specifically comprises the following steps:
s11, extracting the characteristics of the picture to be detected by the VGG network;
s12, outputting a candidate frame matrix and a score thereof after the feature map enters the RPN;
s13, the ROI Pooling layer processes the output of the RPN and the characteristic graph, and the characteristic graph with the same size is generated after fusion;
and S14, carrying out category classification and position regression on the feature map obtained in the S13 by the full connection layer to obtain position information and a score of the detection frame.
The key scene content target detection model is obtained by manually carrying out target detection labeling on the shot pictures including key scene content, labeling a preset picture, and then carrying out target detection model training by combining the Faster R-CNN.
Further, the highlight scene content includes: the method comprises the following steps of case scene content, support scene content, wall attachment scene content, ground scene content, climbing wall scene content and short-distance shooting case scene content.
S2, determining an electric wire detection starting position according to the key scene content in the step S1, reducing the electric wire detection range according to the electric wire detection starting position, extending the electric wire, and obtaining the trend condition of the whole electric wire, wherein the method specifically comprises the following steps:
and S21, combining a preset rule, counting the frequency of the simultaneous existence of the contents of the key scenes and the electric wires, and sequencing the contents of the key scenes from high to low according to the frequency to obtain an electric wire sequencing list of the contents of the key scenes. For example: acquiring 100 pictures with the content of the chassis scene, and determining whether the content of the chassis scene contains the electric wire, wherein the percentage of the electric wire contained in the content of the chassis scene is 99 percent, namely the frequency of the simultaneous existence of the content of the chassis scene and the electric wire is 99 percent.
Further, the electric wire ranking table for the content of the key scene further includes: counting the shapes of the wires existing in the highlight scene content, for example, the percentage of the wires appearing in a bent shape in the case scene content; the proportion percentage of the bracket scene content, the wall body attachment scene content and the appearance of the linear electric wire is shown;
and S22, based on the key scene content electric wire sorting table and the key scene content existing in the shot picture determined in the step S1, descending the first key scene content with the frequency existing simultaneously with the electric wire to be used as the electric wire detection starting position.
Further, if the same two or more first key scene contents exist in the picture, the position with the target detection result area occupying the largest area compared with the whole picture is taken as the electric wire detection starting position.
Step S22 further includes: and judging whether the electric wire content exists in the electric wire detection starting position, if not, judging that the electric wire detection starting position is invalid, traversing to determine the next electric wire detection starting position based on the key scene content electric wire sequencing table and the key scene content existing in the shot picture determined in the step S1, then judging whether the electric wire exists, and if not, judging that the electric wire does not exist in the picture.
Further, the specific steps of determining whether the wire content exists in the wire detection start position are: and segmenting the electric wire detection starting position through a semantic segmentation algorithm, and determining whether the electric wire detection starting position comprises the electric wire or not.
Semantic segmentation is a typical computer vision problem that involves taking some raw data, e.g., planar images, as input and converting them into masks with highlighted regions of interest.
The semantic segmentation problem may also be considered a classification problem, where each pixel is classified as one from a series of object classes.
In the embodiment, a semantic segmentation method based on an mmseg frame is used to label a preset semantic segmentation picture of the electric wire by itself, and electric wire pixels in the picture are labeled to train an electric wire semantic segmentation model;
in order to make model training more accurate, in this embodiment, the labeling is to extract a picture of the content of the key scene after the content of the key scene is divided based on the step S1, and then label the picture;
the invention mainly uses FCN algorithm as the realization algorithm of semantic segmentation, and the FCN algorithm has the following advantages:
(1) The first one realizes end-to-end, pixel-to-pixel semantic segmentation network;
(2) The last full connection layer of the current classification network is changed into a full convolution network and fine adjustment is carried out, and dense prediction is achieved;
(3) Designing a jump connection to connect the global information and the local information to compensate each other;
(4) In FCN, up-sampling is performed by deconvolution.
S23, according to the electric wire detection starting position, performing electric wire semantic segmentation on the picture of the electric wire detection starting position, obtaining electric wire pixels in the picture, determining the electric wire extending direction according to the electric wire pixels, obtaining the nearest next key scene content in the extending direction based on the electric wire extending direction, performing semantic segmentation again until the electric wire extends out of a picture, finishing extension, and obtaining the trend of the whole electric wire, wherein the method specifically comprises the following steps:
the determining the extending direction of the electric wire according to the electric wire pixels specifically comprises: taking 2 roi areas at the initial position of the wire detection, taking the wire segments existing between the inner periphery and the outer periphery of the wire detection, taking the wire segments at the initial position of the wire detection, taking the wire segments at the outer periphery and extending the wire outwards according to the slope;
the calculation of the slope comprises the steps of taking a point on the periphery as p1 (x 1, y 1) and a point p2 (x 2, y 2) on the inner periphery, and calculating the slope through the p1 and the p2 to obtain the extending direction of the wire.
Based on the wire extending direction, obtaining the nearest next key scene content in the extending direction, and performing semantic segmentation again until the wire extends out of the picture, ending the extension to obtain the trend of the whole wire, specifically comprising: and judging whether the next key scene content exists in the preset first distance for the extending direction of the electric wire, if so, determining the extending direction of the electric wire according to the electric wire pixel, performing semantic segmentation and electric wire extension on the next key scene content, and so on until the electric wire extends to the whole picture.
The next highlight scene content further comprises: the key scene content is obtained through a frame by a target detection algorithm, so that the key scene content may be too much in coverage and too large in coverage, and thus, after the key scene content is subjected to semantic segmentation, too many pixels of a non-electric wire are obtained. Therefore, the color of the wire is obtained through the extended wire, and when the key scene content is subjected to semantic segmentation, only the wire which is consistent with the color of the extended wire and is within a preset distance from the entry point of the extended wire is obtained, so that the size of the key scene content is compressed, and part of irrelevant noise is removed.
Taking the extension content within the preset first distance between the two key scene contents as a first type of extension scene content; the method is used for judging whether the electric wires of the first type of extension scene content are straight or not and only judging whether the electric wires are straight or not and whether a ribbon is provided or not.
The extended scene content is a case where the electric wire extends in the non-key scene content, and if the extended scene content is short and small, the electric wire in the extended scene content should be mainly straight.
Further, when the electric wire extends in the extending direction by a preset first distance, whether the next key scene content exists in the preset first distance is judged, if the next key scene content does not exist, or the distance between the electric wire and the next key scene content is far higher than the preset first distance, the extended extending scene content is proved to be larger, wherein more accidents such as electric wire crossing or disorder and the like can occur, the electric wire is not restricted by the key scene content, and the semantic segmentation of the electric wire is difficult to perform due to a plurality of interference items in the environment; this type of situation is defined as a second type of extended scene content.
Based on the sub-situation that the second type of extension scene content is difficult to perform wire extension, detail processing is performed, which specifically includes:
obtaining electric wire pixels contained in the second type of extension scene content through a semantic segmentation algorithm, and judging and processing electric wire cross branches in the electric wire pixel extension process contained in the second type of extension scene content;
judging the crossing times of the wires, if the crossing times are excessive, judging that the wires are in disorder, and predicting by using a wire disorder target detection model;
if the number of times of crossing of the electric wires is less, the electric wire bifurcation is judged to occur, electric wire extension is respectively carried out in the bifurcation direction, and the key scene content in the bifurcation direction is searched.
The number of times of crossing of the electric wires is specifically as follows: electric wire pixels contained in the second type of extension scene content are obtained through a semantic segmentation algorithm, electric wires contained in the electric wire pixels contained in the second type of extension scene content can be obtained based on an opencv line detection method, so that the crossing condition of the electric wires is judged, and the crossing number is obtained finally.
Carry out the electric wire extension respectively to the direction of bifurcation, look for the key scene content of bifurcation direction, include: and determining the extension direction of the electric wire according to the electric wire pixels in the step S23, calculating the slope of the forked electric wire segment contained in the second type of extension scene content, outwardly extending the electric wire according to the slope of the forked electric wire segment, and searching the key scene content in the forked direction.
S24, obtaining all wire extension results, obtaining a shot picture image, judging whether wires which are scattered and do not extend to exist in the image based on a target detection algorithm, if so, judging whether wires which are scattered and do not extend to exist according to a second type of extension scene content extension strategy under the condition that other objects shield the wires in the method in the step S23, extending the wires again, judging whether wires which are scattered and do not extend to exist after multiple cycles, and if not, identifying the wires straightly according to the method in the step S3, wherein the method specifically comprises the following steps:
the acquiring all the wire extension results, acquiring the shot picture image, judging whether the wires which are scattered and do not extend to exist in the image or not based on the target detection algorithm specifically comprises the following steps:
all the obtained wire extension results, key scene contents and extension scene contents are deducted in the image through an opencv tool, the contents which are not extended by the wire are remained, and target detection of scattered wires is carried out on the remained image through a target detection algorithm and a scattered wire target detection model;
the target detection algorithm adopts a Faster R-CNN algorithm;
the scattered wire target detection model is obtained by manually carrying out target detection labeling on scattered wires in a shot picture, marking a preset picture, and then carrying out scattered wire target detection model training by combining with the Faster R-CNN;
the scattered electric wires only comprise electric wire coils or coils with larger target objects, and the scattered electric wire target detection model only needs to identify the electric wires under the condition that the confidence coefficient of the target objects is higher, because the relative probability is lower under the condition that the electric wires exist in the scattered areas, the detection needs to be carried out more strictly.
Meanwhile, in scattered areas, similar electric wires such as weeds or water pipes exist in many cases, so that a large wire coil or coil of a target object needs to be identified to prevent false identification, and particularly, semantic segmentation is not performed in the areas to reduce false judgment.
Aiming at the method in the step S23, the second type of extension scene content extension strategy under the condition that the electric wire is shielded by other objects is implemented, the electric wire extension is implemented again, and after multiple cycles, the step of judging whether scattered electric wires which are not extended to exist specifically comprises the following steps:
and judging whether the situation that other objects shield the electric wire occurs in the second type of extension scene content in the picture, if so, converting the position centroid of the second type of extension scene content or expanding the picture range percentage according to the percentage of shielding the electric wire, determining the extension direction of the electric wire according to the electric wire pixel, and extending the electric wire again.
The method for judging whether the situation that other objects block the electric wire occurs in the second type of extension scene content comprises the following steps: obtaining semantic segmentation results in the second type of extension scene content, detecting whether the wires in the second type of extension scene are broken and shielded, and counting the breaking times and the breaking distance if the wires are broken and shielded so as to obtain the condition that other objects shield the wires;
the percentage of converting the position centroid of the second type of extended scene content or expanding the picture range according to the percentage of shielding the electric wire is specifically as follows: randomly changing the position mass center of the second type of extended scene content, and detecting whether the situation that other objects shield the electric wire is reduced; or the picture range percentage is enlarged according to the condition that other objects shield the electric wire, namely the number of times of breakage and the distance of breakage.
S3, obtaining the extended picture, performing area segmentation on the electric wire in the picture according to the electric wire extension result in the whole picture, wherein the requirements of each type of paragraph on straightening are different, and different straightening judgment methods are formulated according to different paragraph conditions:
based on the wire extending result and the direction of the whole wire in the step S2, acquiring different key scene contents and extending scene contents existing in the wire extending process, and performing image area cutting according to the scene contents so as to divide the whole picture into areas with different sizes, thereby realizing the segmentation of the wire, wherein the wire in each area is a section; and (4) setting different straightening judgment methods according to the scene content types of the different areas.
Further, the different straightening determination methods specifically include:
(1) When the electric wire in the scene is mainly straight, and the scene content comprises support scene content, climbing wall scene content, ground scene content and first-type extension scene content, the judging method comprises the following steps:
obtaining electric wires in a scene through semantic segmentation, judging whether the electric wires in the scene are straight lines or not, if not, judging whether the angle of the bent line exceeds a threshold value or not, judging whether the electric wires in the scene have a ribbon or not through a target detection algorithm, if so, judging that the electric wires are straight, and if the angle exceeds the threshold value, but the electric wires have the ribbon, judging that the electric wires are straight; judging the other conditions to be out of alignment;
(2) When the wires in the scene are mainly bent or have connection points with the case, and the scene content comprises case scene content, wall attachment scene content, short-distance shooting case scene content and second-class extension scene content, the judging method comprises the following steps:
through target detection, whether the messy electric wire condition occurs in the detection area or not is judged, if yes, whether the messy electric wire is provided with a ribbon or not is judged, if not, the messy electric wire is judged to be not straight, and if the messy electric wire is not provided with the ribbon, the messy electric wire is judged to be straight;
(3) When the electric wires in the scene mainly comprise scattered electric wires, the judging method comprises the following steps:
firstly, obtaining the electric wire in the scene through segmentation, then judging whether the electric wire is straight or bent, and then judging according to the judgment result by the judgment method (1) or (2).
The concrete straight judgment method mainly counts the shapes of the wires existing in the content of the key scenes through the key scene content wire sequencing table in the step S2, and enters the method (1) if the straight line is taken as the main point, and enters the method (2) if the bent line is taken as the main point.
And S4, performing unqualified wire early warning when the wire is judged to be non-collimated based on the straight judgment result.
According to the invention, based on image segmentation, a large data volume and a large mark amount are needed to achieve a relatively accurate effect, but because the image segmentation of the electric wire is carried out on the whole picture, other messy weeds or other objects similar to the electric wire can be easily judged as the electric wire, so that the identification of the whole electric wire is inaccurate; meanwhile, subsequent straight judgment is also inaccurate; therefore, after the picture is distinguished based on the details of the key scene content, the extension scene content and the like, specific electric wire segmentation and electric wire straightening judgment are carried out according to the distinguished contents, and the accuracy of straightening judgment is greatly improved.
The method comprises the steps of sequencing important scene content through an important scene content electric wire sequencing table, conducting extension detection on the sequencing of the important scene content, obtaining too many pixels of non-electric wires after semantic segmentation is conducted on the important scene content because the important scene content possibly covers too much content and the coverage range is too large, obtaining the color of the electric wire through the extended electric wire, and obtaining the electric wire which is consistent with the color of the extended electric wire and is within a preset distance from an extended electric wire entry point when the important scene content is subjected to semantic segmentation, so that the size of the important scene content is compressed, part of irrelevant noise is removed, and the overall electric wire detection is more accurate.
The extension content between the two key scene contents is used as the extension scene content, the first extension scene content is distinguished according to the interval distance of the scenes, the second extension scene content is distinguished, and the characteristics of the second extension scene content are respectively identified in a straight line manner, so that the identification accuracy is improved; meanwhile, according to whether other objects exist in the second type of extension scene content to shield the electric wire, if the second type of extension scene content exists, the position centroid of the second type of extension scene content is converted or the picture range percentage is enlarged according to the percentage of the shielded electric wire, the electric wire extension direction is determined according to the electric wire pixels in the step S23, the electric wire extension is carried out again, and the identification accuracy is improved.
After all the wires are extended, if scattered wires exist, the extension can not be achieved really, or the extension is not complete due to the shielding condition, so that after the shielding and the bifurcation are processed, the wire extension comprehensiveness and the accuracy of the whole picture are improved; according to the wire extension result in the whole picture, the wire in the picture is segmented in regions, each type of paragraph has different requirements for straightening, different straightening judgment methods are formulated according to different paragraph conditions, and the straightening detection accuracy is improved by distinguishing according to the regions.
Although the present invention has been described with reference to the preferred embodiments, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (9)

1. A method for detecting hidden electric wire danger based on target detection is characterized in that: the method comprises the following steps:
s1, acquiring a shot picture, and determining key scene content existing in the shot picture based on a target detection algorithm and a key scene content target detection model according to the shot picture distance and the picture content in the shot picture;
s2, determining an electric wire detection starting position according to the key scene content in the step S1, reducing the electric wire detection range according to the electric wire detection starting position, extending the electric wire, and obtaining the trend condition of the whole electric wire, wherein the method specifically comprises the following steps:
s21, combining a preset rule, counting the frequency of the simultaneous existence of the key scene content and the electric wire, and sequencing according to the frequency from high to low to obtain a key scene content electric wire sequencing table;
s22, based on the key scene content electric wire sorting table and the key scene content in the shot picture determined in the step S1, descending the first key scene content with the frequency existing at the same time with the electric wire to be used as the electric wire detection starting position;
s23, performing semantic segmentation on the electric wire according to the electric wire detection starting position, obtaining electric wire pixels in the electric wire, determining the extension direction of the electric wire according to the electric wire pixels, obtaining the nearest next key scene content in the extension direction based on the extension direction of the electric wire, performing semantic segmentation again until the electric wire extends out of a picture, and finishing extension to obtain the trend of the whole electric wire;
s24, obtaining all wire extension results, obtaining a shot picture image, judging whether wires which are scattered and do not extend to exist in the image or not based on a target detection algorithm, if so, continuing to execute the step S23 to extend the wires again, after multiple cycles, judging whether the wires which are scattered and do not extend to exist or not, and if not, performing wire straightening identification on the wires according to the method in the step S3;
s3, obtaining the extended picture, performing region segmentation on the electric wire in the picture according to the electric wire extension result in the whole picture, making different straightening judgment methods for each type of paragraph according to different paragraph conditions, wherein the requirements for straightening are different;
and S4, performing unqualified wire early warning when the wire is judged to be non-collimated based on the straight judgment result.
2. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 1, wherein the method comprises the following steps: the target detection algorithm adopts a Faster R-CNN algorithm, and specifically comprises the following steps:
s11, extracting the characteristics of the picture to be detected by the VGG network;
s12, outputting a candidate frame matrix and a score thereof after the feature map enters the RPN;
s13, the ROI Pooling layer processes the output of the RPN and the characteristic graph, and the characteristic graph with the same size is generated after fusion;
and S14, carrying out category classification and position regression on the feature map obtained in the step S13 by the full connection layer to obtain position information and a score of the detection frame.
3. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 1, wherein the method comprises the following steps: the key scene content comprises: the system comprises case scene content, support scene content, wall attachment scene content, ground scene content, climbing wall scene content and close-range shooting case scene content.
4. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 1, wherein the method comprises the following steps: step S22 further includes: and if more than two identical first key scene contents exist in the picture, taking the area, occupying the largest area compared with the whole picture, of the target detection result as the electric wire detection starting position.
5. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 4, characterized in that: step S22 further includes: and judging whether the electric wire content exists in the electric wire detection starting position, if not, judging that the electric wire detection starting position is invalid, traversing to determine the next electric wire detection starting position based on the key scene content electric wire sequencing table and the key scene content existing in the shot picture determined in the step S1, then judging whether the electric wire exists, and if not, judging that the electric wire does not exist in the picture.
6. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 5, wherein the method comprises the following steps: judging whether the electric wire content exists in the electric wire detection starting position specifically comprises the following steps: segmenting the electric wire detection starting position through a semantic segmentation algorithm, and determining whether the electric wire detection starting position comprises an electric wire or not;
the semantic segmentation algorithm specifically comprises the following steps: and marking a preset electric wire semantic segmentation picture by self, marking electric wire pixels in the picture, and training an electric wire semantic segmentation model.
7. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 1, characterized in that: step S23 further includes: extending a preset first distance based on the extension direction of the electric wire, judging whether the next key scene content exists in the preset first distance, if so, determining the extension direction of the electric wire according to the pixels of the electric wire, performing semantic segmentation and electric wire extension on the next key scene content, and repeating the steps until the next key scene content extends to the whole picture;
defining extension contents within the preset first distance between the two key scene contents as first-class extension scene contents;
and defining the second type of extension scene content when the next key scene content does not exist in the preset first distance or the distance between the next key scene content and the preset first distance is far higher than the preset first distance.
8. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 1, characterized in that: the step S3 specifically comprises the following steps:
based on the wire extending result and the whole wire direction in the step S2, acquiring different key scene contents and extending scene contents existing in the wire extending process, and performing image area cutting according to the scene contents so as to divide the whole picture into areas with different sizes, thereby realizing the segmentation of the wires, wherein the wire in each area is a segment; and aiming at the scene content type of each different area, making different straight judgment methods.
9. The method for detecting the hidden electric wire danger based on the target detection as claimed in claim 7, wherein the method comprises the following steps: the different straightening judging methods specifically comprise the following steps:
(1) When the electric wire in the scene is mainly straight, and the scene content comprises support scene content, climbing wall scene content, ground scene content and first-type extension scene content, the judging method comprises the following steps:
obtaining electric wires in a scene through semantic segmentation, judging whether the electric wires in the scene are straight lines or not, if not, judging whether the angle of the line bending exceeds a threshold value or not, judging whether the electric wires in the scene have a ribbon or not through a target detection algorithm, if so, judging that the electric wires are straight, and if the angle exceeds the threshold value, judging that the electric wires have the ribbon or not; judging the other conditions to be out of alignment;
(2) When the wires in the scene are mainly bent or have connection points with the case, and the scene content comprises case scene content, wall attachment scene content, short-distance shooting case scene content and second-class extension scene content, the judging method comprises the following steps:
through target detection, whether the messy electric wire condition occurs in the detection area or not is judged, if yes, whether the messy electric wire is provided with a ribbon or not is judged, if not, the messy electric wire is judged to be not straight, and if the messy electric wire is not provided with the ribbon, the messy electric wire is judged to be straight;
(3) When the electric wires in the scene mainly comprise scattered electric wires, the judging method comprises the following steps:
firstly, obtaining the electric wire in the scene through segmentation, then judging whether the electric wire is straight or bent, and then judging according to the judgment result by the judgment method (1) or (2).
CN202211705189.5A 2022-12-29 2022-12-29 Electric wire hidden danger detection method based on target detection Active CN115690404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211705189.5A CN115690404B (en) 2022-12-29 2022-12-29 Electric wire hidden danger detection method based on target detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211705189.5A CN115690404B (en) 2022-12-29 2022-12-29 Electric wire hidden danger detection method based on target detection

Publications (2)

Publication Number Publication Date
CN115690404A CN115690404A (en) 2023-02-03
CN115690404B true CN115690404B (en) 2023-03-14

Family

ID=85056878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211705189.5A Active CN115690404B (en) 2022-12-29 2022-12-29 Electric wire hidden danger detection method based on target detection

Country Status (1)

Country Link
CN (1) CN115690404B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104463692A (en) * 2014-11-04 2015-03-25 华南理工大学 Method for ranking fault risks of high-voltage power transmission lines by taking real-time weather thunderstorm information into consideration
US10937168B2 (en) * 2015-11-02 2021-03-02 Cognex Corporation System and method for finding and classifying lines in an image with a vision system
CN107301479B (en) * 2017-04-12 2020-07-14 广东电网有限责任公司电力调度控制中心 Natural disaster risk-based multi-scene planning method for power transmission system
CN110111009B (en) * 2019-05-09 2024-01-23 广东电网有限责任公司 Intelligent power transmission line inspection method based on operation plan
CN111382501B (en) * 2020-02-21 2023-06-02 华北电力大学 Configuration method and device of intelligent ammeter and computing equipment
CN114677338A (en) * 2022-03-11 2022-06-28 河海大学 Cable surface defect real-time detection method and system based on machine vision

Also Published As

Publication number Publication date
CN115690404A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US11037305B2 (en) Method and apparatus for processing point cloud data
CN111709420B (en) Text detection method, electronic device and computer readable medium
CN113902897B (en) Training of target detection model, target detection method, device, equipment and medium
CN108021856B (en) Vehicle tail lamp identification method and device and vehicle
CN107679458B (en) Method for extracting road marking lines in road color laser point cloud based on K-Means
CN111915583A (en) Vehicle and pedestrian detection method based on vehicle-mounted thermal infrared imager in complex scene
CN110969142A (en) Abnormal driving scene extraction method based on internet vehicle natural driving data
CN111046950A (en) Image processing method and device, storage medium and electronic device
CN114708426A (en) Target detection method, model training method, device, equipment and storage medium
CN112784724A (en) Vehicle lane change detection method, device, equipment and storage medium
CN115273039B (en) Small obstacle detection method based on camera
CN105320710A (en) Illumination variation resistant vehicle retrieval method and device
CN115527133A (en) High-resolution image background optimization method based on target density information
CN115240154A (en) Method, device, equipment and medium for extracting point cloud features of parking lot
CN114926791A (en) Method and device for detecting abnormal lane change of vehicles at intersection, storage medium and electronic equipment
US9747511B2 (en) Image recognition device, image recognition method, program, and recording medium
CN115690404B (en) Electric wire hidden danger detection method based on target detection
CN113920585A (en) Behavior recognition method and device, equipment and storage medium
CN111507341B (en) Method, device and equipment for adjusting target bounding box and storage medium
CN115908999A (en) Method for detecting corrosion of top hardware fitting of power distribution tower, medium and edge terminal equipment
CN112598007B (en) Method, device and equipment for screening picture training set and readable storage medium
CN115393892A (en) Crowd scene pedestrian detection method based on improved double-candidate-frame cross replacement strategy and loss function
CN112258881B (en) Vehicle management method based on intelligent traffic
CN114882709A (en) Vehicle congestion detection method and device and computer storage medium
CN113392804A (en) Multi-angle-based traffic police target data set scene construction method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant