Automatic identification method, system, device and medium for regulating parking
By collecting parking space status images under different lighting and weather conditions, performing bounding box and classification annotations, and using the feature extraction layer weights of the target detection model to initialize the classification model, the problems of the recognition model being easily affected by the environment and having poor generalization ability in the existing technology are solved, and high-precision parking standard recognition is achieved.
Patent Information
- Application Number
- CN202511208356.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Existing technologies for identifying parking regulations suffer from poor generalization ability and are susceptible to environmental influences, leading to reduced accuracy.
By collecting parking space status images under different lighting and weather conditions, performing bounding box and classification annotations, a high-quality and diverse training dataset is constructed. The classification model is initialized using the feature extraction layer weights of the object detection model, and the classification model is trained to achieve high-precision recognition of parking space status.
It significantly improved the model's convergence speed and generalization ability, increased recognition accuracy, reduced false alarms and misreports, and enhanced the system's stability and reliability.
Smart Images

Figure CN120748208B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a method, system and device for automatically identifying non-standard parking and a medium. BACKGROUND
[0002] With the rapid development of intelligent parking management systems, there is an increasing demand for automatic identification and regulation of vehicle parking behavior in parking lots. For automatic identification of non-standard parking behavior, existing technologies usually rely on manual rule setting or use a single image recognition method for judgment. However, this method has low recognition accuracy in complex lighting, changing weather and other actual scenarios, and is difficult to adapt to diverse parking lot layouts and parking methods. Moreover, traditional methods often directly use general classification models for training, resulting in slow model convergence speed and poor generalization ability, which cannot meet the high precision and efficiency requirements in actual deployment.
[0003] Therefore, the existing technology has the technical problem of low recognition accuracy of the recognition model in the process of identifying parking standards, which is easily affected by the environment and has poor generalization ability. SUMMARY
[0004] The main purpose of the present application is to provide a method, system and device for automatically identifying non-standard parking and a medium, which aims to solve the technical problem of low recognition accuracy of the recognition model in the process of identifying parking standards in the existing technology.
[0005] In order to achieve the above-mentioned purpose of the application, a method for automatically identifying non-standard parking is provided, which comprises:
[0006] Obtaining parking space state images taken under different lighting and weather conditions, and labeling the boundary boxes of the preset key parts in the parking space state images;
[0007] Classifying and labeling all parking space state images based on a preset recognition type to obtain a classification data set;
[0008] Inputting the parking space state images labeled with boundary parts into a target detection model for target detection training;
[0009] Based on the classification labeling of the classification data set, replacing the detection head in the trained target detection model with a classification head, and initializing the model using the feature extraction layer weights corresponding to the target detection training process to obtain a classification model;
[0010] Training the classification model on the classification data set to obtain an automatic identification model;
[0011] Based on the trained automatic identification model, identifying the real-time collected parking space state images to determine whether the vehicle is parked according to the standard.
[0012] Further, the step of acquiring parking space state images taken under different lighting and weather conditions and labeling the boundary boxes of preset key parts in the parking space state images comprises:
[0013] Using a camera or a patrol robot, the parking space state images are taken at fixed time intervals or triggered by specific events under different lighting conditions and different weather conditions;
[0014] Based on the labeling tool, the boundary boxes are drawn to enclose the positions of each preset key part, and the corresponding class labels of each boundary box are recorded;
[0015] The labeled parking space state images and boundary box information are integrated into a structured data set.
[0016] Further, the step of classifying and labeling all parking space state images based on the preset recognition type to obtain a classification data set comprises:
[0017] The recognition type for automatically identifying standard parking is obtained, wherein the recognition type includes standard parking, non-standard parking, and empty parking space;
[0018] The classification rules of each recognition type are determined;
[0019] Based on the image labeling tool, the set recognition type and classification rules are used to classify and label each parking space state image;
[0020] All classified and labeled parking space state images and their corresponding class labels are integrated to form a classification data set.
[0021] Further, the step of inputting the boundary part labeled parking space state image into the target detection model for target detection training comprises:
[0022] All labeled parking space state images are divided into a training set and a validation set according to a preset ratio;
[0023] The model weight is initialized, the images in the training set are input into the YOLOv11 model, the prediction result and the loss value are calculated, and the model weight is updated through back propagation and optimization algorithm;
[0024] At the end of each training round, the model performance is evaluated using the validation set, and the hyperparameters are adjusted according to the evaluation results of the validation set;
[0025] Based on the adjusted hyperparameters, the iteration is continued until the model converges, and the target detection training is completed.
[0026] Further, the step of obtaining a classification model based on the classification dataset, replacing the detection head in the trained target detection model with a classification head, and initializing the model with the feature extraction layer weights corresponding to the target detection training process, comprises:
[0027] loading the target detection model file that has completed training, and extracting the corresponding feature extraction layer weights;
[0028] identifying and removing the original detection head of the target detection model, and adding a new classification head to the feature extraction layer;
[0029] loading the extracted feature extraction layer weights into the target detection model with the added new classification head, and initializing the model to obtain a classification model initialized based on the target detection model.
[0030] Further, the step of training the classification dataset using the classification model to obtain an automatic recognition model, comprises:
[0031] configuring training hyperparameters based on the initialized classification model and the pre-labeled classification dataset to obtain training configuration parameters;
[0032] based on the training configuration parameters, inputting the classification data in the classification dataset into the classification model in batches, performing forward propagation and calculating the loss value to obtain the current training loss;
[0033] based on the training loss, updating the model parameters through backpropagation to obtain an updated classification model;
[0034] at the end of each training round, evaluating the performance of the updated classification model based on the validation set to obtain a model evaluation result;
[0035] based on the model evaluation result, dynamically adjusting the training parameters and continuing training until the termination condition is met to obtain a trained automatic recognition model.
[0036] Further, the step of identifying the real-time collected parking space state image based on the trained automatic recognition model to determine whether the vehicle is parked according to the specification, comprises:
[0037] real-time shooting of the parking space state image;
[0038] preprocessing the collected parking space state image;
[0039] inputting the preprocessed image into the trained automatic recognition model for feature extraction and classification prediction;
[0040] determining whether the current parking space is parked according to the specification according to the prediction result output by the model;
[0041] If not parked according to the specification, a corresponding early warning notice is generated.
[0042] The second aspect of the present application provides an automatic identification system for parking according to the specification, comprising:
[0043] A boundary labeling module is configured to acquire parking space state images taken under different light and weather conditions, and label a boundary box for a preset key part in the parking space state images.
[0044] A classification labeling module is configured to label all the parking space state images based on a preset identification type, to obtain a classification data set.
[0045] A target detection module is configured to input the parking space state images labeled with the boundary parts into a target detection model, and perform target detection training.
[0046] A classification replacement module is configured to replace a detection head in the trained target detection model with a classification head based on the classification labeling of the classification data set, and initialize the model using the feature extraction layer weight corresponding to the target detection training process, to obtain a classification model.
[0047] A classification training module is configured to train the classification data set using the classification model, to obtain an automatic identification model.
[0048] A parking identification module is configured to identify the real-time collected parking space state images based on the trained automatic identification model, to determine whether a vehicle is parked according to the specification.
[0049] The third aspect of the present application further provides a device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0050] The fourth aspect of the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of any one of the above methods.
[0051] Advantages
[0052] By collecting parking space state images under various lighting and weather conditions and performing boundary box labeling and classification labeling, a high-quality and diversified training dataset is constructed, so that the model can better adapt to complex environmental changes. The method uses the feature extraction layer weight initialized by the target detection model to initialize the classification model, realizes knowledge transfer, and significantly improves the convergence speed and generalization ability of the model. On this basis, through further training and deployment of the classification model, high-precision recognition of the parking space state can be realized in practical applications. Compared with the traditional method relying on artificial rules or general models, the scheme not only has higher recognition accuracy, but also greatly reduces the false positives and false negatives caused by environmental interference or insufficient model generalization ability, improves the stability and reliability of the system judgment, and has good practical application value. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 A flowchart of an automatic identification method of a standard parking according to an embodiment of the present application;
[0054] Figure 2 A structural schematic block diagram of an automatic identification system of a standard parking according to an embodiment of the present application;
[0055] Figure 3 A structural schematic block diagram of a computer device according to an embodiment of the present application;
[0056] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical scheme and advantages of the present application more clear, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0058] Those skilled in the art can understand that, unless specifically stated, the singular forms "a", "an" and "the" used herein also include the plural forms. It should be further understood that the use of the term "comprise" in the specification of the present application means that a feature, integer, step, operation, element, module and / or component exists, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, modules, components and / or their combinations. It should be understood that when an element is said to be "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be an intermediate element. In addition, the "connection" or "coupling" used herein can include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any module and all combinations of the associated listed items.
[0059] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as such herein.
[0060] Reference Figure 1 The embodiment of the application provides an automatic identification method for standard parking, comprising steps S1-S6, specifically:
[0061] S1, acquiring parking space state images under different lighting and weather conditions, and marking the boundary boxes of preset key parts in the parking space state images;
[0062] S2, classifying and labeling all parking space state images based on a preset identification type to obtain a classification data set;
[0063] S3, inputting the parking space state images marked with boundary parts into a target detection model for target detection training;
[0064] S4, replacing the detection head in the trained target detection model with a classification head based on the classification labeling of the classification data set, and initializing the model using the feature extraction layer weight corresponding to the target detection training process to obtain a classification model;
[0065] S5, training the classification data set using the classification model to obtain an automatic identification model;
[0066] S6, identifying the real-time collected parking space state images based on the trained automatic identification model to determine whether the vehicle is parked according to the standard.
[0067] In step S1, the parking space state images are shot under different lighting conditions (such as day, night, cloudy day, etc.) and different weather conditions (such as sunny day, rainy day, snowy day, etc.), and the boundary boxes of the preset key parts in these images are marked. Collecting images under various environmental conditions can ensure that the training data set contains rich samples, which helps to improve the generalization ability of the model in actual application. In this way, the system can maintain high recognition accuracy regardless of strong light, shadow or bad weather. If it is found that there are insufficient samples under certain conditions (such as extreme weather), targeted supplementary collection can be carried out without changing the overall system architecture. Using the pre-collected and labeled data set for model training can effectively reduce the online processing time and computing resource consumption, and improve the response speed and working efficiency of the overall system.
[0068] When collecting corresponding parking space status images, a camera or a patrol robot can be used to take parking space status images at fixed time intervals (e.g., every 10 minutes) or triggered by specific events (e.g., immediately take a picture when a vehicle is detected entering the area). Then, using professional image labeling tools such as LabelImg or RectLabel, the key parts in each collected parking space status image are labeled with a bounding box. Key parts usually include parking lines, limiters, parked vehicles, etc. During the labeling process, each bounding box needs to be assigned a class label to identify the type of object enclosed by the box. For example, for a car parked in a parking space, a bounding box needs to be drawn and labeled as a "vehicle" class; similarly, parking lines and limiters also need to be labeled separately. After completing the labeling, all parking space status images with labeling information will be integrated into a structured data set. This process not only involves the image itself, but also the bounding box coordinates and their corresponding class labels and other metadata associated with them. This data set will serve as an important resource for the training of the target detection model in the subsequent steps.
[0069] Step S1 provides high-quality and diverse real-world data for subsequent model training. This not only helps to improve the accuracy of subsequent model training, but also enables the final developed automatic recognition model to adapt to various complex environmental changes, thereby more reliably determining whether a vehicle is parked according to regulations. In addition, this method can effectively reduce the workload of manual patrol and reduce operating costs.
[0070] As described in step S2 above, first, the identification types for automatic identification of standard parking are defined, mainly including "standard parking", "non-standard parking", and "empty parking space". The definition of these types helps the subsequent classification task. For example, "standard parking" means that the vehicle is completely parked within the parking lines and is in the correct direction; "non-standard parking" may include situations where the vehicle partially exceeds the parking lines, does not park according to the specified direction, etc.; and "empty parking space" means that the parking space is currently not occupied by a vehicle. After determining these classification rules, use professional image labeling tools (such as LabelImg or CVAT) to perform detailed classification labeling on each parking space status image according to the specified identification types. For each image, carefully check and mark which of the above three categories it belongs to. For example, in an image, if a car is parked accurately within the parking lines and is in the correct direction, it is marked as "standard parking".
[0071] Next, all the classified and labeled parking space status images and their corresponding class labels are integrated to form a classification dataset. During this process, it is necessary to ensure that the dataset is representative and contains samples under various lighting conditions and weather conditions, so as to ensure that the trained model has high generalization ability. In addition, in order to improve the training effect of the model, attention should also be paid to balancing the number ratio between different classes to avoid model bias caused by excessive or insufficient samples of a certain class.
[0072] Step S2 can significantly improve the accuracy of the final automatic recognition system by precise classification and reasonable construction of the dataset. For example, in an actual case, a parking lot management company wants to optimize the efficiency of parking management by introducing an intelligent parking management system. By performing step S2, they can systematically organize a large number of clearly labeled parking space status images, covering various scenarios from daytime to nighttime, sunny to rainy, and accurately distinguishing between which parking spaces are normally parked, which have irregularities, and which are in an idle state. This not only provides a solid data foundation for subsequent model training, but also greatly improves the recognition accuracy and reliability of the system, enabling management personnel to more efficiently monitor the parking situation in the parking lot, reducing the need for manual patrols, and thus reducing operating costs.
[0073] As shown in step S3 above, first, all the collected and labeled parking space status images need to be divided into training set and validation set according to a certain proportion (e.g. 8:2). This division not only helps the effective training of the model, but also can evaluate the model performance through the validation set to ensure that the model also performs well on unseen data. Next, initialize the model weights. For example, choose YOLOv11 as the basic framework of the target detection model. Use the image data in the training set to input the YOLOv11 model, calculate the loss value between the predicted result and the true label, and update the model weights through the backpropagation algorithm. In each iteration process, the network parameters are adjusted according to the loss value to gradually optimize the model performance. At the end of each training round, the performance of the current model is evaluated using the validation set, such as mean precision (mAP), recall rate, etc. Based on these evaluation results, further adjust the hyperparameters such as learning rate, batch size, etc. to find the best model configuration.
[0074] Step S3, through high-quality target detection model training, can accurately identify key objects (such as vehicles, parking lines) in the parking space, thereby providing accurate spatial positioning information for the next classification task. For example, in a specific parking lot case, through target detection model training on a large number of parking space images taken under different lighting conditions and weather conditions, the system can effectively distinguish between normal parking, non-standard parking, and idle parking. This not only improves the efficiency of parking lot management and reduces the need for manual inspection, but also improves the transparency and fairness of parking space use, allowing parking lot managers to promptly identify and correct non-standard parking behavior, thereby optimizing the use of parking lot resources. Through such a process, a complete closed loop from data collection, model training to actual application is achieved, demonstrating the practical application value and technical advancement of the technical solution.
[0075] Step S4 is the key step of converting the trained target detection model into a classification model, which is to replace the detection head (Detection Head) of the target detection model with a classification head (Classification Head) and initialize the model using the feature extraction layer weights from the target detection training process. This process not only ensures that the new model can inherit the spatial positioning ability of the original model, but also enhances its ability to classify parking space status.
[0076] First, load the trained target detection model file and extract the feature extraction layer weights from it. These weights contain a lot of spatial information about key objects in the parking space (such as vehicles, parking lines, etc.), which is the basis for accurate recognition. Next, identify and remove the original detection head of the target detection model, which is mainly used to predict the position of the bounding box and the class label, and is not necessary for the classification task. Then, add a new classification head after the feature extraction layer, which is designed to process the feature map output by the feature extraction layer and make the final classification decision according to the pre-set classification types (such as standard parking, non-standard parking, and empty parking). In this process, the Xavier initialization method is used to initialize the weights of the newly added classification head, which helps to keep the variance of the input signal consistent between network layers, thereby speeding up the training process and improving model stability.
[0077] After completing the above structure adjustment, the newly constructed classification model is trained using the previously prepared classification data set. Since the classification model directly inherits the weights of the feature extraction layer, it can exhibit good performance in the early stages. In addition, this two-stage training strategy effectively solves the problem of single model being difficult to balance spatial positioning and classification judgment, improving the overall recognition accuracy.
[0078] As an example, let's say a parking lot wants to introduce an intelligent parking management system to improve its efficiency. In step S3, a target detection model that can accurately identify the position of vehicles within parking spaces has been successfully trained using the YOLOv11 model. Next, in step S4, the detection head of this model is replaced with a classification head, and the model is retrained based on the previously defined classification rules (standard parking, non-standard parking, empty parking space). The benefits of this are obvious: on the one hand, the new model can fully utilize the spatial positioning capabilities of the existing model; on the other hand, it can also make more accurate classification judgments based on the specific state of the parking space. For example, in some complex situations, even if the vehicle partially exceeds the parking line, it can still be accurately identified as "standard parking" by the classification head. Complex situations refer to those where there is slight overstepping, but overall, it does not affect the normal entry and exit or parking experience of other vehicles. In such cases, the system needs to have some flexibility and intelligent judgment capabilities to decide whether to consider this as "standard parking." Here are some specific explanations:
[0079] Minor overstepping: The vehicle may slightly exceed the parking line due to tight parking design or driving skills, but it does not affect the use of adjacent parking spaces.
[0080] Special parking layout: Some parking lots may have special parking layouts, such as locations near pillars or corners, allowing for a certain degree of positional deviation.
[0081] Obstacle influence: In some cases, temporary obstacles (such as construction materials, decorative items, etc.) may cause the actual available range of the parking line to shrink, so even if the vehicle appears to have crossed the parking line, it has not actually occupied public space.
[0082] By using a classification model instead of just target detection, more contextual information (such as the surrounding environment, the state of adjacent parking spaces, etc.) can be combined to make more reasonable judgments. For users, the likelihood of receiving warnings due to minor violations is reduced, improving the parking experience. Traditional methods based on target detection usually rely on strict bounding box positioning for judgment, i.e., as long as any part of the vehicle exceeds the predetermined parking line range, it will be marked as "unstandard parking". This method is simple and direct, but lacks flexibility in the face of the above complex situations. In contrast, the invention uses a two-round training strategy (target detection + classification) and reuses the feature extraction layer weights through transfer learning, so that the final classification model not only inherits the spatial positioning ability of target detection, but also can adjust the judgment standard flexibly according to the specific situation. This method shows higher accuracy and adaptability in handling complex scenes compared to traditional schemes that rely solely on target detection. Therefore, it can be said that this method provides a more detailed and more realistic solution than existing technology in certain complex situations. Not only does it improve the robustness and generalization ability of the system, but it also provides strong technical support for the development of intelligent parking lots. This process demonstrates a smooth transition from target detection to classification tasks, reflecting the high flexibility and technical content of the technical solution.
[0083] As described in step S5 above, first, based on the completed initialization of the classification model and the pre-labeled completed classification data set, configure the necessary training hyperparameters, including learning rate, batch size, number of iterations, etc. The selection of these hyperparameters directly affects the speed and effect of model training. For example, a smaller learning rate may require more iterations to reach convergence, but may result in more stable training results; while a larger batch size helps to speed up the training process, but may also lead to increased memory consumption. Therefore, in actual operation, it needs to be weighed and adjusted according to the specific situation.
[0084] Next, the classification data set is input into the classification model in batches, and forward propagation is performed to calculate the loss value. Here, the cross-entropy loss function is used as the evaluation standard, as it can effectively measure the difference between the predicted value and the true label. After each forward propagation, the model parameters are updated through the backpropagation algorithm to minimize the loss value. In this process, the gradient descent method is one of the most commonly used optimization algorithms, whose basic idea is to adjust the model parameters in the direction of the fastest decline in the loss function value. In addition, momentum terms or adaptive learning rate methods (such as the Adam optimizer) can be introduced to further improve training efficiency and stability.
[0085] At the end of each training round, the current model performance is evaluated based on the validation set, and the training parameters are dynamically adjusted according to the evaluation results. This step is crucial for preventing overfitting. Common evaluation metrics include accuracy, recall, and F1 score, etc. If it is found that the model's performance on the validation set begins to decline, it may be that overfitting has occurred, at which point measures such as regularization (such as L2 regularization), increasing data augmentation measures, or terminating training early can be considered to improve the model's generalization ability.
[0086] For a specific example, suppose a parking lot wants to improve management efficiency through an intelligent parking system. After step S4 is completed, a preliminary classification model has been built. Now enter step S5, using the large amount of collected parking space status images labeled as "standard parking", "unstandard parking" and "empty parking" as a classification dataset for model training. In this process, through careful setting of training hyperparameters and continuous adjustment and optimization of strategies, an excellent automatic recognition model is finally obtained. This model not only accurately judges the parking status of vehicles in various complex environments, but also discovers and reports any unstandard behavior in a timely manner. Compared with the traditional method of relying on manual patrol, this method significantly improves work efficiency, reduces the possibility of human error, and greatly reduces operating costs. At the same time, due to the use of advanced training techniques and optimization algorithms, the developed model has higher robustness and generalization ability, and can adapt to the actual needs of different parking lots.
[0087] As described in step S6 above, in actual application, the system needs to continuously obtain real-time parking space status images from cameras or inspection robots. These images may come from different angles, be taken under different lighting conditions, and may be affected by weather changes (such as rain and snow). In order to ensure the quality of input data, pre-processing operations are usually performed on the collected images, including but not limited to resizing, cropping, normalization, etc., to facilitate subsequent feature extraction and classification prediction. For example, by adjusting all input images to a uniform size (such as 224x224 pixels), the design of the model input layer can be simplified and the calculation speed can be accelerated.
[0088] Next, the pre-processed images are input into the already trained automatic recognition model. Based on the classification model trained in the previous steps, the model can efficiently perform feature extraction and classification prediction. Specifically, the model will first use its feature extraction layer to extract key features from the input image, which contain important information about the parking space status. Then, the classification head part will make a final classification decision based on the extracted features - whether the current parking space status belongs to "standard parking", "unstandard parking" or "empty parking". In this process, the probability distribution output by the model reflects the likelihood of each class, and the class with the highest probability is the model's prediction result.
[0089] If the model determines that the parking space status is "irregular parking", the system will generate a corresponding warning notification to prompt the management personnel to further check or take measures. The warning notification can be sent in various ways, such as SMS, email or directly displayed on the parking lot management system interface. In addition, in order to improve the reliability and accuracy of the system, a secondary confirmation mechanism can also be introduced, such as combining historical data or other sensor information (such as ultrasonic sensor detection distance) to verify the prediction results of the model.
[0090] In an embodiment, when it is detected that a vehicle has entered a preset first range from the target parking space, continuous parking space status images during the vehicle's driving are obtained based on the deployed automatic recognition model, the front wheel and rear wheel positions in the images are identified, and the front wheel and rear wheel bounding box information and pixel coordinates are extracted; based on the bounding box and spatial coordinate information of the front wheel and rear wheel, the angle deviation value of the current wheel relative to the parking line is calculated, and the final possible parking direction and position of the vehicle are predicted in combination with the current attitude of the vehicle; whether there is a risk of irregular parking is evaluated according to the angle deviation value and the prediction result, and if there is, corresponding electronic guidance instructions are generated to prompt the vehicle owner to adjust the driving direction or parking position of the vehicle;
[0091] In this embodiment, based on the automatic recognition model that has been completed in step S5, the vehicle entering the parking space area is continuously monitored. Once it is detected that a vehicle starts to approach or enter the preset first range from the target parking space, the dynamic monitoring mode is started, and the parking space state image is continuously collected. The current position of the vehicle and its bounding box information are obtained using the existing target detection model; for each detected wheel, its shape, size, color and other visual features are extracted, and its spatial coordinates relative to the parking line and other reference points are recorded; based on the extracted wheel bounding box information, the direction angle of the wheel is calculated, which can be calculated by the geometric method to calculate the angle between the wheel center point connecting line and the parking line, or the straight line is detected and the angle is calculated using the Hough transform algorithm. Analyze the trend of the wheel's posture change, combine the overall moving track of the vehicle, and predict the final possible parking position and posture of the vehicle. According to the angle and position relationship of the wheel, it is evaluated whether there is a risk of irregular parking during the parking of the vehicle. For example, if it is found that the angle of the front wheel or rear wheel deviates too much, it may cause the vehicle to fail to park correctly in the parking space. Specific parking guidance information is automatically generated, such as "please adjust the steering wheel to make the front wheel parallel to the parking line", or "please adjust 0.5 meters to the left front". These guidance information can be sent directly to the mobile phone APP of the vehicle owner or the electronic display screen in the parking lot. During the process of the vehicle owner adjusting the position of the vehicle according to the guidance, the system continues to track the state change of the wheel, and updates the guidance information in time until the vehicle is confirmed to be parked safely and in compliance. In order to capture the trend and regularity of the vehicle motion, time series modeling can be added based on the original automatic recognition model, using LSTM (Long Short Term Memory Network), GRU (Gated Recurrent Unit) or Transformer to handle the dependency relationship between consecutive frames, and establishing a regression layer in the automatic recognition model, receiving the historical position and speed of the vehicle as input, and outputting the future coordinates and direction angle.
[0092] In an embodiment, the step of acquiring parking space state images taken under different lighting and weather conditions, and labeling the preset key parts in the parking space state images with bounding boxes comprises:
[0093] S10, using a camera or a patrol robot, taking parking space state images under different lighting conditions and different weather conditions at fixed time intervals or triggered by specific events;
[0094] S11, based on the labeling tool, draw the bounding box, circle the position of each preset key part, and record the corresponding class label of each bounding box;
[0095] S12, integrate the labeled parking space state images and bounding box information into a structured data set.
[0096] In this embodiment, in order to obtain parking space state images taken under different lighting and weather conditions, and to label the boundary boxes of the preset key parts in these images, a camera or a patrol robot is first used to take parking space state images at fixed time intervals or under specific event triggers under various lighting conditions and weather conditions. This process ensures the diversity of the dataset, thereby improving the robustness of the model in actual application. For example, data collected under different conditions such as day and night, sunny and rainy days can cover a wider range of scene changes, making the trained model more adaptable to complex and variable actual environments.
[0097] Next, each parking space state image collected is processed using a professional labeling tool to draw boundary boxes to enclose the positions of each preset key part, such as vehicles, parking lines, and limiters, and to record the class labels corresponding to each boundary box. This step requires accurately marking the specific positions of various objects and their classes to facilitate the subsequent target detection model to learn accurate spatial positioning information. For example, in an image, a vehicle is parked in a parking space, so a boundary box needs to be drawn for it and labeled as "vehicle", and the parking lines and limiters also need to be labeled with corresponding boundary boxes and classes.
[0098] After labeling is completed, all labeled parking space state images and their boundary box information are integrated into a structured dataset. This not only includes the original images themselves, but also covers the position coordinates, size, and corresponding class labels of each boundary box and other metadata. The dataset constructed in this way can be conveniently used in the training process of the target detection model. For example, in a parking lot management project, through a systematic data collection and labeling process, a large-scale dataset containing thousands of images can be established, which details the parking space usage under various lighting and weather conditions. The advantage of this is that it provides rich and high-quality data resources for subsequent model training, ensuring that the model has high recognition accuracy and generalization ability, while also reducing the workload of manual patrols and improving the efficiency of parking lot management. Ultimately, the model trained based on such a dataset can accurately determine whether a vehicle is parked normally in actual application, significantly improving the intelligent level of parking lot management.
[0099] In an embodiment, the step of classifying and labeling all parking space state images based on the preset recognition types to obtain a classification dataset comprises:
[0100] S20, obtaining a recognition type for automatically identifying normal parking, wherein the recognition type includes normal parking, abnormal parking, and empty parking;
[0101] S21, determining the classification rules for each recognition type;
[0102] S22, based on the image labeling tool, classify and label each parking space state image according to the set recognition type and classification rule;
[0103] S23, integrate all the classified and labeled parking space state images and their corresponding class labels to form a classification data set.
[0104] In this embodiment, in the process of realizing classification and labeling of all parking space state images based on the preset recognition type, it is necessary to first determine the recognition type for automatic identification of standard parking, which includes but is not limited to standard parking, non-standard parking and empty parking space. It is essential to define the classification rules of each type, for example, "standard parking" means that the vehicle is completely within the parking line and is in the correct direction; "non-standard parking" may involve the vehicle partially exceeding the parking line or not parking in the specified direction; and "empty parking space" means the state of no vehicle occupation. These rules provide clear standards for subsequent data labeling.
[0105] Next, using professional image labeling tools (such as LabelImg or CVAT), each parking space state image is carefully classified and labeled according to the set recognition type and classification rule. This process not only requires accurate labeling of the state category of each parking space, but also ensures the consistency and accuracy of the data. For example, in an image, if a car is parked accurately in the parking space and is in the correct direction, the image should be labeled as "standard parking". After completing the classification and labeling of all images, these detailed class label information is integrated into a structured data set for subsequent model training.
[0106] The advantage of this step is that it directly determines the quality and effect of subsequent model training. Through rigorous classification rules and detailed labeling process, the generated data set can have high representativeness and practicality. Taking a specific parking lot management project as an example, by accurately classifying and labeling thousands of parking space state images under different lighting conditions and weather conditions, a high-quality data set can be constructed, which not only helps to improve the accuracy and robustness of the automatic identification model, but also significantly improves the intelligent level of the parking lot management system, reduces the need for manual patrol, and optimizes resource utilization.
[0107] In an embodiment, the step of inputting the boundary site labeled parking space state image into the target detection model for target detection training includes:
[0108] S30, divide all the labeled parking space state images into training set and validation set according to the preset proportion;
[0109] S31, initialize the model weight, input the images in the training set into the YOLOv11 model, calculate the prediction result and loss value, and update the model weight through back propagation and optimization algorithm;
[0110] S32, at the end of each training round, the model performance is evaluated using the validation set, and the hyperparameters are adjusted based on the corresponding evaluation results of the validation set;
[0111] S33, based on the adjusted hyperparameters, continue iteration until the model converges, and complete the target detection training.
[0112] In this embodiment, during the process of target detection training, first of all, all the labeled parking space images need to be divided into training set and validation set according to the preset proportion. This process ensures that the model can be evaluated on unseen data, so as to better measure its generalization ability. Generally, 80% of the data is used as the training set, and 20% of the data is used as the validation set, but the specific proportion can be adjusted according to the actual situation.
[0113] Next, after initializing the model weights, the images in the training set are input into the YOLOv11 model. YOLOv11 can efficiently process a large amount of data and provide accurate bounding box prediction. By calculating the loss value between the prediction result and the true label, and using the back propagation algorithm to update the model weight, the model performance is gradually optimized. In this process, choosing the right optimization algorithm (such as Adam or SGD) and the appropriate learning rate is crucial, as they directly affect the speed of model convergence and the final effect.
[0114] At the end of each training round, the performance of the current model is evaluated using the validation set, which includes but is not limited to average precision (mAP), recall rate and other key indicators. Based on these evaluation results, hyperparameters such as learning rate, batch size, etc. can be dynamically adjusted to find the best configuration. For example, if it is found that the model's performance on the validation set starts to decline, it may mean that overfitting is occurring, at which time the problem can be alleviated by reducing the learning rate or increasing the regularization strength.
[0115] The advantage of this step is that it lays a solid foundation for subsequent classification tasks. Through high-quality target detection model training, key objects (such as vehicles, parking lines) in the parking space can be accurately identified, providing accurate spatial positioning information for classification tasks.
[0116] In an embodiment, the classification annotation based on the classification data set replaces the detection head in the trained target detection model with a classification head, and uses the feature extraction layer weight corresponding to the target detection training process to initialize the model, to obtain the steps of the classification model, comprising:
[0117] S40, load the target detection model file that has completed training, and extract the corresponding feature extraction layer weight;
[0118] S41, identify and remove the original detection head of the target detection model, and add a new classification head to the feature extraction layer;
[0119] S42, load the extracted feature extraction layer weight to the target detection model added with the new classification head, and perform model initialization to obtain a classification model based on the target detection model initialization.
[0120] In the embodiment, the efficient construction of the classification model is realized by structural reconstruction and parameter migration of the trained target detection model. First, a trained target detection model file (such as YOLOv11) is loaded, which has been trained on a large number of parking space state images with boundary box annotations and has good spatial feature extraction capability. Then the weight parameters of the feature extraction layer (usually including a deep network structure composed of convolution layer, BN layer, activation function, etc.) are extracted. These weights contain highly abstract expressions of key visual elements (such as edges, textures, shapes, etc.) in the image, which can effectively represent the spatial relationship between the parking space and the vehicle.
[0121] Then, the detection head part of the original target detection model is removed, which is responsible for predicting the position and category of the boundary box. This part of the structure is complex and is specifically used for detection tasks, and cannot directly serve the classification needs. Then, a new classification head structure is connected to the output end of the feature extraction layer. The classification head is usually composed of a global average pooling layer (Global Average Pooling, GAP), a fully connected layer (Fully Connected Layer) and a Softmax classifier. Its function is to compress the high-dimensional feature map into a fixed-length feature vector and map it to a pre-set category space (such as “standard parking”, “unstandard parking” and “empty parking space”). This process realizes the conversion from spatial positioning information to semantic classification information.
[0122] Finally, the feature extraction layer weight extracted before is loaded into the reconstructed model, and the parameters of the new classification head are initialized (Xavier or He initialization method can be used), and the initialization of the entire classification model is completed. Since the feature extraction part has been fully trained, the model convergence speed can be significantly accelerated, the generalization performance can be improved, and the instability and data dependency problems caused by starting from zero training can be avoided.
[0123] The core advantage of this step is to fully utilize the knowledge transfer ability of the existing model, to realize the decoupling and adaptation of model structure and task target through a two-stage training strategy (first detection and then classification), and to solve the technical problem that a single model is difficult to balance spatial modeling and classification judgment. For example, in a certain intelligent parking lot project, the classification model constructed by the system through this method can accurately identify whether the vehicle is parked normally under complex light changes. Even if there is partial occlusion or slight overline, it can make reasonable judgments based on the context information provided by the feature extraction layer, thereby improving the intelligent recognition level and actual deployment feasibility of the overall system.
[0124] In an embodiment, the step of training the classification data set using the classification model to obtain the automatic recognition model comprises:
[0125] S50, based on the initialized classification model and the pre-labeled classification data set, configure training hyperparameters to obtain training configuration parameters;
[0126] S51, based on the training configuration parameters, input the classification data in the classification data set into the classification model in batches, perform forward propagation and calculate the loss value to obtain the current training loss;
[0127] S52, based on the training loss, update the model parameters through back propagation to obtain the updated classification model;
[0128] S53, at the end of each training round, evaluate the performance of the updated classification model based on the validation set to obtain the model evaluation result;
[0129] S54, based on the model evaluation result, dynamically adjust the training parameters, and continue training until the termination condition is met, to obtain the trained automatic recognition model.
[0130] The process of training the classification data set using the classification model to obtain the automatic recognition model in this embodiment is an efficient and closed-loop deep learning modeling process. First, based on the initialized classification model (i.e. the classification structure migrated from the target detection model) and the pre-labeled classification data set (containing three types of images: "normal parking", "abnormal parking", and "empty parking"), reasonable training hyperparameters are configured, including learning rate, batch size, optimizer type (such as Adam or SGD), loss function (such as cross-entropy loss), and regularization strategy (such as weight decay), etc., to form complete training configuration parameters.
[0131] Subsequently, in the training phase, the classification dataset is input into the classification model in batches, forward propagation is performed to calculate the output result, and the current training loss is calculated by comparing with the true label. This step relies on an efficient tensor operation framework (such as PyTorch or TensorFlow) to ensure that the feature information flows correctly between layers and generates accurate prediction values.
[0132] Next, through the backpropagation algorithm, the model parameters are updated according to the calculated loss value, and the optimizer is used to adjust the network weights, so that the model gradually converges to a better state. To prevent overfitting, techniques such as Dropout mechanism, data augmentation (such as rotation, cropping, color disturbance) can be introduced to improve the model's generalization ability.
[0133] After each complete training round (epoch), the current model performance is evaluated using the validation set, mainly focusing on the trend of accuracy, recall rate, F1 score and other indicators. If the performance of the validation set continues to improve, it means that the model is in good training state; otherwise, it may need to dynamically adjust the learning rate, early stopping or switch optimization strategies.
[0134] Finally, based on the above evaluation results, continuous iteration and optimization are carried out until the preset termination conditions (such as reaching the maximum number of training rounds, the validation loss does not decrease for a certain number of rounds, etc.) are met, so as to obtain the trained automatic recognition model. This model has the ability to quickly and accurately classify real-time collected parking space images and intelligently judge whether the vehicle is parked normally.
[0135] The core advantage of this training process is that it fully utilizes the strong feature extraction capability provided by the pre-target detection model, combined with fine-tuning of the classification task, to achieve efficient adaptation of model structure and task target. For example, in the deployment scenario of a large commercial parking lot, the system can stably identify different types of parking behavior under complex light changes, even with slight over-the-line, occlusion or shadow interference, and can make accurate judgments, greatly improving management efficiency and intelligent level, and embodying the technical advancement and engineering feasibility of the present scheme in practical application.
[0136] In an embodiment, the step of identifying the real-time collected parking space image based on the trained automatic recognition model to determine whether the vehicle is parked according to the specification includes:
[0137] S60, real-time shooting of a parking space image;
[0138] S61, performing a preprocessing operation on the collected parking space image;
[0139] S62, inputting the preprocessed image into the trained automatic recognition model for feature extraction and classification prediction;
[0140] S63, judging whether the current parking space is parked according to the specification according to the prediction result output by the model;
[0141] S64, if not parked according to the specification, generating a corresponding early warning notice.
[0142] In this embodiment, through the camera or inspection robot deployed in the parking lot, the parking space state image is captured in real time according to the set time interval or triggered by the event (such as vehicle driving in / out). These images cover different light, weather conditions, and ensure the applicability of the system.
[0143] Next, a series of preprocessing operations are performed on the collected original images, including but not limited to size normalization (such as uniform scaling to 224x224 pixels), color space conversion (such as RGB to grayscale or HSV to enhance robustness), histogram equalization (to enhance contrast), and noise suppression. These processes aim to improve image quality, make it more suitable for model input requirements, and enhance the model's ability to adapt to complex environmental changes.
[0144] Subsequently, the preprocessed image is input into the trained automatic recognition model. The model is based on the classification structure migrated from the previous target detection model, and has good feature extraction and semantic discrimination ability. After receiving the image, the model first passes through the feature extraction layer for high-dimensional feature coding, and then outputs the probability distribution of the corresponding three categories ("standard parking", "non-standard parking", "empty parking space") by the classification head. Finally, the decision is made according to the maximum probability category.
[0145] If the model output is "non-standard parking", the system triggers the early warning mechanism, generates an early warning notice and sends it to the relevant personnel through the specified channel (such as management platform pop-up window, SMS, APP push), realizes timely intervention and management. The core advantage of this step is its efficiency and practicality. The model inherits the strong generalization ability brought by the two-stage training strategy in the early stage, and can work stably in various complex environments. For example, in an actual deployment case, even if there is slight over-the-line, shadow blocking, etc. The model can still accurately judge whether it constitutes a violation, thereby avoiding false positives and false negatives. This not only improves the intelligent level of parking lot management, but also significantly reduces the cost of manual inspection, and reflects the technical maturity and engineering feasibility of the scheme in the application.
[0146] Reference Figure 2 is the structure block diagram of the automatic identification system of the standard parking in an embodiment of the present application, the system comprises:
[0147] The boundary labeling module 100 is configured to obtain parking space state images captured under different lighting and weather conditions, and label a boundary box of a preset key part in the parking space state images.
[0148] The classification labeling module 200 is configured to label all the parking space state images based on a preset identification type, to obtain a classification data set.
[0149] The target detection module 300 is configured to input the parking space state images labeled with the boundary part into a target detection model, and perform target detection training.
[0150] The classification replacement module 400 is configured to replace a detection head in the trained target detection model with a classification head based on the classification labeling of the classification data set, and initialize a model using feature extraction layer weights corresponding to a target detection training process, to obtain a classification model.
[0151] The classification training module 500 is configured to train the classification data set using the classification model, to obtain an automatic identification model.
[0152] The parking identification module 600 is configured to identify a real-time collected parking space state image based on the trained automatic identification model, to determine whether a vehicle is parked according to a specification.
[0153] Further, the boundary labeling module 100 comprises:
[0154] The acquisition unit is configured to use a camera or a patrol robot to capture parking space state images at fixed time intervals or under specific event triggers under different lighting conditions and different weather conditions.
[0155] The labeling unit is configured to draw a boundary box based on a labeling tool, to enclose a position of each preset key part, and to record a category label corresponding to each boundary box.
[0156] The integration unit is configured to integrate the labeled parking space state images and boundary box information into a structured data set.
[0157] Further, the classification labeling module 200 comprises:
[0158] The type acquisition unit is configured to obtain an identification type for automatically identifying a specification parking, wherein the identification type comprises a specification parking, an un-specification parking, and an empty parking space.
[0159] The rule determination unit is configured to determine a classification rule of each identification type.
[0160] The classification labeling unit is configured to label each parking space state image based on an image labeling tool, using a set identification type and a classification rule.
[0161] The classification integration unit is configured to integrate all the classified and labeled parking space state images and corresponding category labels to form a classification data set.
[0162] Further, the target detection module 300 comprises:
[0163] The division unit is configured to divide all the labeled parking space state images into a training set and a verification set according to a preset proportion.
[0164] The training execution unit is configured to initialize model weights, input images in the training set into a YOLOv11 model, calculate a prediction result and a loss value, and update the model weights through back propagation and an optimization algorithm.
[0165] The evaluation and adjustment unit is configured to evaluate model performance using the verification set at the end of each training round, and adjust hyperparameters according to the evaluation result corresponding to the verification set.
[0166] The iterative convergence unit is configured to continue iteration until the model converges based on the adjusted hyperparameters, and complete target detection training.
[0167] Further, the classification replacement module 400 comprises:
[0168] The weight extraction unit is configured to load a target detection model file that has completed training, and extract corresponding feature extraction layer weights.
[0169] The structure replacement unit is configured to identify and remove an original detection head of the target detection model, and add a new classification head to the feature extraction layer.
[0170] The model initialization unit is configured to load the extracted feature extraction layer weights into the target detection model to which the new classification head is added, and perform model initialization to obtain a classification model based on the target detection model initialization.
[0171] Further, the classification training module 500 comprises:
[0172] The configuration setting unit is configured to configure training hyperparameters based on the classification model that has completed initialization and the classification data set that has completed pre-labeling, to obtain training configuration parameters.
[0173] The forward calculation unit is configured to input classification data in the classification data set into the classification model in batches based on the training configuration parameters, perform forward propagation, and calculate a loss value to obtain a current training loss.
[0174] The parameter updating unit is configured to update model parameters through back propagation based on the training loss, to obtain an updated classification model.
[0175] a model evaluation unit, configured to evaluate performance of the updated classification model based on the validation set at the end of each training round to obtain a model evaluation result;
[0176] a training optimization unit, configured to dynamically adjust training parameters based on the model evaluation result, and continue training until a termination condition is met to obtain a trained automatic identification model.
[0177] Further, the parking identification module 600 comprises:
[0178] an image acquisition unit, configured to capture a parking space state image in real time;
[0179] an image preprocessing unit, configured to perform a preprocessing operation on the acquired parking space state image;
[0180] a feature classification unit, configured to input the preprocessed image into the trained automatic identification model to perform feature extraction and classification prediction;
[0181] a parking judgment unit, configured to determine whether the current parking space is parked according to a specification according to a prediction result output by the model;
[0182] a warning generation unit, configured to generate a corresponding warning notification if the parking space is not parked according to the specification.
[0183] Reference Figure 3 In the embodiments of the present application, a computer device is also provided, which can be a server, and the internal structure thereof can be as shown in Figure 3The computer device shown in the figure includes a processor, an internal memory, a storage medium (non-volatile storage medium), and a network interface connected by a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes the above-mentioned storage medium (non-volatile storage medium) and internal memory. The storage medium (non-volatile storage medium) stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the storage medium (non-volatile storage medium). The database of the computer device is used to store the use data and the like in the process of the automatic identification method of the standard parking. The network interface of the computer device is used to communicate with the external terminal through the network connection. Further, the above-mentioned computer device can also be provided with an input device and a display screen and the like. The above-mentioned computer program is executed by the processor to realize an automatic identification method of standard parking, which includes the following steps: boundary box labeling is performed on the parking space state image; all parking space state images are classified and labeled based on a preset identification type to obtain a classification data set; the parking space state image labeled by the boundary part is input into a target detection model for target detection training; based on the classification labeling of the classification data set, the detection head in the trained target detection model is replaced with a classification head, and the model is initialized using the feature extraction layer weight corresponding to the target detection training process to obtain a classification model; the classification model is used to train the classification data set to obtain an automatic identification model; and based on the trained automatic identification model, the real-time collected parking space state image is identified to determine whether the vehicle is parked according to the standard. Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied.
[0184] The computer readable storage medium of the embodiment of the present application stores a computer program, and the computer program is executed by the processor to realize an automatic identification method of standard parking, which includes the following steps: boundary box labeling is performed on the parking space state image; all parking space state images are classified and labeled based on a preset identification type to obtain a classification data set; the parking space state image labeled by the boundary part is input into a target detection model for target detection training; based on the classification labeling of the classification data set, the detection head in the trained target detection model is replaced with a classification head, and the model is initialized using the feature extraction layer weight corresponding to the target detection training process to obtain a classification model; the classification model is used to train the classification data set to obtain an automatic identification model; and based on the trained automatic identification model, the real-time collected parking space state image is identified to determine whether the vehicle is parked according to the standard. It can be understood that the computer readable storage medium in the embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0185] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, databases, or other media in this application and in embodiments refers to both non-volatile and / or volatile memory. Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), or external cache memory. As an illustration and not a limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus DRAM (RDRAM), direct Rambus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0186] It should be noted that in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, so that processes, devices, articles, or methods that include a series of elements not only include those elements, but also include other elements not explicitly listed, or include elements inherent to such processes, devices, articles, or methods. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, device, article, or method that includes the element.
[0187] The above description is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. An automatic identification method for properly parked vehicles, characterized in that, The method includes: Acquire parking space status images under different lighting and weather conditions, and mark the preset key parts in the parking space status images with bounding boxes; All parking space status images are classified and labeled based on preset recognition types to obtain a classification dataset; Input the parking space status image marked at the boundary into the target detection model for target detection training; Based on the classification labels of the classification dataset, the detection head in the pre-trained object detection model is replaced with a classification head, and the model is initialized using the weights of the feature extraction layer corresponding to the object detection training process to obtain the classification model; A classification model is used to train a classification dataset to obtain an automatic recognition model; The trained automatic recognition model is used to identify real-time images of parking space status and determine whether vehicles are parked in accordance with regulations. The classification labeling based on the classification dataset involves replacing the detection head in the pre-trained object detection model with a classification head, and initializing the model using the weights of the feature extraction layer corresponding to the object detection training process to obtain the classification model. The steps include: Load the pre-trained object detection model file and extract the corresponding feature extraction layer weights; Identify and remove the original detection head of the target detection model, and add a new classification head in the feature extraction layer; The extracted feature extraction layer weights are loaded into the object detection model with a new classification head, and the model is initialized to obtain a classification model based on the object detection model initialization.
2. The automatic identification method for standardized parking according to claim 1, characterized in that, The step of acquiring parking space status images under different lighting and weather conditions, and marking the preset key parts in the parking space status images with bounding boxes, includes: Use cameras or inspection robots to capture images of parking space status at fixed time intervals or triggered by specific events under different lighting and weather conditions. The bounding box is drawn using the annotation tool to delineate the position of each preset key part, and the category label corresponding to each bounding box is recorded; The labeled parking space status images and bounding box information are integrated into a structured dataset.
3. The automatic identification method for standardized parking according to claim 1, characterized in that, The step of classifying and labeling all parking space status images based on a preset recognition type to obtain a classification dataset includes: Acquire the identification type for automatically identifying compliant parking, wherein the identification type includes compliant parking, non-compliant parking, and empty parking space; Determine the classification rules for each identification type; Based on image annotation tools, each parking space status image is classified and annotated using the set recognition type and classification rules; All parking space status images that have been classified and labeled, along with their corresponding category labels, are integrated to form a classification dataset.
4. The automatic identification method for standardized parking according to claim 1, characterized in that, The step of inputting the parking space status image marked at the boundary into the target detection model for target detection training includes: All labeled parking space status images are divided into training and validation sets according to a preset ratio; Initialize the model weights, input the images from the training set into the YOLOv11 model, calculate the prediction results and loss values, and update the model weights through backpropagation and optimization algorithms. At the end of each training round, the model performance is evaluated using the validation set, and the hyperparameters are adjusted based on the evaluation results of the validation set. Based on the adjusted hyperparameters, continue iterating until the model converges, completing the object detection training.
5. The automatic identification method for standardized parking according to claim 1, characterized in that, The step of training a classification dataset using a classification model to obtain an automatic recognition model includes: Based on the initialized classification model and the pre-labeled classification dataset, configure the training hyperparameters to obtain the training configuration parameters; Based on the training configuration parameters, the classification data in the classification dataset is input into the classification model in batches, forward propagation is performed and the loss value is calculated to obtain the current training loss. Based on the training loss, the model parameters are updated through backpropagation to obtain the updated classification model; At the end of each training round, the performance of the updated classification model is evaluated based on the validation set to obtain the model evaluation results; The training parameters are dynamically adjusted based on the model evaluation results, and training continues until the termination condition is met, resulting in a fully trained automatic recognition model.
6. The automatic identification method for standardized parking according to claim 1, characterized in that, The step of identifying real-time parking space status images based on a trained automatic recognition model to determine whether vehicles are parked according to regulations includes: Real-time capture of parking space status images; Preprocess the collected parking space status images; The preprocessed image is input into the trained automatic recognition model for feature extraction and classification prediction. Based on the prediction results output by the model, determine whether the current parking space is parked in accordance with regulations; If the parking does not comply with the regulations, a corresponding warning notification will be generated.
7. An automatic identification system for properly parked vehicles, used to execute the automatic identification method for properly parked vehicles as described in any one of claims 1-6, characterized in that, include: The boundary annotation module is used to acquire images of parking space status under different lighting and weather conditions, and to annotate the preset key parts in the parking space status images with bounding boxes. The classification and labeling module is used to classify and label all parking space status images based on preset recognition types to obtain a classification dataset; The object detection module is used to input the parking space status image marked at the boundary into the object detection model for object detection training; The classification replacement module is used to replace the detection head in the trained object detection model with the classification head based on the classification label of the classification dataset, and to initialize the model using the weights of the feature extraction layer corresponding to the object detection training process to obtain the classification model; The classification training module is used to train a classification model on a classification dataset to obtain an automatic recognition model; The parking recognition module is used to identify real-time parking space status images based on a trained automatic recognition model to determine whether vehicles are parked in accordance with regulations.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Parking standard identification method and device, computer equipment and storage medium
CN113496162A
Bicycle standard parking identification method based on improved YOLOv5
CN118314534A