A berth detection system and method based on a large model
By using CLIP model and image recognition technology, combined with centroid clustering and geometric calculation, the accuracy problem of high-position video cameras in identifying the relative positions of berths and vehicles was solved, achieving efficient berth detection and resource management.
Patent Information
- Application Number
- CN202510053646.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-01-14
AI Technical Summary
Existing high-position video cameras are difficult to accurately identify the relative positions of parking spaces and vehicles due to factors such as tree obstruction and obstruction by passing vehicles, resulting in low efficiency in parking space management.
A cross-modal contrastive learning method based on the CLIP model is adopted. By mapping images and descriptive text to a common vector space, combined with image recognition technology, the parking space outline and vehicle area are identified, and the relative positions are determined by centroid clustering and geometric calculation.
It achieves high-precision parking space detection, improves recognition accuracy and robustness, reduces parking resource waste, adapts to different lighting conditions and complex scenarios, and improves system response capability and robustness.
Smart Images

Figure CN119478897B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and in particular to a parking space detection system and method based on a large model. Background Technology
[0002] With the rapid development of urban economies and the continuous improvement of people's living standards, cars have become an indispensable means of daily transportation, and the contradiction between parking demand and demand has become increasingly acute. Especially on both sides of urban roads, due to the scarcity of roadside parking spaces, finding a suitable parking space has become a headache for many car owners. In recent years, some areas have adopted parking management methods based on high-position video cameras, achieving good management results. However, because high-position video cameras are usually installed on one side of the road, the lens angle is relatively simple. In addition, factors such as tree obstruction and obstruction by passing vehicles can affect the accuracy of identifying the relative position of parking spaces and vehicles.
[0003] With the development of technologies such as the Internet of Things (IoT), artificial intelligence (AI), and big data, the rise of intelligent transportation technology has provided new possibilities for the real-time monitoring and optimized management of parking spaces. Utilizing technologies such as computer vision, deep learning, and IoT, intelligent transportation systems can monitor parking space conditions in real time, improving parking space management efficiency and optimizing the allocation of parking resources. Therefore, based on this, this application proposes a parking space detection system and method based on a large model. Summary of the Invention
[0004] Technical Purpose
[0005] To address the aforementioned problems, the present invention aims to provide a parking space detection system and method based on a large model. This system can not only identify on-street parking spaces and vehicles, but also determine the relative positions of parking spaces and vehicles. The method and system have a wide range of applications, can achieve automated and high-precision parking space detection, and have low detection logic complexity.
[0006] Technical solution
[0007] To achieve the above objectives, this invention provides a berth detection system and method based on a large model. It uses a CLIP model for comparative learning of captured images and descriptive text, mapping the captured images and descriptive text into a common vector space, thus achieving cross-modal comparative learning. The CLIP model identifies berth outlines and vehicles in the captured images and optimizes the pre-judgment results using image recognition technology, including image binarization, morphological analysis, connected component feature recognition, and attribute extraction. Linear regression and geometric calculations determine the direction of the berth outlines and the location of the vehicles, thereby determining the relative positions of the berths and vehicles.
[0008] In a first aspect, the present invention provides a berth detection system based on a large model, comprising:
[0009] The image recognition module is used to identify areas in a captured image that may contain parking space outlines and areas that may contain vehicles through a cross-modal contrastive learning method. The cross-modal contrastive learning method includes mapping the captured image and descriptive text to a common vector space through a CLIP multimodal model.
[0010] The image processing module is used to filter berth areas and vehicle areas based on the similarity between multimodal data and to perform binarization and morphological analysis on the images of the filtered berth areas.
[0011] The connected component recognition module is used to identify connected components in the berth area image and extract the attributes of connected components. It further filters the berth area by restricting the attributes of connected components in the berth area image.
[0012] The centroid clustering module is used to calculate the centroid of the region image and cluster the centroids of the berth region image.
[0013] The position determination module is used to determine the relative position of the parking space and the vehicle based on their center of gravity.
[0014] Furthermore, the image recognition module outputs the captured image and descriptive text about parking spaces and vehicles as image feature vectors and text feature vectors, respectively. It then matches and retrieves these image and text feature vectors to identify areas in the captured image where parking space outlines may exist and areas where vehicles may be present. This cross-modal comparative learning between images and text improves recognition accuracy.
[0015] Furthermore, the CLIP model processes the input captured image through a series of convolutional or Transformer layers, outputting a fixed-size vector, namely the image feature vector, which represents the captured image in vector space.
[0016] Furthermore, the CLIP model processes the input descriptive text through a text encoder, such as a Transformer, and outputs a fixed-size vector, namely the text feature vector, which is the representation of the descriptive text in vector space.
[0017] Furthermore, the image processing module normalizes the image feature vector and the text feature vector to obtain the similarity between the captured image and the descriptive text.
[0018] Furthermore, normalization involves dividing the eigenvector by its own norm so that the modulus of the eigenvector is 1.
[0019] Furthermore, the similarity between the captured image and the descriptive text is the dot product between the feature vectors of the captured image and the descriptive text, which is the cosine of the angle between the two feature vectors. The value of the similarity ranges from -1 to 1. When the similarity is 1, the two feature vectors are completely identical. When the similarity is -1, the two feature vectors are completely opposite. When the similarity is 0, the two are orthogonal.
[0020] Furthermore, binarization converts a grayscale image into a binary image, where pixel values are represented by 0 or 1, with 0 representing black and 1 representing white.
[0021] Furthermore, the image processing module performs binarization processing on the berth image by calling the imbinarize function in MATLAB.
[0022] Furthermore, the image processing module performs binarization processing on the berth image using two methods: global thresholding and adaptive thresholding. The global thresholding method sets all pixel values in the grayscale image that are higher than the threshold to 1 and those that are lower than the threshold to 0. The adaptive thresholding method dynamically adjusts the threshold based on the local regions of the image.
[0023] Furthermore, the image processing module uses MATLAB to perform morphological analysis on the berth image. The morphological analysis operates on the berth image through structuring elements, including dilation, erosion, opening, and closing operations, to achieve the purposes of target region extraction, shape analysis, and image restoration.
[0024] Furthermore, morphological analysis operations specifically include: dilation: expanding the boundaries of objects in an image outward to increase their area, filling holes within objects, and connecting adjacent objects; erosion: shrinking the boundaries of objects in an image inward to reduce their area, thereby removing small noise on object boundaries; opening operation: performing erosion followed by dilation to remove small noise points while preserving the overall shape of the object; closing operation: performing dilation followed by erosion to fill small holes within objects while preserving the overall shape of the object; hit-or-miss transformation: used to detect specific shapes or patterns.
[0025] Furthermore, the connected component identification module extracts the attributes of the connected components, including area and eccentricity.
[0026] Furthermore, the connected component recognition module uses MATLAB to perform connected component recognition on the berth image. Connected component recognition is the identification of connected regions or connected components in a binary image, specifically regions composed of adjacent pixels.
[0027] Furthermore, connected component identification methods include: Connected component labeling: assigning a unique label to each connected component in the image by calling the bwlabel and bwconncomp functions in MATLAB; Region filling: using the imfill function in MATLAB to gradually expand the filling pixels outward from the seed point until the filled region is no longer connected to the background; Connected component analysis: using the regionprops function in MATLAB to analyze the shape, area, perimeter, and other features of the identified connected components.
[0028] Furthermore, the area of a connected component is measured by the number of speed limits it contains.
[0029] By using the CLIP model for pre-judgment and then combining it with image recognition technology to optimize the results, and by employing techniques such as adaptive thresholding and morphological processing, the system can adapt to different lighting conditions and image quality, thereby improving the accuracy and robustness of recognition.
[0030] Furthermore, the centroid clustering module uses the K-means algorithm to cluster the centroids of the berth area image to determine the orientation of the berth wireframe, and determines the location of the vehicle based on the centroids of the vehicle area image. More specifically, the K-means algorithm includes the following steps: pre-determining the number of categories in the dataset; randomly selecting a certain number of centroids for initialization and iterating; assigning each data point to the cluster containing the nearest centroid based on Euclidean distance; for each cluster, calculating the mean of all data points in the cluster and updating the centroid's position; and iterating repeatedly until the centroids no longer change or a predetermined number of iterations is reached.
[0031] Its computational complexity is low, which improves the system's responsiveness; through cluster analysis, the straight line containing the long side of the berth frame can be determined more accurately, thereby improving the accuracy of berth frame recognition; in image registration, the optimal set of inner points is selected based on the uniform distribution of cluster centers in the overlapping area of the image, which effectively enhances the image registration accuracy.
[0032] Furthermore, based on the orientation of the berth frame and the location of the vehicle, a straight line perpendicular to the berth direction and passing through the centroid of the vehicle area image is determined.
[0033] Furthermore, the relative positions of the parking space and the vehicle are determined by judging whether there is an intersection point between the straight line in the direction of the parking space and the straight line passing through the centroid of the vehicle area image and perpendicular to the direction of the parking space in the captured image, and whether the intersection point is located inside the parking space frame.
[0034] Its low computational complexity improves the system's responsiveness; by combining linear regression and geometric calculations, the system can better handle various environmental changes, such as different lighting conditions and complex parking scenarios, thereby improving the system's robustness.
[0035] Secondly, the present invention also provides a berth detection method based on a large model, the method being based on the system described in the first aspect above, comprising:
[0036] The method includes:
[0037] A cross-modal contrastive learning method is used to identify areas in captured images that may contain parking space outlines and areas that may contain vehicles.
[0038] Parking space areas and vehicle areas are selected based on the similarity between multimodal data, and the selected parking space area images are binarized and subjected to morphological analysis.
[0039] Connectivity identification is performed on the berth area image, and the attributes of the connected components are extracted;
[0040] The centroids of the area images are calculated, and the centroids of the berth area images are clustered.
[0041] After clustering, the parking space address direction and the vehicle's location in the image are planned;
[0042] The relative positions of the two are determined by the center of gravity of the berth and the vehicle.
[0043] Thirdly, the present invention also provides a computer device including a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the computer device performs at least one step in implementing the aforementioned berth detection method based on a large model.
[0044] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements at least one step in the aforementioned berth detection method based on a large model.
[0045] This invention utilizes the CLIP model for comparative learning between captured images and descriptive text, mapping both to a common vector space to achieve cross-modal comparative learning. The CLIP model identifies berth outlines and vehicles within the captured images and optimizes the pre-judgment results using image recognition technology. By clustering the centroids of the berth area images to determine the lines containing the two long sides of the berth outlines, and using the centroids of the vehicle area images as the vehicle's location, the direction of the berth outlines and the vehicle's location are determined through linear regression and geometric calculations, thus judging the relative position of the berth and the vehicle. This system and method have wide applications, enabling automated, high-precision berth detection with low detection logic complexity.
[0046] Beneficial effects
[0047] By implementing the berth detection system and method based on a large model provided by the present invention, the following technical effects are achieved:
[0048] (1) This invention uses the CLIP model to perform comparative learning between captured images and descriptive text, mapping the captured images and descriptive text into a common vector space, thus realizing cross-modal comparative learning. The CLIP model identifies parking space outlines and vehicles in the captured images and optimizes the pre-judgment results by combining image recognition technology. By intelligently identifying parking spaces and vehicles, parking resources are allocated more rationally, reducing parking space waste. By realizing cross-modal comparative learning between images and text, the accuracy of recognition is improved. The CLIP model is used for pre-judgment, and the results are optimized by combining image recognition technology. Through adaptive thresholding and morphological processing, the system can adapt to different lighting conditions and image quality, improving the accuracy and robustness of recognition.
[0049] (2) By clustering the centroids of the berth area image to determine the straight lines on the two long sides of the berth frame, the centroid of the vehicle area image is used as the location of the vehicle; the computational complexity is low, which improves the system's responsiveness; through cluster analysis, the straight lines on the long sides of the berth frame can be determined more accurately, thereby improving the accuracy of berth frame recognition; in image registration, the optimal set of inner points is selected based on the uniform distribution of cluster centers in the overlapping areas of the images, which effectively enhances the image registration accuracy.
[0050] (3) The direction of the parking space frame and the location of the vehicle are determined by linear regression and geometric calculation, thereby determining the relative position of the parking space and the vehicle; the computational complexity is low, which improves the system's responsiveness; by combining linear regression and geometric calculation, the system can better handle various environmental changes, such as different lighting conditions and complex parking scenarios, thereby improving the system's robustness. Attached Figure Description
[0051] To make the above-described berth detection system and method based on a large model of the present invention more apparent and understandable, the accompanying drawings used in the specific embodiments of the present invention 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 from these drawings without creative effort.
[0052] Figure 1 A schematic diagram illustrating the process of a berth detection method based on a large model;
[0053] Figure 2 This diagram illustrates the technical route of the present invention.
[0054] Figure 3 A schematic diagram representing an approximate determination of the berth outline;
[0055] Figure 4 A schematic diagram showing a window with berth outlines and other interfering factors;
[0056] Figure 5 A schematic diagram showing only the berth outline;
[0057] Figure 6 A schematic diagram showing a window without a berth frame;
[0058] Figure 7 A schematic diagram of a window representing three typical examples;
[0059] Figure 8 A schematic diagram of binarized images representing three typical examples;
[0060] Figure 9 A schematic diagram showing the results of morphological analysis;
[0061] Figure 10 This diagram illustrates the results of connected component identification.
[0062] Figure 11 This is a schematic diagram of the secondary screening berth area;
[0063] Figure 12 A schematic diagram showing the centroid location of the berth area image;
[0064] Figure 13 This is a schematic diagram showing the results of berth outline recognition.
[0065] Figure 14 A schematic diagram showing the centroid location of the vehicle region image;
[0066] Figure 15 A diagram showing the summary of elements. Detailed Implementation
[0067] Example 1:
[0068] A berth detection system and method based on a large model are provided. The berth detection method based on the large model is as follows: Figure 1 As shown, the technical route of the present invention is as follows: Figure 2 As shown, the berth detection system based on the large model includes: an image recognition module, an image processing module, a connected component recognition module, a centroid clustering module, and a location determination module, as described in detail below.
[0069] The image recognition module is used to identify areas in a captured image that may contain parking space outlines and areas that may contain vehicles through a cross-modal contrastive learning method. The cross-modal contrastive learning method includes mapping the captured image and descriptive text to a common vector space through a CLIP multimodal model.
[0070] The image recognition module outputs the captured image and the descriptive text about the parking space and the vehicle as image feature vectors and text feature vectors, respectively. It then matches and retrieves the image feature vectors and text feature vectors to obtain the areas in the captured image where the parking space outline may exist and the areas where the vehicle may exist.
[0071] The CLIP model processes the input captured image through a series of convolutional or Transformer layers, outputting a fixed-size vector, namely the image feature vector, which represents the captured image in vector space.
[0072] The CLIP model takes the input descriptive text and passes it through a text encoder, such as a Transformer, and outputs a fixed-size vector, namely the text feature vector, which is the representation of the descriptive text in vector space.
[0073] The image processing module is used to filter berth areas and vehicle areas based on the similarity between multimodal data, and to perform binarization and morphological analysis on the images of the filtered berth areas.
[0074] The image processing module normalizes the image feature vector and the text feature vector to obtain the similarity between the captured image and the descriptive text.
[0075] Normalization is achieved by dividing the eigenvector by its own norm so that the modulus of the eigenvector is 1.
[0076] The similarity between the captured image and the descriptive text is the dot product between the feature vectors of the captured image and the descriptive text, which is the cosine of the angle between the two feature vectors. The value of the similarity ranges from -1 to 1. When the similarity is 1, the two feature vectors are completely identical. When the similarity is -1, the two feature vectors are completely opposite. When the similarity is 0, the two are orthogonal.
[0077] Binarization is the process of converting a grayscale image into a binary image. In a binary image, pixel values are represented by 0 or 1, where 0 represents black and 1 represents white.
[0078] The image processing module performs binarization processing on the berth image by calling the imbinarize function in MATLAB.
[0079] The image processing module performs binarization processing on the berth image using two methods: global thresholding and adaptive thresholding. The global thresholding method sets all pixel values in the grayscale image that are higher than the threshold to 1 and those that are lower than the threshold to 0. The adaptive thresholding method dynamically adjusts the threshold based on the local regions of the image.
[0080] The image processing module uses MATLAB to perform morphological analysis on the berth images. Morphological analysis includes operations on the image using structuring elements, such as dilation, erosion, opening, and closing operations, to achieve purposes such as target region extraction, shape analysis, and image restoration.
[0081] Morphological analysis operations specifically include: dilation: expanding the boundaries of objects in an image outward to increase their area, filling holes within objects, and connecting adjacent objects; erosion: shrinking the boundaries of objects in an image inward to reduce their area, thereby removing small noise at object boundaries; opening: performing erosion followed by dilation to remove small noise points while preserving the overall shape of the object; closing: performing dilation followed by erosion to fill small holes within objects while preserving the overall shape of the object; hit-or-miss transform: used to detect specific shapes or patterns.
[0082] The connected component recognition module is used to identify connected components in berth area images and extract the attributes of connected components.
[0083] The connected component identification module extracts attributes of connected components including area and eccentricity. By restricting the area and eccentricity of connected components in the berth area image, the berth area is further filtered.
[0084] The connected component recognition module uses MATLAB to perform connected component recognition on the berth image. Connected component recognition is the identification of connected regions or connected components in a binary image, specifically regions composed of adjacent pixels.
[0085] Connected component identification methods include: Connected component labeling: assigning a unique label to each connected component in an image by calling the bwlabel and bwconncomp functions in MATLAB; Region filling: using the imfill function in MATLAB to gradually expand the filling pixels outward from the seed point until the filled region is no longer connected to the background; Connected component analysis: using the regionprops function in MATLAB to analyze the shape, area, perimeter, and other features of the identified connected components.
[0086] The area of a connected volume is measured by the number of velocity limits it contains.
[0087] The centroids of the berth area image and the vehicle area image are the center points of the areas where berth frames may exist and the areas where vehicles may exist, respectively.
[0088] The centroid clustering module is used to calculate the centroid of the region image and cluster the centroids of the berth region image.
[0089] The centroid clustering module uses the K-means algorithm to cluster the centroids of the berth area image to determine the orientation of the berth frame, and determines the location of the vehicle based on the centroid of the vehicle area image.
[0090] The steps of the K-means algorithm include: pre-determining the number of categories in the dataset; randomly selecting a certain number of centroids for initialization and iterating; assigning each data point to the cluster containing the nearest centroid according to the Euclidean distance; for each cluster, calculating the mean of all data points in the cluster and updating the position of the centroid; and iterating repeatedly until the centroids no longer change or the predetermined number of iterations is reached.
[0091] The position determination module is used to determine the relative position of the parking space and the vehicle based on their center of gravity.
[0092] Determine the centroid of the vehicle area image and a straight line perpendicular to the direction of the parking space based on the orientation of the parking space frame and the location of the vehicle.
[0093] The relative positions of the berth and the vehicle are determined by analyzing whether a straight line in the direction of the berth and a straight line passing through the centroid of the vehicle area image and perpendicular to the direction of the berth intersect in the captured image, and whether the intersection point is located inside the berth frame.
[0094] Example 2:
[0095] Based on the aforementioned embodiments, the process of implementing the berth detection method based on a large model is described using three typical cases as examples.
[0096] By calling the CLIP library and setting the scanning window width to 100, areas in the captured image that may contain berth outlines can be identified.
[0097] The CLIP model is used to output fixed-size feature vectors from captured images and descriptive text about parking spaces and vehicles. These feature vectors are then normalized to obtain the similarity between the captured images and the descriptive text. A threshold of 0.23 is set to filter out green boxes with similarities below the threshold, and the remaining windows are designated as red boxes. The approximate determination of the parking space outline is as follows: Figure 3 As shown.
[0098] Window with berth frame and other interfering factors, such as Figure 4 As shown, it includes both the berth wireframe and other interfering images; only the window of the berth wireframe is shown. Figure 5 As shown, it only contains the pure berth wireframe, with a single target, making it relatively easy to identify; windows without berth wireframes are as follows: Figure 6 As shown, the berth frame is not included.
[0099] Three typical window diagrams are shown below. Figure 7 As shown in the image, the content of the windows is captured, and each window is a small image block of 100*100 pixels.
[0100] Binarized images of three typical examples are as follows: Figure 8 As shown in the figure, the results of binarization are displayed for three example window images.
[0101] Morphological analysis results as follows Figure 9 As shown, Figure 8 The right-hand image clearly lacks a continuous bar frame, making morphological analysis impossible. Therefore, morphological analysis was performed only on the left-hand and middle images, using a disk filled with a radius of 3 pixels. Figure 8 The strip-shaped holes in the left and middle images were thus obtained. Figure 9 The result.
[0102] according to Figure 9 After morphological analysis, connected component regions were identified from the image, and their coordinates were calculated. The results of the connected component identification are as follows: Figure 10 As shown, the area within the red box represents the identified connected regions.
[0103] Based on the connectivity property, berth areas that do not meet the requirements are further filtered. The filtering criteria are an eccentricity greater than 0.8 and an area greater than 100. The berth areas after the second filtering are as follows: Figure 11 As shown, there are a total of 8 windows.
[0104] according to Figure 11The red box shown in the image calculates the centroid of the berth area image and obtains its coordinates. The position of the centroid of the berth area image is as follows: Figure 12 As shown.
[0105] The results of berth wireframe recognition are as follows Figure 13 As shown, based on the clustering results, centroids 1, 2, and 3 were obtained through linear regression. Figure 13 The fitted straight line in green is obtained by linear regression of centroids 4, 5, 6, 7, and 8. Figure 13 The blue fitted lines roughly represent the direction of the berth frame.
[0106] By calling the CLIP library and setting the scanning window width to 250, areas in the captured image that may contain vehicles are identified. The centroid position of the vehicle area image is as follows: Figure 14 As shown, the window with the highest similarity, i.e. the area within the red box, is taken as the result of this vehicle location identification.
[0107] A summary diagram of the elements is shown below. Figure 15 As shown, Figure 13 Take the middle line of the two green and blue lines representing the parking space frame to get a yellow line. The yellow line represents the average direction of the parking space. Draw a purple line through the green centroid representing the vehicle position in the orthogonal direction of the yellow line. The purple line represents the direction in which the vehicle is located perpendicular to the parking space.
[0108] The yellow and purple lines represent the average direction of the berth and the direction of the vehicle perpendicular to the berth, respectively. The intersection of these two line equations is determined. If the intersection point exists and is within the berth area, the vehicle is considered to be in the berth; otherwise, the vehicle is considered to be outside the berth. The equations of the two lines are as follows:
[0109]
[0110]
[0111] Finally, the coordinates of the intersection point are (272.6519, 488.7201), which are within the parking space range, so the vehicle is determined to be in the parking space.
[0112] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media containing computer-usable program code.
[0113] The present invention can provide computer program instructions to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which are executed by the processor of the computer or other programmable data processing device, produce means for implementing the system.
[0114] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that perform the functions of the system.
[0115] 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 of the system.
Claims
1. A berth detection system based on a large model, characterized in that, include: The image recognition module is used to identify areas in a captured image that may contain parking space outlines and areas that may contain vehicles using a cross-modal contrastive learning method. The cross-modal contrastive learning method includes mapping the captured image and descriptive text to a common vector space using a CLIP multimodal model. The scanning window width for identifying parking space outlines is set to 100, and the scanning window width for identifying vehicles is set to 250. The image processing module is used to filter berth areas and vehicle areas based on the similarity between multimodal data and to perform binarization and morphological analysis on the filtered berth area images. The morphological analysis includes performing dilation, erosion, closing and opening operations, specifically including filling operations using a disk structure element with a radius of 3 pixels. The connected component recognition module is used to identify connected components in the berth area image and extract the attributes of the connected components. It performs secondary screening of the berth area by restricting the attributes of the connected components in the berth area image. The secondary screening conditions are that the eccentricity is greater than 0.8 and the area is greater than 100. The attributes of the connected components include area and eccentricity. The area is measured by the number of speed limits contained in the connected component. The centroid clustering module is used to calculate the centroid of the region image and cluster the centroids of the berth region image using the K-means algorithm to determine the orientation of the berth frame. Specifically, linear regression is performed on the two clustered centroids to obtain two straight lines, and the midline of the two lines is taken as the orientation of the berth frame. The location of the vehicle is determined based on the centroid of the vehicle region image. The position determination module is used to determine the relative position of the parking space and the vehicle by drawing a straight line through the centroid of the vehicle area image and perpendicular to the parking space direction, based on the orientation of the parking space frame and the vehicle's location.
2. The system according to claim 1, characterized in that: The image recognition module outputs the captured image and the descriptive text about the parking space and the vehicle as image feature vectors and text feature vectors, respectively. It then matches and retrieves the image feature vectors and text feature vectors to obtain the areas in the captured image where the parking space outline may exist and the areas where the vehicle may exist.
3. The system according to claim 2, characterized in that: The image processing module normalizes the image feature vector and the text feature vector to obtain the similarity between the captured image and the descriptive text.
4. The system according to claim 3, characterized in that: The similarity between the captured image and the descriptive text is the dot product between the image feature vector and the text feature vector.
5. The system according to claim 4, characterized in that: The similarity threshold between the captured image and the descriptive text is 0.
23.
6. The system according to claim 1, characterized in that: The initial cluster centers of the K-means algorithm are adaptively determined based on the aspect ratio of the berth wireframe.
7. The system according to claim 1, characterized in that: The relative positions of the berth and the vehicle are determined by analyzing whether a straight line in the direction of the berth and a straight line passing through the centroid of the vehicle area image and perpendicular to the direction of the berth intersect in the captured image, and whether the intersection point is located inside the berth frame.
8. A berth detection method based on a large model, characterized in that: The method is implemented based on the system described in any one of claims 1-7: The method includes: A cross-modal contrastive learning method is used to identify areas in captured images that may contain parking space outlines and areas that may contain vehicles. Parking space areas and vehicle areas are selected based on the similarity between multimodal data, and the selected parking space area images are binarized and subjected to morphological analysis. Connectivity identification is performed on the berth area image, and the attributes of the connected components are extracted. The berth area is then further filtered by restricting the attributes of the connected components in the berth area image. The centroids of the area images are calculated, and the centroids of the berth area images are clustered. After clustering, the parking space address direction and the vehicle's location in the image are planned; The relative positions of the two are determined by the center of gravity of the berth and the vehicle.
9. A computer device comprising a processor and a memory, the processor being connected to the memory, the memory being used to store computer programs, characterized in that: The processor is configured to execute a computer program stored in the memory, such that the computer device performs at least one step of the berth detection method based on a large model as described in claim 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is run, it implements at least one step of the berth detection method based on a large model as described in claim 8.
Citation Information
Patent Citations
Parking space identification method and system based on fisheye cameras and medium
CN107993488A
Information processing method, server, parking method, parking system and vehicle
CN117671989A
Road non-standard parking identification method
CN118366107A