Isolator edge line detection method, device, equipment, medium and program product
By performing edge correlation feature processing and point set fitting on the target image, the problem of non-smooth and low accuracy of spacer edge line detection in the prior art is solved, and more efficient edge line detection is achieved.
Patent Information
- Application Number
- CN202411053972.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-02
AI Technical Summary
In the prior art, the detection of the edge line of the spacer is caused by the problem that the edge line is not smooth and the accuracy is low.
By performing edge correlation feature processing on the target image, an edge correlation feature map is generated, and the correlation degree between pixel points and spacer edge lines is characterized, and a set of generated points is used for fitting to obtain the spacer edge lines.
Improve detection accuracy and smoothness, and enhance the detection effect of the edge lines of the spacer.
Smart Images

Figure CN118570240B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment, medium and program product for detecting edge lines of insulators. Background Art
[0002] With the development of science and technology, autonomous driving technology has become more and more mature and more and more popular in vehicles. In autonomous driving technology, it is necessary to determine the edge lines of New Jersey guardrails, safety guardrails, isolation walls and other isolation objects in order to determine the drivable area and improve the driving safety of the vehicle.
[0003] In the prior art, for detecting the edge line of the partition, semantic segmentation or instance segmentation is usually used to process the collected image, that is, to segment the partition from the image and then determine the edge line.
[0004] However, determining edge lines by segmentation can easily result in uneven segmentation, which in turn leads to uneven edge lines, and the accuracy of the detected edge lines is low. Summary of the invention
[0005] The embodiments of the present application provide an insulator edge line detection method, device, equipment, medium and program product to solve the problem that the existing insulator edge line detection method determines the edge line by segmentation, which easily causes uneven segmentation, and then leads to uneven edge lines and low accuracy of the detected edge lines.
[0006] In a first aspect, an embodiment of the present application provides a method for detecting an edge line of an isolator, comprising:
[0007] Performing edge correlation feature processing on the target image to obtain an edge correlation feature map corresponding to the target image, and generating at least one point set in the target image based on the edge correlation feature map; the edge correlation feature map is used to characterize the correlation between the pixel points in the target image and the edge lines of the isolators;
[0008] Each point set is fitted respectively to obtain the edge line of the isolator corresponding to each point set.
[0009] In a possible implementation, performing edge correlation feature processing on the target image to obtain an edge correlation feature map corresponding to the target image, and generating at least one point set in the target image based on the edge correlation feature map includes:
[0010] The target image is input into an isolator edge line detection model to obtain at least one point set in the target image.
[0011] In a possible implementation, the edge association feature map includes an endpoint feature map and an edge line feature map, performing edge association feature processing on the target image to obtain an edge association feature map corresponding to the target image, and generating at least one point set in the target image based on the edge association feature map, including:
[0012] Extracting the endpoint feature map and the edge line feature map of the target image; the endpoint feature map represents the correlation between the pixel points in the target image and the edge line endpoints of the insulator edge line, and the edge line feature map represents the correlation between the pixel points in the target image and the insulator edge line;
[0013] Based on the endpoint feature map and the edge line feature map, a point set of the spacer edge line is generated.
[0014] In a possible implementation, generating a point set of an edge line of an isolator based on the endpoint feature map and the edge line feature map includes:
[0015] Determine edge line endpoints based on the endpoint feature map;
[0016] A point set of the spacer edge line is generated according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map.
[0017] In a possible implementation, when the target image is input into an isolator edge line detection model to obtain at least one point set in the target image, extracting the endpoint feature map and the edge line feature map of the target image includes:
[0018] The target image is processed as follows by the isolator edge line detection model:
[0019] Performing feature extraction and feature fusion processing on the target image to obtain the features of the isolated object;
[0020] The spacer features are subjected to convolution processing to obtain an endpoint feature map and an edge line feature map.
[0021] In a possible implementation manner, the types of the edge line endpoints include a start point and an end point, and determining the edge line endpoints based on the endpoint feature map includes:
[0022] Taking a pixel point in the endpoint feature map whose pixel value is greater than a preset first threshold as a first pixel point;
[0023] Performing clustering and merging processing on the first pixel points to obtain a second pixel point;
[0024] Taking the pixel points in the second pixel points that belong to the preset position range as the starting point;
[0025] The pixel points in the second pixel points that do not fall within the preset threshold range are taken as the end points.
[0026] In a possible implementation, the type of edge line endpoints includes a start point and an end point, and generating a point set of the edge line of the spacer according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map includes:
[0027] Determine the end point location area according to each end point in the edge line end points;
[0028] According to the first position of each starting point in the endpoint feature map, the second position of each endpoint in the edge line feature map, and the end point position area, a point set of the isolated edge line corresponding to each starting point is generated.
[0029] In a possible implementation, determining the end point location area according to each end point of the edge line end points includes:
[0030] Determine the region where each endpoint in the edge line feature map is located according to the third position of each endpoint in the edge line feature map;
[0031] The region where each end point is located in the edge line feature map is used as the end point position region.
[0032] In a possible implementation, generating a point set of isolated edge lines corresponding to each starting point according to the first position of each starting point in the endpoint feature map, the second position of each endpoint in the edge feature map, and the endpoint position area includes:
[0033] Each starting point among the edge line endpoints is used as the target starting point to extract the edge line, and the point set of the isolated edge line corresponding to each starting point is obtained;
[0034] The edge line extraction includes: performing at least one point set extraction operation on the target starting point until the point set extraction end condition is met, and determining the target point combination obtained by the last point set extraction operation as the point set of the isolation edge line corresponding to the target starting point. The i-th point set extraction operation includes:
[0035] Determine the current point position of the i-th point set extraction operation;
[0036] Input the value of the current point position in the edge feature map into the long short-term memory network model to obtain the position of the adjacent point corresponding to the current point position; the adjacent point position is the predicted position of the adjacent point of the current point corresponding to the current point position in the edge line feature map by the long short-term memory network model;
[0037] In response to the adjacent point position not satisfying the point set extraction end condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation, the adjacent point position is determined as the current point position of the i+1-th point set extraction operation, and the i+1-th point set extraction operation is performed;
[0038] Or, in response to the adjacent point position satisfying the extraction end condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation;
[0039] Wherein, when i is 1, the current point position of the i-th point set extraction operation is the second position of the target starting point in the edge line feature map, the second position is determined by the first position of the target starting point in the endpoint feature map, and the current point combination includes the corresponding pixel point of the target starting point in the target image; when i is an integer greater than 1, the current point position of the i-th point set extraction operation is the adjacent point position in the i-1-th point set extraction operation, and the current point combination is the target point combination obtained by the i-1-th point set extraction operation;
[0040] The point set extraction termination conditions include: the adjacent point position is a non-edge line point position, and / or the adjacent point position belongs to the end point position area.
[0041] In a possible implementation, the adjacent point position is a non-edge line point position including: the value of the adjacent point position is less than a preset second threshold, and the preset second threshold represents the minimum value of the pixel point corresponding to the adjacent point position in the target image belonging to the edge line of the insulator.
[0042] In a second aspect, an embodiment of the present application provides a spacer edge line detection device, comprising:
[0043] A processing module, used to perform edge correlation feature processing on a target image to obtain an edge correlation feature map corresponding to the target image, and generate at least one point set in the target image based on the edge correlation feature map; the edge correlation feature map is used to characterize the correlation between pixel points in the target image and edge lines of insulators;
[0044] The generation module is used to fit each point set respectively to obtain the edge line of the isolator corresponding to each point set.
[0045] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0046] Processor, memory, communication interface;
[0047] The memory is used to store executable instructions of the processor;
[0048] Wherein, the processor is configured to execute the isolator edge line detection method described in any one of the first aspects by executing the executable instructions.
[0049] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for detecting an edge line of an insulator as described in any one of the first aspects is implemented.
[0050] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the insulator edge line detection method described in any one of the first aspects.
[0051] The method, device, equipment, medium and program product for detecting the edge line of an insulator provided in the embodiments of the present application perform edge-correlated feature processing on a target image to obtain an edge-correlated feature map corresponding to the target image, and then generate at least one point set in the target image based on the edge-correlated feature map, and then fit each point set to obtain the edge line of the insulator corresponding to each point set. After generating a point set through an edge-correlated feature map, this solution fits and generates the edge line of the insulator, thereby effectively improving the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0053] Figure 1a It is a schematic diagram of the process of detecting the edge line of an isolator in the prior art;
[0054] Figure 1b A schematic diagram of determining the edge line of an isolator in the prior art;
[0055] Figure 2a A schematic diagram of the process of the first embodiment of the isolator edge line detection method provided in the present application;
[0056] Figure 2b A schematic diagram of the process of detecting the edge line of the isolator provided in this application;
[0057] Figure 2c A schematic diagram of a point set and an isolator edge line provided for this application;
[0058] Figure 2d A schematic diagram of the edge line of the spacer obtained by the solution provided in this application;
[0059] Figure 3a A schematic diagram of the flow of Embodiment 2 of the method for detecting edge lines of isolators provided in the present application;
[0060] Figure 3bA schematic diagram of the structure of the LSTM network model provided for this application;
[0061] Figure 3c A schematic diagram of the process of determining the point set provided for this application;
[0062] Figure 4 A schematic diagram of the process of the third embodiment of the isolator edge line detection method provided in the present application;
[0063] Figure 5 A schematic diagram of the structure of an embodiment of an isolator edge line detection device provided in the present application;
[0064] Figure 6 A schematic diagram of the structure of an electronic device provided in this application.
[0065] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0066] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0067] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0068] With the development of science and technology, autonomous driving technology has become more and more mature and more and more popular in vehicles. In autonomous driving technology, it is necessary to determine the edge lines of New Jersey guardrails, safety guardrails, isolation walls and other isolation objects in order to determine the drivable area and improve the driving safety of vehicles.
[0069] In the prior art, the detection of the edge line of the isolator is usually achieved by using semantic segmentation or instance segmentation. Figure 1a FIG. 1 is a schematic diagram of a flow chart of detecting the edge line of an isolator in the prior art. Figure 1a As shown, semantic segmentation or instance segmentation is performed on the collected initial image, that is, it is determined whether each pixel in the image belongs to an isolate, the pixels belonging to the isolate are taken out to obtain an isolate image, and then the isolate image is post-processed, that is, the upper and lower boundaries of the isolate image are used as the isolate edge lines.
[0070] For example, Figure 1b Schematic diagram of determining the edge line of the spacer in the prior art, such as Figure 1b As shown in the figure, the isolator is a guardrail, and the black line is the edge line of the guardrail. It can be seen from the figure that determining the edge line of the isolator by segmentation is prone to cause uneven segmentation, which in turn leads to uneven edge lines of the isolator and low accuracy of the detected edge lines of the isolator.
[0071] In view of the problems existing in the prior art, the inventors found in the process of studying the isolator edge line detection method that the image can be processed for edge association to obtain an endpoint feature map representing the degree of association between the pixel points in the image and the edge line endpoints of the isolator edge line, and an edge line feature map representing the degree of association between the pixel points in the image and the isolator edge line, and then after generating a point set based on the two feature maps, the isolator edge line is fitted to effectively improve the detection accuracy and detection effect. Based on the above invention concept, the isolator edge line detection scheme in this application is designed.
[0072] The executor of the isolator edge line detection method in the present application may be a vehicle-mounted terminal, which may be the vehicle itself (such as the vehicle controller or the controller of the vehicle system), or a terminal device connected to the vehicle system (such as a mobile phone or other terminal). The executor of the isolator edge line detection method in the present application may also be a server (such as an independent physical server or server cluster corresponding to the vehicle system), a vehicle control platform or navigation platform or a computer connected to the vehicle system, etc. This application does not limit it, and the server is used as an example for explanation below.
[0073] The following is an example of an application scenario of the isolator edge line detection method provided in the present application.
[0074] Exemplarily, in this application scenario, the autonomous driving vehicle collects images of the current environment in order to determine the drivable range. The autonomous driving vehicle sends the collected initial images to the server.
[0075] In order to improve the detection accuracy, the server preprocesses the acquired initial image, for example, scaling the initial image to a preset size, normalizing the pixel values of the initial image, performing image enhancement processing on the initial image, etc., to obtain the target image.
[0076] The server then performs edge-related feature processing on the target image to obtain an endpoint feature map and an edge line feature map, and then generates a point set of the edge line of the insulator based on the endpoint feature map and the edge line feature map.
[0077] The server then fits each point set to obtain the edge line of the isolation object.
[0078] The server sends the obtained edge line of the partition to the autonomous driving vehicle, and the autonomous driving vehicle determines the location of the partition based on the edge line of the partition, and then determines the drivable area.
[0079] It should be noted that when the executor of the present application is a vehicle-mounted terminal, the vehicle-mounted terminal processes the initial image to obtain a target image, and then performs isolator edge line detection on the target image to obtain the isolator edge line, without the need for server participation, which can improve detection efficiency.
[0080] It should be noted that the above is only an example of an application scenario provided by an embodiment of the present application. The embodiment of the present application does not limit the actual form of the various devices included in the scenario, nor does it limit the interaction method between the devices. In the specific application of the solution, it can be set according to actual needs.
[0081] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0082] Figure 2a This is a flow chart of the first embodiment of the method for detecting the edge line of an isolator provided in the present application. The present embodiment of the present application describes the situation in which the server processes the edge-related features of the target image to obtain an edge-related feature map, and then generates a point set of the isolator edge line and then fits the isolator edge line. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware. Figure 2a As shown, the isolator edge line detection method specifically includes the following steps:
[0083] S201: Perform edge correlation feature processing on a target image to obtain an edge correlation feature map corresponding to the target image, and generate at least one point set in the target image based on the edge correlation feature map.
[0084] In this step, in order to realize the edge line detection of the isolator, the server first obtains the target image, and then performs edge-related feature processing on the target image to obtain an edge-related feature map corresponding to the target image, and generates at least one point set in the target image based on the edge-related feature map.
[0085] Among them, the edge correlation feature map is used to characterize the correlation between the pixel points in the target image and the edge lines of the insulator.
[0086] The edge-related feature map includes an endpoint feature map and an edge line feature map, so the endpoint feature map and the edge line feature map of the target image are first extracted.
[0087] The endpoint feature map represents the correlation between the pixel points in the target image and the edge line endpoints of the insulator edge line. The value of each pixel point in the endpoint feature map represents the probability that the pixel point corresponding to the pixel point in the target image is the edge line endpoint. The edge line feature map represents the correlation between the pixel points in the target image and the edge line of the insulator. The value of each pixel point in the edge line feature map represents the probability that the pixel point corresponding to the pixel point in the target image belongs to the edge line of the insulator.
[0088] Then, based on the endpoint feature map and the edge line feature map, a point set of the edge line of the insulator is generated.
[0089] In one implementation, the target image is input into the spacer edge line detection model to obtain at least one point set in the target image.
[0090] Through the isolator edge line detection model, the target image is first subjected to feature extraction and feature fusion processing to obtain the isolator feature. Feature extraction can be performed through the backbone network, and the extraction step size is 8, 16, 32, 64, etc. The extracted features are then subjected to feature fusion processing through the neck network to obtain the isolator feature. The isolator feature is then subjected to convolution processing to obtain the endpoint feature map and the edge line feature map. Based on the endpoint feature map and the edge line feature map, the point set of the isolator edge line is generated.
[0091] It should be noted that each pixel point in the endpoint feature map and the edge line feature map can find a corresponding pixel point in the target image.
[0092] It should be noted that the target image is an image that meets the preprocessing standard, and the preprocessing standard includes at least one of the following standards: the image size is a preset size, the image meets the normalization standard, and the image meets the image enhancement standard. The preset size can be 64*64, 128*128, 512*512, etc. The normalization standard refers to the value of the pixel in the image being between 0 and 1. The image enhancement standard refers to at least one of the image signal-to-noise ratio being greater than the preset signal-to-noise ratio, the image contrast being greater than the preset contrast, and the image brightness being greater than the preset brightness value. The preset signal-to-noise ratio can be 20dB, 25dB, 30dB, etc., the preset contrast can be 0.5, 0.6, 0.7, etc., and the preset brightness value can be 100, 120, 150, etc. The embodiment of the present application does not limit the preset size, image enhancement standard, preset signal-to-noise ratio, preset contrast, and preset brightness value, and can be set according to actual conditions.
[0093] It should be noted that the way the server obtains the target image can be: the vehicle pre-processes the collected initial image to obtain the target image, and then sends the target image to the server, and the server can obtain the target image. It can also be: the vehicle sends the collected initial image to the server, and the server pre-processes it to obtain the target image. It can also be: the user sends the target image to the server through a terminal device, and the server can obtain the target image. It can also be: the server obtains the initial image from a third-party platform, and pre-processes it to obtain the target image. The embodiment of the present application does not limit the way the server obtains the target image, which can be determined according to actual conditions.
[0094] It should be noted that the method of preprocessing the initial image includes at least one of scaling the initial image to a preset size, normalizing the pixel values of the initial image, and performing image enhancement processing on the initial image. The image enhancement method may be a geometric transformation, a color transformation, an image smoothing method, etc. The embodiment of the present application does not limit the method of preprocessing the initial image and the method of image enhancement, which can be determined according to actual conditions.
[0095] S202: Fit each point set respectively to obtain the edge line of the spacer corresponding to each point set.
[0096] In this step, after obtaining the point set of the edge line of the spacer, the server fits a straight line or a curve according to each point set to obtain the edge line of the spacer corresponding to the point set.
[0097] For example, Figure 2b The schematic diagram of the process of detecting the edge line of the spacer provided in this application is as follows: Figure 2bAs shown, after the initial image is preprocessed to obtain the target image, the target image is input into the spacer edge line detection model for processing to obtain at least one spacer edge line point set. Then, the spacer edge line is fitted according to the point set.
[0098] For example, Figure 2c The schematic diagram of the point set and the edge line of the separator provided in this application is as follows: Figure 2c As shown, the black dots in the figure constitute a point set, the black solid line in the figure is the edge line of the insulator, and curve fitting is performed on the point set to obtain the edge line of the insulator. The edge line of the insulator in the figure is a smooth curve.
[0099] For example, Figure 2d The schematic diagram of the edge line of the separator obtained by the solution provided in this application is as follows: Figure 2d As shown, the isolator in the figure is a guardrail, and the black line is the edge line of the guardrail. The edge line of the isolator obtained by this solution is smoother.
[0100] The method for detecting the edge line of an isolator provided in this embodiment performs edge-related feature processing on a target image to obtain an edge-related feature map corresponding to the target image, and then generates at least one point set in the target image based on the edge-related feature map, and then fits each point set to obtain the edge line of the isolator corresponding to each point set. Compared with the prior art that uses segmentation to determine the edge line, this solution generates a point set through an edge-related feature map, and then fits the edge line of the isolator, which effectively improves the detection accuracy.
[0101] Figure 3a This is a flow chart of the second embodiment of the isolator edge line detection method provided by the present application. Based on the above embodiment, the present embodiment of the present application describes the situation where the server generates a point set of the isolator edge line based on the endpoint feature map and the edge line feature map. Figure 3a As shown, the isolator edge line detection method specifically includes the following steps:
[0102] S301: Determine edge line endpoints based on an endpoint feature map.
[0103] In this step, after the server obtains the endpoint feature map and the edge feature map, in order to generate a point set, the edge line endpoints are first determined based on the endpoint feature map, and the types of edge line endpoints include start points and end points.
[0104] Specifically, the pixel point whose value in the endpoint feature map is greater than the preset first threshold is used as the first pixel point. Since the value of the pixel point in the endpoint feature map represents the probability that the pixel point corresponding to the pixel point in the target image is the starting point or end point of the edge line, in order to determine the starting point and the end point, the pixel point whose value is greater than the preset first threshold is first determined.
[0105] It should be noted that the preset first threshold may be 0.6, 0.7, 0.8, etc. The embodiment of the present application does not limit the preset first threshold and may be set according to actual conditions.
[0106] Then, clustering and merging are performed on the first pixel points to obtain second pixel points.
[0107] Since some first pixel points may be close to each other, the first pixel points with close distances correspond to the same starting point or end point. Therefore, the first pixel points may be clustered according to the set clustering distance, and each type of first pixel points corresponds to a starting point or end point. Then, each type of first pixel points may be merged to obtain the second pixel points.
[0108] It should be noted that the clustering distance can be 3 pixels, 5 pixels, 10 pixels, etc. The embodiment of the present application does not limit the clustering distance and can be set according to actual conditions.
[0109] It should be noted that the method of merging a class of first pixel points to obtain a second pixel point can be: determine the position coordinates of this class of first pixel points, and then average the horizontal coordinates in these position coordinates to obtain the target horizontal coordinate, and average the vertical coordinates in these position coordinates to obtain the target vertical coordinate, and use the pixel point corresponding to the coordinates composed of the target horizontal coordinate and the target vertical coordinate as the second pixel point obtained by merging. It can also be: randomly select a pixel point from this class of first pixel points as the second pixel point. It can also be: determine the position coordinates of this class of first pixel points, and then combine the horizontal coordinates in these position coordinates with the values of the pixel points to calculate the weighted average to obtain the target horizontal coordinate, combine the vertical coordinates in these position coordinates with the values of the pixel points to calculate the weighted average to obtain the target vertical coordinate, and use the pixel point corresponding to the coordinates composed of the target horizontal coordinate and the target vertical coordinate as the second pixel point obtained by merging. The embodiment of the present application does not limit the method of merging a class of first pixel points to obtain a second pixel point, which can be determined according to actual conditions.
[0110] The pixel points in the second pixel points that belong to the preset position range are used as the starting points.
[0111] The pixel points in the second pixel points that do not fall within the preset threshold range are taken as the end points.
[0112] For the insulator, the starting point of the insulator edge line is generally located on one side of the image, and the end point is located on the other side of the image, so the pixel point in the second pixel point that belongs to the preset position range can be used as the starting point; the pixel point in the second pixel point that does not belong to the preset threshold range can be used as the end point.
[0113] It should be noted that the preset position range can be the lower half or left part of the endpoint feature map, or the square area with a side length of 30 pixels, 50 pixels, 80 pixels, etc. in the lower left corner of the endpoint feature map. The embodiment of the present application does not limit the preset position range, and it can be set according to actual conditions.
[0114] It should be noted that when only the starting point or only the end point is determined, the preset first threshold and the preset position range can be reduced, and this step is executed again until at least one starting point and at least one end point are determined.
[0115] S302: Generate a point set of the edge line of the spacer according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map.
[0116] In this step, after the edge line endpoints are obtained, a point set of the spacer edge line is generated according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map.
[0117] First, the end point position area is determined according to each end point in the edge line end points.
[0118] In order to prevent the subsequently determined insulator edge line from exceeding the end point too much and causing the problem of low accuracy of the insulator edge line, it is necessary to determine the end point area of each end point in the edge line feature map based on the third position of each end point in the edge line endpoints in the endpoint feature map, and use the end point area of each end point in the edge line feature map as the end point position area.
[0119] For each end point, the third position of the end point in the endpoint feature map is mapped to the edge line feature map to obtain the position of the end point in the edge line feature map, and then a closed area containing the pixel points at the position is generated in the edge line feature map to obtain the end point range area of the end point.
[0120] In one implementation, an endpoint range area of the endpoint is generated around the position of the endpoint in the edge line feature map according to a preset endpoint range size.
[0121] Exemplarily, the preset endpoint range size is 5 pixels, and a circle with a radius of 5 pixels is drawn with the position of the endpoint in the edge line feature map as the center of the circle, as the endpoint range area of the endpoint. The preset endpoint range size is 6 pixels * 6 pixels, and a square with a side length of 6 pixels is drawn with the position of the endpoint in the edge line feature map as the center point of the square, as the endpoint range area of the endpoint. The preset endpoint range size is 7 pixels * 7 pixels, and an equilateral triangle with a side length of 7 pixels is drawn with the position of the endpoint in the edge line feature map as the center point of the equilateral triangle, as the endpoint range area of the endpoint.
[0122] Then, according to the first position of each starting point in the endpoint feature map, the second position of each endpoint in the edge line feature map, and the end point position area, the point set of the isolated edge line corresponding to each starting point is generated. That is, by taking each starting point in the edge line endpoint as the target starting point for edge line extraction, the point set of the isolated edge line corresponding to each starting point is obtained.
[0123] The edge line extraction includes: performing at least one point set extraction operation on the target starting point until a point set extraction end condition is met, and determining the target point combination obtained by the last point set extraction operation as the point set of the isolation edge line corresponding to the target starting point.
[0124] Among them, the i-th point set extraction operation includes:
[0125] Determine the current point position of the i-th point set extraction operation;
[0126] The value of the current point position in the edge feature map is input into the Long Short-Term Memory (LSTM) network model to obtain the position of the adjacent point corresponding to the current point position; the adjacent point position is the predicted position of the adjacent point of the current point corresponding to the current point position in the edge line feature map by the LSTM network model;
[0127] For example, Figure 3b The structural diagram of the LSTM network model provided for this application is shown in 3b. is the value of the current point position in the edge feature map, After the linear activation layer, we get , . is the position of the adjacent point, This is the data generated during the operation of the LSTM network model.
[0128] In response to the adjacent point position not satisfying the point set extraction termination condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation, the adjacent point position is determined as the current point position of the i+1-th point set extraction operation, and the i+1-th point set extraction operation is performed.
[0129] Alternatively, in response to the adjacent point position satisfying the extraction end condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation.
[0130] When i is 1, the current point position of the i-th point set extraction operation is the second position of the target starting point in the edge line feature map. The second position is obtained by mapping the first position of the target starting point in the endpoint feature map. The current point combination contains the corresponding pixel point of the target starting point in the target image.
[0131] When i is an integer greater than 1, the current point position of the i-th point set extraction operation is the adjacent point position in the i-1-th point set extraction operation, and the current point combination is the target point combination obtained by the i-1-th point set extraction operation.
[0132] The conditions for ending the extraction of the point set include: the adjacent point position is a non-edge line point position, and / or the adjacent point position belongs to the end position area. The adjacent point position is a non-edge line point position including: the value of the adjacent point position is less than a preset second threshold, and the preset second threshold represents the minimum value of the pixel point corresponding to the adjacent point position in the target image belonging to the edge line of the separator. The preset second threshold can be 0.7, 0.8, 0.9, etc. The embodiment of the present application does not limit the preset second threshold, and it can be set according to actual conditions.
[0133] When the adjacent point position meets the point set extraction end condition, it means that the pixel point at the adjacent point position in the target image no longer belongs to the edge line of the isolator, and / or, it means that the pixel point at the adjacent point position in the target image exceeds the end point range, and the point set extraction operation needs to be ended.
[0134] Exemplarily, the target starting point is point A, the current point combination of the first point set extraction operation is the corresponding pixel point a of point A in the target image, and the current point position of the first point set extraction operation is the second position of point A in the edge line feature map.
[0135] Perform the first point set extraction operation, input the value of the current point position in the edge feature map into the long short-term memory network model, and obtain the adjacent point position corresponding to the current point position. Since the adjacent point position does not meet the end condition of the point set extraction, the corresponding pixel point b of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the first point set extraction operation, which is pixel point a and pixel point b; determine the adjacent point position as the current point position of the second point set extraction operation; and use the target point combination obtained by the first point set extraction operation as the current point combination of the second point set extraction operation.
[0136] Perform the second point set extraction operation, input the value of the current point position in the edge feature map into the long short-term memory network model, and obtain the adjacent point position corresponding to the current point position. Since the adjacent point position meets the point set extraction end condition, the corresponding pixel c of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the second point set extraction operation. The target point combination is pixel a, pixel b, and pixel c. The point set of the isolated edge line corresponding to point A is pixel a, pixel b, and pixel c.
[0137] For example, Figure 3c The flowchart of determining the point set provided for this application is as follows: Figure 3cAs shown in the figure, the backbone network (backbone) and the neck network (neck) target image are processed for feature extraction and feature fusion to obtain the isolation feature, and then the endpoint feature map and the edge line feature map are obtained by convolution. After the edge line endpoints are determined according to the endpoint feature map, the edge line is extracted through each edge line endpoint, the type of each edge line endpoint, the LSTM network model and the edge line feature map to obtain the point set of the isolation edge line corresponding to each starting point.
[0138] The method for detecting the edge line of an isolator provided in this embodiment determines the end point position area, and then extracts the edge line by taking each starting point in the edge line endpoint as the target starting point, thereby obtaining a point set of the isolating edge line corresponding to each starting point, which effectively improves the matching of the point set with the isolator. In addition, compared with the semantic segmentation or instance segmentation used in the prior art, which requires determining whether each pixel point is an isolator, this solution determines the edge line of the isolator after generating a point set, thereby improving efficiency, as well as the smoothness and accuracy of the edge line of the isolator.
[0139] Figure 4 This is a flow chart of the third embodiment of the method for detecting the edge line of an isolator provided in the present application. Based on the above embodiment, the present embodiment of the present application illustrates the situation of training the initial neural network model according to the training image to obtain the isolator edge line detection model. Figure 4 As shown, the isolator edge line detection method specifically includes the following steps:
[0140] S401: Acquire multiple training images and supervision information of each training image.
[0141] In this step, in order to obtain an isolator edge line detection model, a plurality of training images and supervision information of each training image are first obtained.
[0142] Among them, the supervision information of each training image includes an endpoint probability map and an edge line probability map. The value of each pixel point in the endpoint probability map represents the probability that the corresponding pixel point in the target image is the starting point or the end point. The value of each pixel point in the edge line probability map represents the probability that the corresponding pixel point in the target image belongs to the edge line of the isolation object.
[0143] It should be noted that the endpoint probability map is generated based on the starting point and end point in the training image, and the value at the starting point and end point is determined to be 1, and then a Gaussian heat map is generated to obtain the endpoint probability map. The value of each pixel in the edge line probability map is 0 or 1, 0 means that the pixel corresponding to the pixel in the target image does not belong to the edge line of the insulator, and 1 means that the pixel corresponding to the pixel in the target image belongs to the edge line of the insulator.
[0144] It should be noted that the training image is a preprocessed image, and the preprocessing method is similar to the preprocessing method in step S201 in the first embodiment, which will not be described in detail here.
[0145] S402: Select a training image from multiple training images.
[0146] In this step, after the server obtains the training image, it trains the initial neural network model according to multiple training images and the supervision information of each training image until the loss value is less than the preset loss value threshold, and obtains the isolator edge line detection model. This process requires first selecting a training image from multiple training images.
[0147] S403: Input the training image into the initial neural network model to obtain an endpoint feature map, an edge line feature map, and a point set of at least one edge line of the insulator.
[0148] In this step, after selecting a training image, the server inputs the training image into the initial neural network model to obtain an endpoint feature map, an edge line feature map, and a point set of at least one edge line of the insulator.
[0149] Through the initial neural network model, the endpoint feature map and the edge line feature map are generated according to the training image. Then, the edge line endpoints are determined according to the endpoint feature map. Then, according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map, the point set of the edge line of the separator is generated.
[0150] It should be noted that the process of generating the endpoint feature map and the edge line feature map in this step is similar to the process of extracting the endpoint feature map and the edge line feature map of the target image in Example 1; the process of determining the edge line endpoints and point sets in this step is similar to that in Example 2, and will not be repeated here.
[0151] S404: Calculate the loss value according to the endpoint feature map, the value of the point set of at least one isolator edge line in the edge line feature map, and the supervision information of the training image.
[0152] In this step, after obtaining the endpoint feature map, the edge line feature map and the point set, the server determines the value of the point set in the edge line feature map, and then calculates the first sub-loss value in combination with the value of the point set in the edge line probability map. The second sub-loss value is calculated based on the endpoint feature map and the endpoint probability map. The first sub-loss value and the second sub-loss value are weighted and summed to obtain the loss value.
[0153] It should be noted that the loss function used to calculate the first sub-loss value and the second sub-loss value may be a mean square error function, a mean absolute error function, a cross entropy loss function, etc. The embodiment of the present application does not limit the loss function used to calculate the first sub-loss value and the second sub-loss value, and can be determined according to actual conditions.
[0154] S405: Determine whether the loss value is less than a preset loss value threshold; if the loss value is less than the preset loss value threshold, execute step S406; if the loss value is greater than or equal to the preset loss value threshold, execute step S407.
[0155] In this step, after the server determines the loss value, it needs to determine whether the loss value is less than the preset loss value threshold in order to determine whether to continue model training.
[0156] It should be noted that the preset loss value threshold may be 0.2, 0.5, 0.8, 1, etc. The embodiment of the present application does not limit the preset loss value threshold and may be set according to actual conditions.
[0157] S406: Using the initial neural network model as an isolation object edge line detection model.
[0158] In this step, if the server determines that the loss value is less than the preset loss value threshold, it means that the model has been trained and the initial neural network model is used as the isolation object edge line detection model.
[0159] S407: Update the initial neural network model to obtain a trained neural network model, and use the trained neural network model as a new initial neural network model to execute step S402.
[0160] In this step, if the server determines that the loss value is greater than or equal to the preset loss value threshold, it means that the model has not been trained and needs to continue training. The initial neural network model is updated to obtain the trained neural network model, and the trained neural network model is used as the new initial neural network model, and then return to execute step S402.
[0161] That is, reselect a training image and input it into the new initial neural network model to obtain the endpoint feature map, the edge line feature map and the point set of at least one edge line of the insulator; recalculate the loss value, if the new loss value is greater than or equal to the preset loss value threshold, repeat this process until the loss value is less than the preset loss value threshold, and obtain the insulator edge line detection model.
[0162] The insulator edge line detection method provided in this embodiment trains the initial neural network model through multiple training images and supervision information of each training image until the loss value is less than a preset loss value threshold, thereby obtaining the insulator edge line detection model, thereby improving the accuracy of the insulator edge line detection model.
[0163] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0164] Figure 5 This is a schematic diagram of the structure of an embodiment of the isolator edge line detection device provided in the present application; Figure 5 As shown, the spacer edge line detection device 50 includes:
[0165] A processing module 51 is used to perform edge correlation feature processing on a target image to obtain an edge correlation feature map corresponding to the target image, and to generate at least one point set in the target image based on the edge correlation feature map; the edge correlation feature map is used to characterize the correlation between pixel points in the target image and edge lines of insulators;
[0166] The generating module 52 is used to fit each point set respectively to obtain the edge line of the spacer corresponding to each point set.
[0167] Furthermore, the processing module 51 is specifically used for:
[0168] The target image is input into an isolator edge line detection model to obtain at least one point set in the target image.
[0169] Furthermore, the edge-related feature map includes an endpoint feature map and an edge line feature map, and the processing module 51 is specifically used for:
[0170] Extracting the endpoint feature map and the edge line feature map of the target image; the endpoint feature map represents the correlation between the pixel points in the target image and the edge line endpoints of the insulator edge line, and the edge line feature map represents the correlation between the pixel points in the target image and the insulator edge line;
[0171] Based on the endpoint feature map and the edge line feature map, a point set of the spacer edge line is generated.
[0172] Furthermore, the processing module 51 is further configured to:
[0173] Determine edge line endpoints based on the endpoint feature map;
[0174] A point set of the spacer edge line is generated according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map.
[0175] Furthermore, when the target image is input into the isolator edge line detection model to obtain at least one point set in the target image, the processing module 51 is specifically used to:
[0176] The target image is processed as follows by the isolator edge line detection model:
[0177] Performing feature extraction and feature fusion processing on the target image to obtain the features of the isolated object;
[0178] The spacer features are subjected to convolution processing to obtain an endpoint feature map and an edge line feature map.
[0179] Furthermore, the types of the edge line endpoints include a start point and an end point. The processing module 51 is further configured to:
[0180] Taking a pixel point in the endpoint feature map whose pixel value is greater than a preset first threshold as a first pixel point;
[0181] Performing clustering and merging processing on the first pixel points to obtain a second pixel point;
[0182] Taking the pixel points in the second pixel points that belong to the preset position range as the starting point;
[0183] The pixel points in the second pixel points that do not fall within the preset threshold range are taken as the end points.
[0184] Furthermore, the types of edge line endpoints include starting points and end points. The processing module 51 is further configured to:
[0185] Determine the end point location area according to each end point in the edge line end points;
[0186] According to the first position of each starting point in the endpoint feature map, the second position of each endpoint in the edge line feature map, and the end point position area, a point set of the isolated edge line corresponding to each starting point is generated.
[0187] Furthermore, the processing module 51 is further configured to:
[0188] Determine the region where each endpoint in the edge line feature map is located according to the third position of each endpoint in the edge line feature map;
[0189] The region where each end point is located in the edge line feature map is used as the end point position region.
[0190] Furthermore, the processing module 51 is further configured to:
[0191] Each starting point among the edge line endpoints is used as the target starting point to extract the edge line, and the point set of the isolated edge line corresponding to each starting point is obtained;
[0192] The edge line extraction includes: performing at least one point set extraction operation on the target starting point until the point set extraction end condition is met, and determining the target point combination obtained by the last point set extraction operation as the point set of the isolation edge line corresponding to the target starting point. The i-th point set extraction operation includes:
[0193] Determine the current point position of the i-th point set extraction operation;
[0194] Inputting the value of the current point position in the edge feature map into the long short-term memory network model to obtain the position of the adjacent point corresponding to the current point position; the adjacent point position is the predicted position of the adjacent point of the current point corresponding to the current point position in the edge line feature map by the long short-term memory network model;
[0195] In response to the adjacent point position not satisfying the point set extraction end condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation, the adjacent point position is determined as the current point position of the i+1-th point set extraction operation, and the i+1-th point set extraction operation is performed;
[0196] Or, in response to the adjacent point position satisfying the extraction end condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation;
[0197] Wherein, when i is 1, the current point position of the i-th point set extraction operation is the second position of the target starting point in the edge line feature map, the second position is determined by the first position of the target starting point in the endpoint feature map, and the current point combination includes the corresponding pixel point of the target starting point in the target image; when i is an integer greater than 1, the current point position of the i-th point set extraction operation is the adjacent point position in the i-1-th point set extraction operation, and the current point combination is the target point combination obtained by the i-1-th point set extraction operation;
[0198] The point set extraction termination conditions include: the adjacent point position is a non-edge line point position, and / or the adjacent point position belongs to the end point position area.
[0199] Furthermore, the adjacent point position being a non-edge line point position comprises: the value of the adjacent point position being less than a preset second threshold, and the preset second threshold represents the minimum value of the pixel point corresponding to the adjacent point position in the target image belonging to the edge line of the insulator.
[0200] The isolator edge line detection device provided in this embodiment is used to execute the technical solution in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar and will not be repeated here.
[0201] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 60 includes:
[0202] Processor 61, memory 62, and communication interface 63;
[0203] The memory 62 is used to store executable instructions of the processor 61;
[0204] The processor 61 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the executable instructions.
[0205] Optionally, the memory 62 may be independent or integrated with the processor 61 .
[0206] Optionally, when the memory 62 is a device independent of the processor 61, the electronic device 60 may further include:
[0207] The bus 64 , the memory 62 and the communication interface 63 are connected to the processor 61 via the bus 64 and communicate with each other. The communication interface 63 is used to communicate with other devices.
[0208] Optionally, the communication interface 63 may be implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0209] The bus 64 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0210] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0211] The electronic device is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.
[0212] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the technical solution provided by any of the aforementioned method embodiments is implemented.
[0213] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by any of the aforementioned method embodiments when executed by a processor.
[0214] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0215] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting edge lines of isolators, It is characterized in that include: Performing edge correlation feature processing on the target image to obtain an edge correlation feature map corresponding to the target image, and generating at least one point set in the target image based on the edge correlation feature map; The edge correlation feature map is used to characterize the correlation between the pixel points in the target image and the edge lines of the insulators; Fit each point set separately to obtain the edge line of the isolator corresponding to each point set; The edge association feature map includes an endpoint feature map and an edge line feature map, performing edge association feature processing on the target image to obtain an edge association feature map corresponding to the target image, and generating at least one point set in the target image based on the edge association feature map, including: Extracting the endpoint feature map and the edge line feature map of the target image; the endpoint feature map represents the correlation between the pixel points in the target image and the edge line endpoints of the insulator edge line, and the edge line feature map represents the correlation between the pixel points in the target image and the insulator edge line; Based on the endpoint feature map and the edge line feature map, generating a point set of the edge line of the spacer; The step of generating a point set of an edge line of an isolator based on the endpoint feature map and the edge line feature map comprises: Determine edge line endpoints based on the endpoint feature map; A point set of the spacer edge line is generated according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map.
2. The method according to claim 1, It is characterized in that The step of performing edge correlation feature processing on the target image to obtain an edge correlation feature map corresponding to the target image, and generating at least one point set in the target image based on the edge correlation feature map comprises: The target image is input into an isolator edge line detection model to obtain at least one point set in the target image.
3. The method according to claim 1, It is characterized in that When the target image is input into the isolator edge line detection model to obtain at least one point set in the target image, extracting the endpoint feature map and the edge line feature map of the target image includes: The target image is processed as follows by the isolator edge line detection model: Performing feature extraction and feature fusion processing on the target image to obtain the features of the isolated object; The spacer features are subjected to convolution processing to obtain an endpoint feature map and an edge line feature map.
4. The method according to claim 1, It is characterized in that The types of edge line endpoints include starting points and end points, and determining edge line endpoints based on the endpoint feature graph includes: Taking a pixel point in the endpoint feature map whose pixel value is greater than a preset first threshold as a first pixel point; Performing clustering and merging processing on the first pixel points to obtain a second pixel point; Taking the pixel points in the second pixel points that belong to the preset position range as the starting point; The pixel points in the second pixel points that do not fall within the preset threshold range are taken as the end points.
5. The method according to claim 1, It is characterized in that The types of edge line endpoints include a start point and an end point. According to each edge line endpoint, the type of each edge line endpoint and the edge line feature map, a point set of the edge line of the spacer is generated, including: Determine the end point location area according to each end point in the edge line end points; According to the first position of each starting point in the endpoint feature map, the second position of each endpoint in the edge line feature map, and the end point position area, a point set of the isolated edge line corresponding to each starting point is generated.
6. The method according to claim 5, It is characterized in that According to each end point in the edge line end point, determine the end point position area, including: Determine the region where each endpoint in the edge line feature map is located according to the third position of each endpoint in the edge line feature map; The region where each end point is located in the edge line feature map is used as the end point position region.
7. The method according to claim 5, It is characterized in that The step of generating a point set of isolated edge lines corresponding to each starting point according to the first position of each starting point in the endpoint feature map, the second position of each endpoint in the edge feature map, and the endpoint position area comprises: Each starting point among the edge line endpoints is used as the target starting point to extract the edge line, and the point set of the isolated edge line corresponding to each starting point is obtained; The edge line extraction includes: performing at least one point set extraction operation on the target starting point until the point set extraction end condition is met, and determining the target point combination obtained by the last point set extraction operation as the point set of the isolation edge line corresponding to the target starting point. The i-th point set extraction operation includes: Determine the current point position of the i-th point set extraction operation; Inputting the value of the current point position in the edge feature map into the long short-term memory network model to obtain the position of the adjacent point corresponding to the current point position; the adjacent point position is the predicted position of the adjacent point of the current point corresponding to the current point position in the edge line feature map by the long short-term memory network model; In response to the adjacent point position not satisfying the point set extraction end condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation, the adjacent point position is determined as the current point position of the i+1-th point set extraction operation, and the i+1-th point set extraction operation is performed; Or, in response to the adjacent point position satisfying the extraction end condition, the corresponding pixel point of the adjacent point position in the target image is added to the current point combination to obtain the target point combination obtained by the i-th point set extraction operation; Wherein, when i is 1, the current point position of the i-th point set extraction operation is the second position of the target starting point in the edge line feature map, the second position is determined by the first position of the target starting point in the endpoint feature map, and the current point combination includes the corresponding pixel point of the target starting point in the target image; when i is an integer greater than 1, the current point position of the i-th point set extraction operation is the adjacent point position in the i-1-th point set extraction operation, and the current point combination is the target point combination obtained by the i-1-th point set extraction operation; The point set extraction termination conditions include: the adjacent point position is a non-edge line point position, and / or the adjacent point position belongs to the end point position area.
8. The method according to claim 7, It is characterized in that The adjacent point position being a non-edge line point position includes: a value of the adjacent point position being less than a preset second threshold, and the preset second threshold represents a minimum value of a pixel point corresponding to the adjacent point position in the target image belonging to an edge line of an insulator.
9. A device for detecting the edge line of an isolator, It is characterized in that include: A processing module, configured to perform edge correlation feature processing on a target image to obtain an edge correlation feature map corresponding to the target image, and generate at least one point set in the target image based on the edge correlation feature map; The edge correlation feature map is used to characterize the correlation between the pixel points in the target image and the edge lines of the insulators; A generation module is used to fit each point set respectively to obtain the edge line of the isolator corresponding to each point set; The edge association feature map includes an endpoint feature map and an edge line feature map, and the processing module is specifically used to: extract the endpoint feature map and the edge line feature map of the target image; the endpoint feature map represents the association between the pixel points in the target image and the edge line endpoints of the insulator edge line, and the edge line feature map represents the association between the pixel points in the target image and the insulator edge line; based on the endpoint feature map and the edge line feature map, generate a point set of the insulator edge line; The processing module is further specifically used to: determine edge line endpoints based on the endpoint feature map; and generate a point set of the insulator edge line according to each edge line endpoint, the type of each edge line endpoint and the edge line feature map.
10. An electronic device, It is characterized in that include: Processor, memory, communication interface; The memory is used to store executable instructions of the processor; The processor is configured to execute the spacer edge line detection method according to any one of claims 1 to 8 by executing the executable instructions.
11. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the spacer edge line detection method according to any one of claims 1 to 8 is implemented.
12. A computer program product, It is characterized in that The invention comprises a computer program, which is used to implement the spacer edge line detection method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Lane line detection method, related equipment and computer readable storage medium
CN114531913A
Two-dimensional lane line recognition method and device, storage medium, equipment and vehicle
CN117710913A
Learning method, learning device for detecting lane through classification of lane candidate pixels and testing method, testing device using the same
US10223614B1
Edge locator
US11941818B1
Edge-Aware Bilateral Image Processing
US20170132769A1
