Parking line detection method and device based on semantic segmentation
By processing parking space images using semantic segmentation and clustering loss functions, the problem of low accuracy in parking line detection in automatic parking systems is solved, achieving high-precision parking line detection in complex scenarios and improving parking success rate.
Patent Information
- Application Number
- CN202211519247.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2042-11-30
AI Technical Summary
In existing automated parking systems, parking line detection algorithms are not very accurate in complex scenarios and struggle to accurately detect parking lines.
A semantic segmentation-based parking line detection method is adopted. The parking image is processed by preprocessing, semantic segmentation model and clustering loss function. Clustering is performed by foreground anchoring, background anchoring, intra-cluster pull and inter-cluster push functions to improve detection accuracy.
It achieves pixel-level parking line segmentation in various complex scenarios, improving the accuracy and speed of parking line detection and ensuring the accuracy of parking path planning.
Smart Images

Figure CN118155155B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic parking technology, and in particular to a parking space line detection method and device based on semantic segmentation. Background Technology
[0002] With the rapid development of technology, the demand for intelligent vehicles is increasing, significantly boosting the steady growth of the advanced driver assistance system (ADAS) market. Automated parking systems are a crucial component of ADAS, and parking line detection is a vital part of automated parking systems. Currently, existing automated parking systems primarily use corner detection algorithms or line segmentation algorithms for parking line detection. However, these algorithms are not suitable for complex scenarios and suffer from inaccurate detection. Therefore, accurately detecting parking lines in various complex scenarios has become a pressing issue that needs to be addressed. Summary of the Invention
[0003] This invention provides a semantic segmentation-based parking line detection method and device, which can accurately segment parking lines in various complex scenarios and improve the accuracy of parking line detection.
[0004] In a first aspect, embodiments of the present invention provide a parking line detection method based on semantic segmentation, comprising:
[0005] Obtain images of the parking spaces to be detected;
[0006] The parking space image is preprocessed;
[0007] A pre-built parking line segmentation model is used to perform semantic segmentation on the preprocessed parking space image to obtain a parking line segmentation image;
[0008] Based on the preset parking line label image, the parking line segmentation image is clustered using a preset clustering loss function to obtain the parking line segmentation result; wherein, the clustering loss function is constructed based on the foreground anchoring loss function, the background anchoring loss function, the intra-cluster pull function, and the inter-cluster push function.
[0009] As an improvement to the above solution, the preprocessing of the parking space image includes:
[0010] The parking space image is rotated to obtain parking space images at different rotation angles;
[0011] The brightness of the rotated parking space image is adjusted to obtain parking space images under different brightness levels;
[0012] The parking space image after brightness adjustment is filtered.
[0013] As an improvement to the above scheme, the step of clustering the parking line segmentation image using a preset clustering loss function based on the preset parking line label image to obtain the parking line segmentation result includes:
[0014] The parking line segmentation image is feature encoded to obtain the pixel embedding vector of each pixel in the parking line segmentation image;
[0015] Based on the parking line label image, the clustering loss function is used to cluster the parking line segmentation image to obtain the parking line segmentation result.
[0016] As an improvement to the above scheme, the clustering loss function is:
[0017] L=α·L var +β·L dist +γ·L back +ε·L fore ;
[0018] Where α, β, γ, and ε represent weights; L var L represents the intracluster pull function; dist L represents the inter-cluster thrust function; back L represents the background anchoring loss function; fore This represents the foreground anchoring loss function.
[0019] As an improvement to the above scheme, the cluster pull function is:
[0020]
[0021] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c μ represents the number of elements in cluster c. c x represents the center of cluster c; i The center of cluster c represents the embedding vector of the i-th pixel; δ v This represents the specified intra-cluster distance, where the distance between the pixel embedding vector and the cluster center is less than δ when each pixel embedding vector is pulled towards the cluster center. v It is effective and will be punished.
[0022] As an improvement to the above scheme, the inter-cluster thrust function is:
[0023]
[0024] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c This represents the number of elements in cluster c; c A c represents the set of pixels for parking space lines of category A;B This represents the set of pixels representing parking space lines of category B. Indicates the center of the cluster corresponding to parking space line A; Indicates the center of the cluster corresponding to parking space line B; δ d This represents the specified inter-cluster distance, where the centers of each cluster are far apart from each other, and the distance between the centers of two clusters is greater than 2δ. d It is effective and will be punished.
[0025] As an improvement to the above scheme, the foreground anchoring loss function is:
[0026]
[0027] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c ρ represents the number of elements in cluster c; c,fore Indicates the center of the cluster corresponding to the foreground channel; δ anchorfore This represents the first fixed distance value.
[0028] As an improvement to the above scheme, the background anchoring loss function is:
[0029]
[0030] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c ρ represents the number of elements in cluster c; c,back Indicates the center of the cluster corresponding to the background channel; δ anchorall δ represents the second fixed distance value. anchorback δ represents the third fixed distance value. anchorall =δ anchorback +δ anchorfore Epoch represents the number of training iterations.
[0031] As an improvement to the above scheme, the parking line segmentation model includes an encoder and a decoder; wherein, the encoder includes a first input layer, multiple downsampled convolutional layers and a first output layer connected in sequence, and the decoder includes a second input layer, multiple upsampled deconvolutional layers and a second output layer connected in sequence; the first output layer is connected to the second input layer; the multiple upsampled deconvolutional layers are connected one-to-one with the multiple downsampled convolutional layers; the second output layer is connected to the first input layer; the downsampled convolutional layer includes a convolutional module, a residual block and a downsampling module connected in sequence.
[0032] In a second aspect, embodiments of the present invention provide a parking line detection device based on semantic segmentation, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the parking line detection method based on semantic segmentation as described in any one of the first aspects.
[0033] Compared to existing technologies, the beneficial effects of this invention are as follows: First, the acquired parking space image is preprocessed; then, a pre-constructed parking line segmentation model is used to perform semantic segmentation on the preprocessed parking space image to obtain a segmented parking line image; subsequently, based on preset parking line label images, a preset clustering loss function is used to cluster the segmented parking line image to obtain the parking line segmentation result; wherein, the clustering loss function is constructed based on the foreground anchoring loss function, background anchoring loss function, intra-cluster pull function, and inter-cluster push function. By performing semantic segmentation on the parking space image using the parking line segmentation model, pixel-level precision parking line segmentation can be achieved. Then, the clustering loss function constructed based on the foreground anchoring loss function, background anchoring loss function, intra-cluster pull function, and inter-cluster push function clusters each pixel in the semantically segmented parking line segmentation image, which can accurately segment parking lines in various complex scenes and improve the accuracy of parking line detection. Attached Figure Description
[0034] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart of a parking line detection method based on semantic segmentation provided in an embodiment of the present invention;
[0036] Figure 2 This is a schematic diagram of the parking space line segmentation model provided in an embodiment of the present invention;
[0037] Figure 3 This is a schematic diagram of the intra-cluster tension and inter-cluster thrust provided in an embodiment of the present invention;
[0038] Figure 4 This is an overall flowchart of parking line detection provided in an embodiment of the present invention;
[0039] Figure 5 This is a schematic block diagram of a parking line detection device based on semantic segmentation provided in an embodiment of the present invention. Detailed Implementation
[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0042] Example 1
[0043] Please see Figure 1 This is a flowchart of a parking line detection method based on semantic segmentation provided in an embodiment of the present invention. The parking line detection method based on semantic segmentation can be executed by the vehicle's automatic parking system and specifically includes:
[0044] S1: Obtain the image of the parking space to be detected;
[0045] For example, the parking space image can be an image of a parking space in an indoor underground parking lot, an outdoor parking lot, a regular parking space, a special parking space, etc. When the vehicle's automatic parking system performs an automatic parking task, it acquires an image of the scene where the vehicle is located, captured by a camera, showing a location with at least one parking space. The parking space is a position marked by parking lines where a vehicle can park. It should be noted that in this embodiment of the invention, the type and location of the camera capturing the parking space image are not specifically limited. For example, the camera can be installed inside the vehicle or near a parking space in the parking scene. The camera can be a surround-view fisheye camera, a 360° panoramic camera, or other types of cameras.
[0046] S2: Preprocess the parking space image;
[0047] In this embodiment of the invention, the parking space image is preprocessed to increase the number of samples subsequently input into the parking line segmentation model. The preprocessing includes, but is not limited to, image rotation, image brightness adjustment, and image filtering.
[0048] S3: Use a pre-built parking line segmentation model to perform semantic segmentation on the preprocessed parking image to obtain a parking line segmentation image;
[0049] Furthermore, the parking space line segmentation model includes an encoder and a decoder; wherein, the encoder includes a first input layer, multiple downsampling convolutional layers, and a first output layer connected in sequence, and the decoder includes a second input layer, multiple upsampling deconvolutional layers, and a second output layer connected in sequence; the first output layer is connected to the second input layer; the multiple upsampling deconvolutional layers are connected one-to-one with the multiple downsampling convolutional layers; the second output layer is connected to the first input layer; the downsampling convolutional layer includes a convolutional module, a residual block, and a downsampling module connected in sequence. The first input layer is used to extract global information of the parking spaces in the parking space image; the multiple downsampling convolutional layers are used to extract deep information of the network; the first output layer is used to expand the receptive field; in this embodiment of the invention, the decoder uses multiple upsampling to restore the features to their original size. The designed network structure uses multi-layer skip connections and adds residual blocks to connect features of the same size during downsampling and upsampling processes to ensure that the features from the earlier stages are preserved during the deepening process of the network.
[0050] For example, the network structure of the parking line segmentation model is as follows: Figure 2 As shown, the encoder of the parking line segmentation model has a first input layer, three downsampled convolutional layers, and a first output layer connected in sequence. The decoder has a second input layer, three upsampled deconvolutional layers, and a second output layer connected in sequence. The first output layer is also connected to the second input layer, and the three downsampled convolutional layers are connected one-to-one with the three upsampled deconvolutional layers. The first input layer is also connected to the second output layer. After the parking image is input into the parking line segmentation model, it passes through the first input layer, the three downsampled convolutional layers, and the first output layer in the encoder in sequence. Dimensionality is continuously reduced through downsampling. Each layer in the encoder uses convolutional operations of different sizes to extract parking line features at different scales. Furthermore, residual block structures are added to the three downsampled convolutional layers to improve the feature transfer performance of the network. The parking line features output from the first output layer of the encoder are input into the decoder, passing sequentially through the second input layer, three upsampled deconvolution layers, and the second output layer. Upsampling restores the parking line features to the original image size. Simultaneously, the three upsampled deconvolution layers and the second output layer in the decoder also fuse the features input from the corresponding connected first input layer / downsampled convolution layer in the encoder, achieving lightweight multi-scale feature fusion and further improving the detection accuracy and speed of the model.
[0051] S4: Based on the preset parking line label image, cluster the parking line segmentation image using a preset clustering loss function to obtain the parking line segmentation result; wherein, the clustering loss function is constructed based on the foreground anchoring loss function, the background anchoring loss function, the intra-cluster pull function, and the inter-cluster push function.
[0052] In this embodiment of the invention, the parking line segmentation model is built based on a convolutional neural network. The parking space image is input into the parking line segmentation model for semantic segmentation, resulting in segmented parking line images; each parking space image corresponds to a parking line label image. Then, based on the corresponding parking line label images, a clustering loss function constructed using foreground anchoring loss function, background anchoring loss function, intra-cluster pull function, and inter-cluster push function is used to perform pixel-level clustering on the parking line segmentation images output by the parking line segmentation model. This accurately segments parking lines in various complex scenes, improving the accuracy of parking line detection.
[0053] In an optional embodiment, S2: preprocessing the parking space image, including:
[0054] The parking space image is rotated to obtain parking space images at different rotation angles;
[0055] The brightness of the rotated parking space image is adjusted to obtain parking space images under different brightness levels;
[0056] The parking space image after brightness adjustment is filtered.
[0057] In this embodiment of the invention, parking space images are rotated and their brightness adjusted from multiple angles to obtain images with different rotation angles and brightness levels. This increases the number of samples input into the parking line segmentation model, improves the model's segmentation accuracy, and provides richer and more realistic parking line information. Before inputting the parking space images into the parking line segmentation model, filtering is also required to reduce noise.
[0058] In one optional embodiment, the step of clustering the parking line segmentation image using a preset clustering loss function based on preset parking line label images to obtain parking line segmentation results includes:
[0059] The parking line segmentation image is feature encoded to obtain the pixel embedding vector of each pixel in the parking line segmentation image;
[0060] Based on the parking line label image, the clustering loss function is used to cluster the parking line segmentation image to obtain the parking line segmentation result.
[0061] In one optional embodiment, the clustering loss function is:
[0062] L=α·L var +β·L dist +γ·L back +ε·L fore ;
[0063] Where α, β, γ, and ε represent weights; Lvar L represents the cluster pull function; dist L represents the inter-cluster thrust function; back L represents the background anchoring loss function; fore This represents the foreground anchoring loss function.
[0064] The intra-cluster pull function is:
[0065]
[0066] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c μ represents the number of elements in cluster c. c x represents the center of cluster c; i The center of cluster c represents the embedding vector of the i-th pixel; δ v This represents the specified intra-cluster distance, where the distance between the pixel embedding vector and the cluster center is less than δ when each pixel embedding vector is pulled towards the cluster center. v It is effective and will be punished.
[0067] The inter-cluster thrust function is:
[0068]
[0069] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c This represents the number of elements in cluster c; c A c represents the set of pixels for parking space lines of category A; B This represents the set of pixels representing parking space lines of category B. Indicates the center of the cluster corresponding to parking space line A; Indicates the center of the cluster corresponding to parking space line B; δ d This represents the specified inter-cluster distance, where the centers of each cluster are far apart from each other, and the distance between the centers of two clusters is greater than 2δ. d It is effective and will be punished.
[0070] The foreground anchoring loss function is:
[0071]
[0072] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c ρ represents the number of elements in cluster c; c,fore Indicates the center of the cluster corresponding to the foreground channel; δ anchorfore This represents the first fixed distance value.
[0073] For example, δ anchorforeThe diagonal element value can be 2δ d The matrix.
[0074] The background anchoring loss function is:
[0075]
[0076] Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; N c ρ represents the number of elements in cluster c; c,back Indicates the center of the cluster corresponding to the background channel; δ anchorall δ represents the second fixed distance value. anchorback δ represents the third fixed distance value. anchorall =δ anchorback +δ anchorfore Epoch represents the number of training iterations.
[0077] For example, δ anchorback A matrix with values of 0; δ anchorall For δ anchorfore and δ anchorback The splicing matrix.
[0078] In this invention, a parking line marked in the parking line label image represents a parking line category. That is, by counting the number of parking lines marked in the parking line label image, the number of clusters can be obtained, and one cluster corresponds to one parking line category. In this embodiment, a clustering loss function is constructed based on the foreground anchoring loss function, background anchoring loss function, intra-cluster pull function, and inter-cluster push function. This function is used to cluster each pixel of the parking line segmentation image output by the parking line segmentation model, predicting the pixel embedding vector of each pixel. This ensures that the pixel embedding vectors of pixels belonging to the same parking line category are close together, while the pixel embedding vectors of pixels belonging to different parking line categories are far apart. Figure 3 As shown. The clustering loss function is:
[0079] L=α·L var +β·L dist +Y·L back +ε·L fore ;
[0080]
[0081]
[0082]
[0083]
[0084] In an embodiment of the present invention, L varThis represents the intra-cluster pull, responsible for pulling the pixel embedding vector towards the center of the cluster, δ. v Pixel embedding vectors within a certain distance are not penalized, L dist This represents inter-cluster thrust, responsible for keeping the centers of different clusters apart, 2δ d Pixel embedding vectors outside the specified distance are not penalized, thus bringing pixels of the same parking line category closer together and pixels of different parking line categories further apart. Furthermore, the background and foreground points of the image are segmented using parking line data, for example, through L... fore The foreground anchoring loss is calculated to reduce the distance between foreground clusters in the segmented image to 2δ. d Through L back The background anchoring loss is calculated to forcibly pull the background channel value of the segmented parking space line image to 0, thereby improving the clustering effect. This allows for accurate differentiation of the left and right side lines of the parking space, providing accurate parking space information for subsequent parking path planning, thus adjusting the parking posture and improving the parking success rate. This invention can be applied to various scenarios, such as indoor underground parking lots, outdoor parking lots, regular parking spaces, special parking spaces, etc., providing great convenience for automatic parking.
[0085] The overall process of parking line inspection is as follows: Figure 4 As shown, the parking space image is preprocessed and then input into the parking line segmentation model. After feature extraction by the encoder and decoder of the parking line segmentation model, the segmented parking line image is output. The segmented parking line image and the parking line label image are clustered by a clustering loss function to obtain the final parking line segmentation result. At the same time, the calculated loss can be backpropagated to the parking line segmentation model to update the loss parameters in the parking line segmentation model, thereby further improving the parking line segmentation accuracy of the model.
[0086] Compared with the prior art, the beneficial effects of the embodiments of the present invention are as follows: semantic segmentation of parking space images by the parking space line segmentation model can achieve pixel-level accuracy in parking space line segmentation; clustering loss functions constructed based on foreground anchoring loss function, background anchoring loss function, intra-cluster pull function and inter-cluster push function are used to cluster each pixel in the semantically segmented parking space line segmentation image, which can accurately segment parking space lines in various complex scenes, and improve detection accuracy while ensuring parking space line detection speed.
[0087] Example 2
[0088] See Figure 5 This is a schematic diagram of a parking line detection device based on semantic segmentation provided in the first embodiment of the present invention. Figure 5As shown, the semantic segmentation-based parking line detection device includes: at least one processor 11, such as a CPU; at least one network interface 14 or other user interface 13; a memory 15; and at least one communication bus 12, which is used to enable communication between these components. The user interface 13 may optionally include a USB interface and other standard interfaces, or a wired interface. The network interface 14 may optionally include a Wi-Fi interface and other wireless interfaces. The memory 15 may include high-speed RAM, and may also include non-volatile memory (NVM), such as at least one disk storage device. The memory 15 may optionally include at least one storage device located remotely from the aforementioned processor 11.
[0089] In some implementations, memory 15 stores executable modules or data structures, or subsets thereof, or extended sets thereof:
[0090] Operating system 151 contains various system programs used to implement various basic business functions and handle hardware-based tasks;
[0091] Program 152.
[0092] Specifically, the processor 11 is used to call the program 152 stored in the memory 15 to execute the semantic segmentation-based parking line detection method described in the above embodiments, for example... Figure 1 Steps S1-S4 are shown.
[0093] For example, the computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the semantic segmentation-based parking line detection device.
[0094] The semantic segmentation-based parking line detection device can be a computing device such as an automatic parking system controller (APA, AutoParking Assist), desktop computer, laptop, handheld computer, or cloud server. The semantic segmentation-based parking line detection device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the schematic diagram is merely an example of a semantic segmentation-based parking line detection device and does not constitute a limitation on the semantic segmentation-based parking line detection device. It may include more or fewer components than illustrated, or combine certain components, or use different components.
[0095] The processor 11 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 11 is the control center of the semantic segmentation-based parking line detection device, connecting all parts of the device via various interfaces and lines.
[0096] The memory 15 can be used to store the computer program and / or modules. The processor 11 implements various functions of the semantic segmentation-based parking line detection device by running or executing the computer program and / or modules stored in the memory and calling the data stored in the memory. The memory 15 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 15 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0097] The modules / units integrated into the semantic segmentation-based parking line detection device, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0098] It should be noted that the semantic segmentation-based parking line detection device described in this embodiment of the invention has the same implementation principle and technical effect as the semantic segmentation-based parking line detection method described in Embodiment 1, and will not be described in detail here.
[0099] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0100] The above description is a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, many improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A parking line detection method based on semantic segmentation, characterized in that, include: Obtain images of the parking spaces to be detected; The parking space image is preprocessed; A pre-built parking line segmentation model is used to perform semantic segmentation on the preprocessed parking space image to obtain a parking line segmentation image; Based on the preset parking line label image, the parking line segmentation image is clustered using a preset clustering loss function to obtain the parking line segmentation result; wherein, the clustering loss function is constructed based on the foreground anchoring loss function, the background anchoring loss function, the intra-cluster pull function, and the inter-cluster push function. The clustering loss function is: ; in, , , , Indicates weight; Represents the intracluster pull function; Represents the inter-cluster thrust function; This represents the background anchoring loss function; This represents the foreground anchoring loss function; The foreground anchoring loss function is: ; Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; Indicates the number of elements in cluster c; Indicates the center of the cluster corresponding to the foreground channel; Indicates the first fixed distance value; The background anchoring loss function is: ; Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; Indicates the number of elements in cluster c; Indicates the center of the cluster corresponding to the background channel; Indicates the second fixed distance value. Indicates the third fixed distance value. = + Epoch represents the number of training iterations.
2. The parking line detection method based on semantic segmentation as described in claim 1, characterized in that, The preprocessing of the parking space image includes: The parking space image is rotated to obtain parking space images at different rotation angles; The brightness of the rotated parking space image is adjusted to obtain parking space images under different brightness levels; The parking space image after brightness adjustment is filtered.
3. The parking line detection method based on semantic segmentation as described in claim 1, characterized in that, The step of clustering the parking line segmentation image based on the preset parking line label image using a preset clustering loss function to obtain the parking line segmentation result includes: The parking line segmentation image is feature encoded to obtain the pixel embedding vector of each pixel in the parking line segmentation image; Based on the parking line label image, the clustering loss function is used to cluster the parking line segmentation image to obtain the parking line segmentation result.
4. The parking line detection method based on semantic segmentation as described in claim 1, characterized in that, The intra-cluster pull function is: ; Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; Indicates the number of elements in cluster c; Indicates the center of cluster c; The center of cluster c represents the embedding vector of the i-th pixel; This represents the specified intra-cluster distance, where the distance between the pixel embedding vector and the cluster center is less than a specified value when each pixel embedding vector is pulled towards the cluster center. It is effective and will be punished.
5. The parking line detection method based on semantic segmentation as described in claim 1, characterized in that, The inter-cluster thrust function is: ; Wherein, C represents the number of clusters in the parking line label image, and one cluster corresponds to one type of parking line; Indicates the number of elements in cluster c; This represents the set of pixels for parking space lines of category A. This represents the set of pixels representing parking space lines of category B. Indicates the center of the cluster corresponding to parking space line A; Indicates the center of the cluster corresponding to parking space line B; This represents the specified inter-cluster distance, where the centers of each cluster are far apart from each other, and the distance between the centers of two clusters is greater than 2. It is effective and will be punished.
6. The parking line detection method based on semantic segmentation as described in claim 1, characterized in that, The parking line segmentation model includes an encoder and a decoder; wherein, the encoder includes a first input layer, multiple downsampled convolutional layers and a first output layer connected in sequence, and the decoder includes a second input layer, multiple upsampled deconvolutional layers and a second output layer connected in sequence; the first output layer is connected to the second input layer; the multiple upsampled deconvolutional layers are connected one-to-one with the multiple downsampled convolutional layers; the second output layer is connected to the first input layer; the downsampled convolutional layer includes a convolutional module, a residual block and a downsampling module connected in sequence.
7. A parking line detection device based on semantic segmentation, characterized in that, include: The processor, the memory, and the computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the semantic segmentation-based parking line detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Lane line detection system and method combining double-branch network and user-defined function network
CN110197151A
Lane line detection method, device and system based on semantic segmentation and storage medium
CN112613392A
