Disclosure of Invention
The embodiment of the application provides a lane line endpoint identification method, a lane line endpoint identification device, lane line endpoint identification equipment and lane line endpoint identification media, which are used for solving the following technical problems in the prior art: the existing key point detection scheme is not easy to obtain accurate detection results of the endpoints of the lane lines with broken lines.
The embodiment of the application adopts the following technical scheme:
a lane line end point recognition method, comprising:
defining a boundary frame for framing a lane line endpoint contained in the lane line sample image according to the lane line contained in the lane line sample image;
performing target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the boundary box of the lane line end point so as to identify the boundary box of the lane line end point;
and judging the position of the lane line end point according to the target detection result.
Optionally, the determining, according to the result of the target detection, the position of the lane line endpoint specifically includes:
image segmentation is carried out in the identified boundary box by utilizing an image segmentation algorithm so as to segment the foreground and the background;
and judging the position of the lane line end point according to the result of the target detection and the result of the image segmentation.
Optionally, the defining a bounding box for framing the lane line endpoint included in the lane line sample image according to the lane line included in the lane line sample image specifically includes:
defining a bounding box for framing lane lines contained in the lane line sample image;
and defining a boundary box for framing the lane line endpoint contained in the lane line sample image according to the width and/or the height of the boundary box of the lane line.
Optionally, the defining a bounding box for framing the lane line endpoint included in the lane line sample image according to the width and/or height of the lane line bounding box further includes:
and limiting the maximum size of the boundary box of the lane line endpoint according to a preset size threshold.
Optionally, the bounding box of the lane line endpoint is square in shape, and a side length of the square is not greater than a minimum value of: the size threshold, the width of the bounding box of the lane line, the height.
Optionally, the target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the bounding box of the lane line end point specifically includes:
acquiring a plurality of lane line sample images in at least one lane scene;
marking lane lines and lane line endpoints contained in the lane line sample images respectively;
training a bounding box regression model by utilizing a target detection algorithm based on a convolutional neural network according to the plurality of lane line sample images and labels thereof and the definition of a bounding box of a lane line endpoint;
and performing target detection in the image to be identified by using the trained bounding box regression model.
Optionally, the determining, according to the result of the target detection, the position of the lane line endpoint specifically includes:
and determining the position of the lane line end point according to the center point of the boundary box of the identified lane line end point.
Optionally, the lane line is a dashed line lane line.
A lane line end point recognition device, comprising:
the definition module is used for defining a boundary frame for framing the lane line end points contained in the lane line sample image according to the lane lines contained in the lane line sample image;
the recognition module is used for carrying out target detection in the image to be recognized by utilizing a target detection algorithm based on a convolutional neural network according to the definition of the boundary box of the lane line end point so as to recognize the boundary box of the lane line end point;
and the judging module is used for judging the position of the lane line end point according to the target detection result.
Optionally, the determining module determines the position of the lane line endpoint according to the result of the target detection, and specifically includes:
the judging module performs image segmentation in the identified bounding box by utilizing an image segmentation algorithm so as to segment a foreground and a background;
and judging the position of the lane line end point according to the result of the target detection and the result of the image segmentation.
Optionally, the defining module defines a bounding box for framing a lane line endpoint included in the lane line sample image according to a lane line included in the lane line sample image, and specifically includes:
the definition module is used for defining a boundary box for framing lane lines contained in the lane line sample image;
and defining a boundary box for framing the lane line endpoint contained in the lane line sample image according to the width and/or the height of the boundary box of the lane line.
Optionally, the defining module defines a bounding box for framing a lane line endpoint included in the lane line sample image according to the width and/or the height of the bounding box of the lane line, and further includes:
and the definition module limits the maximum size of the boundary box of the lane line endpoint according to a preset size threshold.
Optionally, the bounding box of the lane line endpoint is square in shape, and a side length of the square is not greater than a minimum value of: the size threshold, the width of the bounding box of the lane line, the height.
Optionally, the identifying module performs target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the bounding box of the lane line end point, and specifically includes:
the recognition module acquires a plurality of lane line sample images in at least one lane scene;
marking lane lines and lane line endpoints contained in the lane line sample images respectively;
training a bounding box regression model by utilizing a target detection algorithm based on a convolutional neural network according to the plurality of lane line sample images and labels thereof and the definition of a bounding box of a lane line endpoint;
and performing target detection in the image to be identified by using the trained bounding box regression model.
Optionally, the determining module determines the position of the lane line endpoint according to the result of the target detection, and specifically includes:
and the judging module judges the position of the lane line end point according to the central point of the boundary box of the identified lane line end point.
Optionally, the lane line is a dashed line lane line.
A lane line end point recognition apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
defining a boundary frame for framing a lane line endpoint contained in the lane line sample image according to the lane line contained in the lane line sample image;
performing target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the boundary box of the lane line end point so as to identify the boundary box of the lane line end point;
and judging the position of the lane line end point according to the target detection result.
A non-transitory computer storage medium storing computer-executable instructions for lane end point identification, the computer-executable instructions configured to:
defining a boundary frame for framing a lane line endpoint contained in the lane line sample image according to the lane line contained in the lane line sample image;
performing target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the boundary box of the lane line end point so as to identify the boundary box of the lane line end point;
and judging the position of the lane line end point according to the target detection result.
The above at least one technical scheme adopted by the embodiment of the application can achieve the following beneficial effects: by defining a proper boundary box for the lane line end point according to the lane line, and carrying out target detection based on boundary box regression, the lane line end point can be accurately identified in the image to be identified, and the position of the lane line end point can be determined.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In some embodiments of the application, a manner of defining bounding boxes for lane line end points is proposed, the defined bounding boxes being distinguished from existing bounding boxes of objects occupying a bulk area (such as cars, airplanes, etc.), which generally need to approach object edges with as little rectangle as possible more accurately, whereas the bounding boxes defined by the application may not have this limitation, on the one hand because the object is an end point, and on the other hand because the bounding box may be defined with reference to the corresponding lane line.
Based on the defined boundary box of the lane line endpoint, a training model can be returned through the boundary box, the boundary box is used for identifying the lane line endpoint in the lane line sample image and the image to be identified outside the sample, and the position of the lane line endpoint is determined. In order to improve the recognition accuracy, further processing such as image segmentation and image enhancement may be performed, and the positions of the lane line end points may be comprehensively determined. The following is a detailed description of the aspects of the application.
Fig. 1 is a flow chart of a lane end point identifying method according to some embodiments of the present application. In this flow, the execution subject may be one or more computing devices from a device perspective, such as a single machine learning server, a cluster of machine learning servers, an image segmentation server, or the like, and from a program perspective, the execution subject may be a program that is loaded on these computing devices accordingly, such as a neural network modeling platform, an image processing platform, or the like.
The flow in fig. 1 may include the steps of:
s102: and defining a boundary box for framing the end point of the lane line contained in the lane line sample image according to the lane line contained in the lane line sample image.
In some embodiments of the application, typically, each lane line image contains one or two lane line endpoints. The lane lines may be varied depending on the actual recognition needs, such as a dotted line lane line or a solid line lane line, a single lane line or a double lane line, a white lane line or a yellow lane line, etc. In practical application, the broken line lane line is formed by a plurality of discontinuous line segments, so that the lane line end point is difficult to accurately identify, and the scheme of the application can achieve a better identification effect on the broken line lane line end point, and the following embodiments mainly take the lane line in fig. 1 as a broken line lane line as an example.
In some embodiments of the application, there are a plurality of lane line sample images for training a corresponding machine learning model for detecting a bounding box of a lane line endpoint based at least on the definition of the bounding box. The bounding box of the lane line end point may be defined based on a variety of factors such as the lane line itself, the relative proportions of other objects in the image, a preset size threshold, the extent of distance of the lane line end point from the image edge, and the like.
S104: according to the definition of the boundary box of the lane line endpoint, a target detection algorithm based on a convolutional neural network is utilized to perform target detection in an image to be identified (mainly an image other than a sample image, such as a newly acquired road pavement image to be identified, etc.) so as to identify the boundary box of the lane line endpoint.
In some embodiments of the present application, local processing is performed on the image to be identified based on the convolutional neural network, and then an overall processing result is obtained according to a plurality of local processing results, so that the bounding box can be extracted more accurately for the lane line endpoint with a smaller target.
S106: and judging the position of the lane line end point according to the target detection result.
In some embodiments of the present application, after identifying the bounding box of the lane line endpoint through object detection, the position of the lane line endpoint may be determined directly according to the bounding box, for example, the position of the center point of the bounding box or the position of any point in the middle area of the bounding box is determined as the position of the lane line endpoint; alternatively, other algorithms may be employed to further identify within the bounding box to determine the location of the lane line end point.
By the method of fig. 1, by defining a proper boundary box for the lane line end point according to the lane line, object detection is performed based on the regression of the boundary box, so that the lane line end point can be accurately identified in the image to be identified, and the position of the lane line end point can be determined.
Some embodiments of the present application also provide some specific implementations of the method, as well as extensions thereof, based on the method of fig. 1, as described below.
In some embodiments of the present application, for step S106, the determining the position of the lane line endpoint according to the result of the target detection may include: image segmentation is carried out in the identified boundary box by utilizing an image segmentation algorithm so as to segment the foreground and the background; and judging the position of the lane line endpoint according to the result of the image segmentation or the combination of the result of the target detection and the result of the image segmentation. In the latter case, for example, the coordinates of the center point of the boundary box of the identified lane line may be averaged with the coordinates of at least one foreground pixel obtained by dividing the image, and the obtained coordinates may be determined as the position of the end point of the lane line.
The foreground pixels may be, for example, lane line pixels, more specifically lane line edge pixels, and the background pixels may be road surface pixels other than lane lines. The image segmentation may be implemented by using a corresponding trained model, and if the labeling of the samples (such as the boundary box image of the lane line, etc.) used for the model training is sufficiently accurate (for example, accurate to the end point pixels of the lane line), the end point of the lane line may be directly segmented as a foreground. For example, an image semantic segmentation algorithm can be adopted to segment the image, which is helpful for obtaining a more accurate segmentation result.
The algorithm adopted for the target detection and the image segmentation is not particularly limited, and an existing algorithm or an algorithm adapted to the improvement of a practical scene can be adopted, so that the described effect can be achieved. For example, MASK RCNN algorithm is used.
In some embodiments of the present application, assuming that the bounding box of the lane line is defined according to the lane line itself, for step S102, the defining a bounding box for framing the end point of the lane line included in the lane line sample image according to the lane line included in the lane line sample image may include: defining a bounding box for framing lane lines contained in the lane line sample image; and defining a boundary box for framing the lane line endpoint contained in the lane line sample image according to the width and/or the height of the boundary box of the lane line. The bounding box of the lane line can refer to the bounding box of each line segment in the dotted line lane line, and also can refer to the bounding box of the whole lane line, and the determination mode of the bounding box of the lane line can be referred to as follows: the bounding box of a well-defined object such as an automobile, aircraft, etc.
The lane line end point is directly related to the lane line where the lane line end point is located, and in the boundary box defining the lane line end point, the size of the boundary box is reasonable with reference to the lane line where the boundary box is located, so that the defined boundary box is not necessarily the same size in each lane line sample image, but the boundary box is suitable in size compared with the lane line where the boundary box is located, and the characteristics of the end point area can be extracted more effectively.
For example, the bounding box of the lane line may be determined first, resulting in a width and a height of the bounding box, and then a smaller value in the width and the height, from which the width and/or the height of the bounding box of the lane line end point is defined.
Further, considering that when the lane line itself occupies a relatively large proportion in the image, a bounding box with a larger lane line end point may be defined according to the bounding box, a size threshold may be preset for this problem, for limiting the maximum size of the bounding box of the lane line end point. The size threshold value may be, for example, the same value that is set uniformly for each sample picture (for example, the width and the height of the bounding box are each set to not more than 50 pixels, etc.), or may be an adaptive variable value that is set individually for the size of each sample picture (for example, the width and the height of the bounding box are each set to not more than 20 times the minimum value of the width and the height of the corresponding image, etc.).
In some embodiments of the present application, the bounding box of the lane line end point may be defined as a rectangle, but the bounding box of the lane line end point may also be defined as a square, so that the symmetry of the square is better, and the number of dimension parameters of the bounding box (two parameters of width and height are combined into one parameter of side length) may also be reduced, thereby saving resources. In addition, in some images, the lane line end points may be very close to the image edges, in which case if the bounding box is defined as a square, the side length of the square may be too small to facilitate extraction of features within the bounding box, in which case the bounding box may be defined as a rectangle to extract features as far as possible in the vertical direction of the edges.
More intuitively, some embodiments of the present application provide a dashed lane line end and its bounding box schematic, as shown in FIG. 2. Fig. 2 shows a dashed lane line, and a bounding box of each of two end points of the dashed lane line is exemplarily indicated by a dashed square box, and a center point (indicated by a cross) of the bounding box may be regarded as the end point.
In some embodiments of the present application, for step S102, the performing object detection in the image to be identified by using an object detection algorithm based on a convolutional neural network according to the definition of the bounding box of the lane line endpoint may include: acquiring a plurality of lane line sample images in at least one lane scene; marking lane lines and lane line endpoints contained in the lane line sample images respectively; training a bounding box regression model by utilizing a target detection algorithm based on a convolutional neural network according to the plurality of lane line sample images and labels thereof and the definition of a bounding box of a lane line endpoint; and performing target detection in the image to be identified by using the trained bounding box regression model.
Lane line images under different lane scenes may have certain features of scene definition, distinguishing lane scenes facilitates subsequent more accurate identification of lane line endpoints. The lane scene may be defined according to actual recognition requirements, such as a single lane scene, an intersection scene, a u-turn intersection scene, a virtual-real double-line scene, a bidirectional multi-lane scene, a curve scene, etc., which are not limited in detail herein, but only serve as an example for understanding.
According to the above description, some embodiments of the present application further provide a detailed flow of the lane line endpoint recognition method, as shown in fig. 3.
The steps in fig. 3 may include the steps of:
s302: a number of sample images including dashed lane lines under various lane scenarios are collected.
S304: and marking the dotted line lane line and the lane line end points contained in the dotted line lane line according to the lane scene.
S306: for each lane line endpoint, according to the corresponding size of the dotted line lane line, defining a bounding box for the lane line endpoint, specifically defined as: the bounding box is square, the side length of the bounding box is a preset size threshold, the minimum value of the width and the height of the bounding box of the corresponding dotted line lane line is expressed as min (min (w, h), 50), min () represents a function taking the minimum value, w and h represent the width and the height respectively, and 50 represents the size threshold.
S308: using the object detection algorithm, a bounding box of the lane line end point is identified, and a center point of the identified bounding box may be considered as the lane line end point.
S310: and further utilizing an image semantic segmentation algorithm to segment a foreground and a background in the identified boundary box, wherein the foreground is regarded as a lane line end point pixel, and the background is regarded as other pixels.
S312: and extracting lane line endpoints according to the image semantic segmentation result.
S314: and combining the target detection result and the image semantic segmentation result (for example, taking an average value of coordinates of the target detection result and the image semantic segmentation result), and finally judging the position of the lane line endpoint.
Based on the same thought, some embodiments of the present application further provide an apparatus, a device, and a non-volatile computer storage medium corresponding to the above method.
Fig. 4 is a schematic structural diagram of a lane end point identifying apparatus corresponding to fig. 1 according to some embodiments of the present application, where the apparatus includes:
the definition module 401 is used for defining a boundary box for framing the lane line endpoint contained in the lane line sample image according to the lane line contained in the lane line sample image;
the recognition module 402 is used for carrying out target detection in the image to be recognized by utilizing a target detection algorithm based on a convolutional neural network according to the definition of the boundary box of the lane line end point so as to recognize the boundary box of the lane line end point;
the determining module 403 determines the position of the lane line endpoint according to the result of the target detection.
Optionally, the determining module 403 determines the position of the lane line endpoint according to the result of the target detection, specifically includes:
the determining module 403 performs image segmentation in the identified bounding box using an image segmentation algorithm to perform segmentation of foreground and background;
and judging the position of the lane line end point according to the result of the target detection and the result of the image segmentation.
Optionally, the defining module 401 defines a bounding box for framing a lane line endpoint included in the lane line sample image according to a lane line included in the lane line sample image, and specifically includes:
the definition module 401 defines a bounding box for framing the lane lines contained in the lane line sample image;
and defining a boundary box for framing the lane line endpoint contained in the lane line sample image according to the width and/or the height of the boundary box of the lane line.
Optionally, the defining module 401 defines a bounding box for framing a lane line endpoint included in the lane line sample image according to the width and/or height of the lane line bounding box, and further includes:
the definition module 401 limits the maximum size of the bounding box of the lane line endpoint according to a preset size threshold.
Optionally, the bounding box of the lane line endpoint is square in shape, and a side length of the square is not greater than a minimum value of: the size threshold, the width of the bounding box of the lane line, the height.
Optionally, the identifying module 402 performs target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the bounding box of the lane line endpoint, which specifically includes:
the recognition module 402 obtains a plurality of lane line sample images in at least one lane scene;
marking lane lines and lane line endpoints contained in the lane line sample images respectively;
training a bounding box regression model by utilizing a target detection algorithm based on a convolutional neural network according to the plurality of lane line sample images and labels thereof and the definition of a bounding box of a lane line endpoint;
and performing target detection in the image to be identified by using the trained bounding box regression model.
Optionally, the determining module 403 determines the position of the lane line endpoint according to the result of the target detection, specifically includes:
the determination module 403 determines a location of the lane line endpoint based on a center point of the bounding box of the identified lane line endpoint.
Optionally, the lane line is a dashed line lane line.
Fig. 5 is a schematic structural diagram of a lane end point identifying apparatus corresponding to fig. 1 according to some embodiments of the present application, the apparatus includes:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
defining a boundary frame for framing a lane line endpoint contained in the lane line sample image according to the lane line contained in the lane line sample image;
performing target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the boundary box of the lane line end point so as to identify the boundary box of the lane line end point;
and judging the position of the lane line end point according to the target detection result.
Some embodiments of the application provide a lane end point identification non-volatile computer storage medium corresponding to that of fig. 1, storing computer-executable instructions configured to:
defining a boundary frame for framing a lane line endpoint contained in the lane line sample image according to the lane line contained in the lane line sample image;
performing target detection in the image to be identified by using a target detection algorithm based on a convolutional neural network according to the definition of the boundary box of the lane line end point so as to identify the boundary box of the lane line end point;
and judging the position of the lane line end point according to the target detection result.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for apparatus, devices and media embodiments, the description is relatively simple as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
The devices, the devices and the media provided by the embodiments of the present application are in one-to-one correspondence with the methods, so that the devices, the devices and the media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices, the devices and the media are not described again here.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.