Vehicle identification method, system and computer readable storage medium
By identifying and matching the characteristics of the vehicle except for the license plate, the problem of vehicle identification when the license plate is damaged or not registered is solved, and fast and accurate vehicle identification and service provision are achieved, improving user experience and vehicle information security.
Patent Information
- Application Number
- CN202411154793.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-22
AI Technical Summary
In the prior art, when identifying new energy vehicles and fuel vehicles, the license plate is damaged or the new car is not registered, it is difficult to accurately determine the vehicle type, resulting in parking or charging services being denied, affecting user experience and service quality.
By identifying features other than license plates, we can determine whether the vehicle can enter the target area. We use image feature matching and deep learning models to extract vehicle features, prioritize the matching of vehicle logos, models and models, reduce the number of feature extraction and matching times, and improve recognition Efficiency and accuracy.
It realizes that even if the license plate is damaged or not registered, charging or parking services can be obtained in a timely manner, improving user experience, and reducing the collection of license plate privacy information, protecting car owners' privacy, and improving vehicle information security.
Smart Images

Figure CN118658143B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information identification, and more specifically, to a vehicle identification method, system and computer-readable storage medium. Background Art
[0002] With the rapid development of new energy vehicles, independent parking spaces for new energy vehicles and fuel vehicles have also developed rapidly. However, the phenomenon of fuel vehicles occupying new energy vehicle parking spaces, fuel vehicles occupying charging parking spaces, or new energy vehicles occupying fuel vehicle parking spaces has continued to occur, which is very unfavorable to the management of parking spaces.
[0003] In view of the above situation, the common method at present is to identify new energy vehicles or fuel vehicles by identifying the color of the vehicle's license plate, and grant the vehicle permission to enter the target area based on the identification result. However, in actual scenarios, there are often situations where the vehicle license plate is damaged or a new car does not have time to get a license plate and needs to be parked. This may cause the customer's parking or charging needs to be unmet, or the vehicle needs to be manually inspected and decided whether to release the vehicle. Sometimes, it is even necessary to mobilize additional personnel to conduct the inspection, which greatly wastes the driver's time. Summary of the invention
[0004] In view of this, the purpose of the embodiments of the present application is to provide a vehicle identification method, system and computer-readable storage medium, so that even if the vehicle is newly purchased and has not been registered in time or the license plate is damaged and has not been replaced in time, the corresponding charging or parking services can be obtained in time, thereby improving the user experience.
[0005] In a first aspect, an embodiment of the present application provides a vehicle identification method, comprising: matching a first feature of a target image with a second feature in a database; wherein the target image is an image of a target area and / or surroundings of the target area, and the first feature is a feature other than a license plate of the vehicle; when the first feature matches the second feature, determining that the vehicle in the target image is the target vehicle; when the vehicle in the target image is the target vehicle, granting the vehicle permission to enter the target area; wherein the target area includes an area where the target vehicle can be parked.
[0006] In the above implementation process, the present application determines whether a vehicle can enter the target area by identifying features other than the license plate. Even if the vehicle is newly purchased and has not been licensed in time or the license plate is damaged and has not been replaced in time, the corresponding charging or parking services can be obtained in time, thereby improving the user experience. In addition, the vehicle can be identified without collecting or storing the license plate of the vehicle, that is, the collection of private information such as the license plate can be reduced, which can protect the privacy of the owner and improve the security of vehicle information.
[0007] In one embodiment, the first feature includes: a first image feature and a first vehicle feature, and the second feature includes a second image feature and a second vehicle feature; wherein the first vehicle feature and the second vehicle feature include multiple features; matching the first feature of the target image with the second feature in a database includes: matching the first image feature with the second image feature; if the first image feature does not match the second image feature, extracting the first vehicle feature in the target image; matching the first vehicle feature with the second vehicle feature in order of priority; if the first feature matches the second feature, determining that the vehicle in the target image is the target vehicle, includes: if the first vehicle feature matches the second vehicle feature, determining that the vehicle in the target image is the target vehicle.
[0008] In one embodiment, the first vehicle feature includes: a first vehicle logo, and the second vehicle feature includes: a second vehicle logo; matching the first vehicle feature and the second vehicle feature in order of priority includes: matching the first vehicle logo and the second vehicle logo; if the first vehicle logo is not matched with the second vehicle logo, matching other first vehicle features with other second vehicle features; if the first feature matches with the second feature, determining that the vehicle in the target image is the target vehicle includes: if other first vehicle features match with other second vehicle features, determining that the vehicle in the target image is the target vehicle.
[0009] In one embodiment, the first vehicle feature further includes: a first vehicle model and a first vehicle model, and the second vehicle feature further includes: a second vehicle model and a second vehicle model; when the first vehicle logo is not matched with the second vehicle logo, matching other first vehicle features with other second vehicle features includes: matching the first vehicle model with the second vehicle model; when the first vehicle model is not matched with the second vehicle model, matching the first vehicle model with the second vehicle model; when the first feature is matched with the second feature, determining that the vehicle in the target image is the target vehicle includes: when the first vehicle model is matched with the second vehicle model, determining that the vehicle in the target image is the target vehicle.
[0010] In the above implementation process, when determining whether the vehicle in the target image is the target vehicle, the first image feature is used for judgment. When the vehicle in the target image is determined to be the target vehicle through the first image feature, there is no need to extract the first vehicle feature in the target image, which can reduce the vehicle feature recognition in the vehicle recognition process and improve the vehicle recognition efficiency. In addition, by setting the priority order, when matching the first vehicle feature and the second vehicle feature, the vehicle logo that can better reflect the target vehicle is matched first. When the vehicle logo fails to match, the vehicle model is further matched. When both the vehicle logo and the vehicle model fail to match, the vehicle model is matched. This method of matching various vehicle features layer by layer can reduce the number of feature extractions in the matching process, reduce the number of matches, improve vehicle recognition efficiency, and improve vehicle matching accuracy.
[0011] In one embodiment, when the first image feature does not match the second image feature, extracting the first vehicle feature in the target image includes:
[0012] When the first image feature does not match the second image feature, determine whether the target image contains a vehicle based on the similarity between the first image feature and the second image feature; and when the target image contains a vehicle, extract the first vehicle feature in the target image.
[0013] In the above implementation process, the first vehicle feature in the target image is extracted only after it is determined that there is a vehicle in the target image. This can avoid extracting invalid first vehicle features when there is no vehicle in the target image, thereby improving vehicle recognition efficiency.
[0014] In one embodiment, matching the first vehicle feature and the second vehicle feature in order of priority includes: calculating the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature by cosine similarity or Euclidean distance in order of priority; and determining a matching result between the first vehicle feature and the second vehicle feature according to the similarity.
[0015] In the above implementation process, since cosine similarity is insensitive to the specific numerical value, only the direction difference of the vector needs to be paid attention to. By using cosine similarity to calculate the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature, the difficulty of data processing can be reduced and the efficiency and accuracy of data processing can be improved.
[0016] In one embodiment, before matching the first feature of the target image with the second feature in the database, the method also includes: applying a regularization factor in the scaling layer behind each convolutional layer of the deep learning model each time the deep learning model is trained using a training image set; wherein the training image set is a plurality of images containing vehicles; counting the weights of each scaling layer to which the regularization factor is applied, and calculating a cumulative value based on global statistical information; cropping the trained deep learning model based on the cumulative value and a preset cropping value; continuing to train the cropped deep learning model using the training image set until a set iteration condition is met to generate a target detection model; and extracting the first feature in the target image using the target detection model.
[0017] In the above implementation process, during the training of the target detection model, the trained basic detection model is pruned, and then the pruned deep learning model is continued to be trained to obtain the target detection model. Unimportant parameters or structures in the target detection model can be removed, which can significantly reduce the size of the target detection model and reduce the resource usage of the target detection model to reduce storage and operation pressure. In addition, the underlying features such as edges and textures in the target image can be captured through the convolutional layer in the target detection model, and more representative high-level features can be formed through layer-by-layer abstraction, which is applicable to a variety of vehicle features and can increase the application scenarios of the vehicle recognition method.
[0018] In one embodiment, after matching the first feature of the target image with the second feature in the database, the method further includes: if the first feature does not match the second feature, determining whether a vehicle in the target image is in an emergency; and if the vehicle in the target image is in an emergency, granting the vehicle permission to enter the target area.
[0019] In the above implementation process, when it is determined that the vehicle is not the target vehicle, it continues to determine whether the vehicle is in an emergency situation. When the vehicle is in an emergency situation, the vehicle is given permission to enter the target area to give priority to emergency situations, improve the flexibility of releasing the target area, and enhance the user experience.
[0020] In one embodiment, before matching the first feature of the target image with the second feature in the database, the method further includes: storing the second vehicle feature and the association relationship through a relational database; wherein the association relationship is the relationship between the second vehicle feature and the target vehicle; and storing the second image feature through a NoSQL database.
[0021] In the above implementation process, by storing the second vehicle features and the association relationship in a relational database, the target vehicle and the second vehicle features corresponding to the target vehicle can be stored. The relational database can improve the integrity and efficiency of data storage through structured data organization, standardized SQL operation language and strict data integrity control. In addition, since the NoSQL database has the characteristics of flexible data model, high performance and easy expansion, the performance and flexibility of data storage can be improved by storing the second image features in the NoSQL database.
[0022] In one embodiment, the method further includes: acquiring a vehicle image of a newly released vehicle; extracting a second feature of the vehicle image of the newly released vehicle; and updating the database according to the second feature.
[0023] In the above implementation process, when a new car is released, the vehicle image of the newly released vehicle is obtained in time, and the database is updated according to the second feature of the newly released vehicle, which can improve the accuracy and completeness of the second data in the database.
[0024] In one embodiment, the first feature includes: a first characteristic feature, and the second feature includes: a second characteristic feature; the method further includes: extracting the first characteristic feature from the target image when the vehicle passes through the target area; matching the first characteristic feature with the second characteristic feature in a database; updating the second characteristic feature in the database through the first characteristic feature when the first characteristic feature does not match the second characteristic; and determining the parking fee according to the time difference between obtaining the first characteristic and the second characteristic when the first characteristic matches the second characteristic.
[0025] In the above implementation process, in some scenarios where entry and exit of specific scenes need to be restricted, by setting the first characteristic feature in the target image to be extracted and matching the first characteristic feature with the second characteristic feature in the database, special vehicles can be identified, thereby increasing the application scenarios of the vehicle identification method.
[0026] In a second aspect, an embodiment of the present application further provides a vehicle identification system, comprising: a processing device, an image acquisition device and a locking device; the processing device is connected to the image acquisition device and the locking device; the image acquisition device is used to obtain a target image and send the target image to the processing device; the processing device is used to execute the vehicle identification method in the above-mentioned first aspect, or any possible implementation of the first aspect; the locking device is used to allow or deny the vehicle to enter the target area based on the identification result of the processing device.
[0027] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method in the above-mentioned first aspect, or any possible implementation of the first aspect.
[0028] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle identification method in the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0029] In order to make the above-mentioned objects, features and advantages of the present application more obvious and understandable, embodiments are given below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of the interaction between an electronic device, an image acquisition device, and a locking device provided in an embodiment of the present application;
[0032] Figure 2 A block diagram of an electronic device provided in an embodiment of the present application;
[0033] Figure 3 A flow chart of a vehicle identification method provided in an embodiment of the present application;
[0034] Figure 4 A flowchart of target detection model training provided in an embodiment of the present application;
[0035] Figure 5 A schematic diagram of the functional modules of a vehicle identification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application.
[0037] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0038] With the popularity of new energy vehicles, more and more parking lots and charging stations are beginning to adopt intelligent management systems to improve operational efficiency and service levels. These systems usually rely on license plate recognition technology to distinguish different types of vehicles, such as new energy vehicles and fuel vehicles, and provide corresponding services such as parking permissions or charging services. The color of the license plate is an important symbol to distinguish the type of vehicle. In China, new energy vehicles usually have green license plates, while traditional fuel vehicles use blue or other colored license plates.
[0039] After long-term research, the inventor of this application found that in actual applications, the license plate recognition system faces some challenges. For example, when the vehicle's license plate is damaged or unclear, or when a new car has not yet received a formal license plate, the license plate recognition system may not be able to correctly read the license plate information, resulting in an inability to accurately determine the type of vehicle. In this case, even if the vehicle urgently needs parking or charging services, it may be denied entry to the target area because the system cannot recognize it, which undoubtedly brings inconvenience to customers and also reduces the service quality and user experience of the parking lot or charging station.
[0040] In view of this, the present application proposes a vehicle identification method, which determines whether a vehicle can enter a target area by identifying features other than license plates. Even if the vehicle is newly purchased and has not been licensed in time or the license plate is damaged and has not been replaced in time, the corresponding charging or parking services can be obtained in time, thereby improving the user experience. In addition, the vehicle can be identified without collecting or storing the license plate of the vehicle, that is, the collection of private information such as license plates can be reduced, and the privacy of the owner can be protected while improving the security of vehicle information.
[0041] To facilitate understanding of this embodiment, a vehicle identification system that executes a vehicle identification method disclosed in an embodiment of the present application is first introduced in detail.
[0042] like Figure 1 , which is a schematic diagram of the interaction between various devices in the vehicle identification system provided in an embodiment of the present application, including: an electronic device 100, an image acquisition device 200 and a locking device 300.
[0043] The electronic device 100 is connected to communicate with one or more image acquisition devices 200 and locking devices 300 via a network.
[0044] The electronic device 100 is used to execute the vehicle identification method in the embodiment of the present application. The electronic device 100 can be a network server, a database server, or a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), or other devices. The electronic device 100 can be selected according to actual conditions.
[0045] The above-mentioned image acquisition device 200 is used to acquire a target image and send the target image to the electronic device 100. The image acquisition device 200 can be a camera, a webcam, etc. The image acquisition device can be selected according to actual conditions.
[0046] In one embodiment, the image acquisition device 200 is arranged around or in the target area. The image acquisition device should be arranged at a position that can capture the complete target area image.
[0047] Optionally, the image acquisition device 200 can acquire the target image in real time, or acquire the target image under a set trigger condition (for example, the trigger condition can be the detection of a person, a vehicle, an object, etc. in the target area), or acquire the target image at a set time interval. The method of acquiring the target image by the image acquisition device 200 can be selected according to actual conditions.
[0048] The image acquisition device 200 may send all target images to the electronic device 100 in real time, or may select part of the target images to send to the electronic device 100. For example, if the target images acquired by the image acquisition device 200 in a plurality of consecutive time frames are the same, the image acquisition device 200 may send the target image of one of the time frames to the electronic device 100. For another example, if the target images acquired by the image acquisition device 200 include blurred images, the image acquisition device 200 may not send the blurred target images to the electronic device 100, etc. The strategy of the image acquisition device 200 sending the target images to the electronic device 100 may be selected according to actual conditions.
[0049] The locking device 300 here can be used to receive the recognition result sent by the electronic device 100, and allow or deny the vehicle to enter the target area according to the recognition result of the electronic device 100. The locking device 300 can be a parking lock, a gate, a smart door, a lifting column, etc., and the locking device 300 can be selected according to actual conditions.
[0050] Optionally, the locking device 300 can be set at the entrance or exit of the target area, or inside the target area. For example, if the locking device 300 is a gate, the locking device 300 can be set at the entrance or exit of the target area. If the locking device 300 is a parking lock, the locking device 300 can be set inside the target area. The setting method of the locking device 300 can be selected according to actual conditions.
[0051] It should be understood that after receiving the identification result sent by the electronic device 100, the locking device 300 opens or closes according to the identification result, thereby allowing the vehicle to enter the target area or refusing to enter the target area.
[0052] For example, if the locking device 300 is a barrier gate, and the recognition result of the electronic device 100 is that the vehicle in the target image is the target vehicle, then the target area allows the vehicle in the target image to enter. At this time, after obtaining the recognition result of the electronic device 100, the barrier gate rotates upward until the length direction of the barrier gate is almost perpendicular to the ground. The vehicle can pass through the locking device 300 and enter the target area.
[0053] If the locking device 300 is a barrier gate, and the recognition result of the electronic device 100 is that the vehicle in the target image is not the target vehicle, then the target area does not allow the vehicle in the target image to enter. At this time, after obtaining the recognition result of the electronic device 100, the barrier gate rotates downward until the length direction of the barrier gate is almost parallel to the ground. The vehicle is intercepted by the locking device 300 and is prohibited from entering the target area.
[0054] If the locking device 300 is a parking lock, and the recognition result of the electronic device 100 is that the vehicle in the target image is the target vehicle, then the target area allows the vehicle in the target image to enter. At this time, after obtaining the recognition result of the electronic device 100, the parking lock spreads out in a plane parallel to the ground until the height of the parking lock in the direction perpendicular to the ground is lower than the set height. The vehicle can pass through the locking device 300 and enter the target area.
[0055] If the locking device 300 is a parking lock, and the recognition result of the electronic device 100 is that the vehicle in the target image is not the target vehicle, then the target area does not allow the vehicle in the target image to enter. At this time, after obtaining the recognition result of the electronic device 100, the parking lock gathers in a direction perpendicular to the ground until the height of the parking lock in the direction perpendicular to the ground is higher than the set height. The vehicle is prohibited from entering the target area under the obstruction of the parking lock.
[0056] The above-mentioned target area includes an area where the target vehicle can be parked, such as a parking lot, a parking space, a community, a company, etc. The target area can be selected according to actual conditions.
[0057] The target vehicle may be a vehicle of a set type, such as a new energy vehicle, a gasoline vehicle, an electric vehicle, etc. The target vehicle may be adjusted according to actual conditions.
[0058] To facilitate understanding of this embodiment, the electronic device that executes the vehicle identification method disclosed in the embodiment of the present application is introduced in detail below.
[0059] like Figure 2 , which is a block diagram of an electronic device. The electronic device 100 may include a memory 111 and a processor 113. A person skilled in the art may understand that Figure 2 The structure shown is only for illustration and does not limit the structure of the electronic device 100. For example, the electronic device 100 may further include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown.
[0060] The memory 111 and the processor 113 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements can be electrically connected to each other via one or more communication buses or signal lines. The processor 113 is used to execute the executable module stored in the memory.
[0061] The memory 111 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc. The memory 111 is used to store programs, and the processor 113 executes the program after receiving an execution instruction. The method executed by the electronic device 100 defined by the process disclosed in any embodiment of the present application can be applied to the processor 113, or implemented by the processor 113.
[0062] The processor 113 may be an integrated circuit chip with signal processing capability. The processor 113 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0063] The electronic device 100 in this embodiment can be used to execute each step in each method provided in the embodiments of the present application. The implementation process of the vehicle identification method is described in detail below through several embodiments.
[0064] See also Figure 3 , is a flow chart of the vehicle identification method provided in the embodiment of the present application. Figure 3 The specific process shown is described in detail.
[0065] Step 201: Match a first feature of a target image with a second feature in a database.
[0066] The target image is an image of the target area and / or the area around the target area. For example, if the target area is a parking lot, the target image may be an image of the parking lot, or an image of the parking lot and its surroundings. For another example, if the target area is a charging area for a charging pile, the target area may be an area where the charging pile is set, or an area such as the charging pile and the road around the charging pile. The acquisition range of the target image can be adjusted according to actual conditions.
[0067] The first feature here is a feature other than the license plate of the vehicle, and the first feature may include: a first image feature and a first vehicle feature. The first vehicle feature includes multiple features.
[0068] The first image feature refers to some features of the image itself, and the first vehicle feature refers to the features of the vehicle extracted from the target image.
[0069] Optionally, the first vehicle feature may include: a first vehicle logo, a first vehicle model, a first vehicle model and a first personality feature, etc. The first vehicle feature may be adjusted according to actual conditions.
[0070] The second feature mentioned above is the second image feature and the second vehicle feature of various types of vehicle images stored in advance. The second feature may include the image features and vehicle features of all vehicles on the market. Among them, the second vehicle feature includes multiple features.
[0071] Optionally, the second vehicle feature may include: a second vehicle logo, a second vehicle model, a second vehicle model, a second personal feature, a second license plate, and a second car dealer, etc. The second vehicle feature may be adjusted according to actual conditions.
[0072] In one embodiment, before step 201, the method further includes: preprocessing the target image, and extracting a first feature from the preprocessed target image.
[0073] Optionally, the preprocessing method may include: size adjustment, normalization, denoising, contrast enhancement, etc. The preprocessing method may be selected according to actual conditions.
[0074] Among them, the target image can be resized by cropping, scaling and other methods. The target image can be normalized by Z-Score standardization, linear normalization, decimal normalization and other methods. The noise in the target image can be removed by Gaussian filtering, median filtering and other methods. The contrast of the target image can be adjusted by histogram equalization, Gamma correction and other methods. The specific processing methods of the pre-processing methods such as resizing, normalization, denoising, and contrast enhancement can be adjusted according to actual conditions.
[0075] Optionally, when the first feature is matched with the second feature, a data structure such as a hash table or a KD tree may be used to retrieve the second feature in a database.
[0076] Step 202 : When the first feature matches the second feature, determining that the vehicle in the target image is the target vehicle.
[0077] Among them, the target vehicle is a special vehicle determined under some specific target areas. For example, when the target area is a new energy vehicle parking lot, the target vehicle is a new energy vehicle. When the target area is a residential parking lot, the target vehicle is a residential owner's vehicle. When the target area is a charging pile, the target vehicle is a new energy vehicle, etc. The target vehicle can be determined according to the target area.
[0078] It should be understood that when the first feature matches the second feature, it means that the vehicle corresponding to the first feature is the target vehicle, and it is determined that the vehicle corresponding to the first feature can enter the target area.
[0079] Step 203 : if the vehicle in the target image is the target vehicle, permission is granted to the vehicle to enter the target area.
[0080] The target area includes an area where the target vehicle can be parked.
[0081] Optionally, granting the vehicle access permission may include sending a license to the target vehicle; granting the vehicle access permission may also include opening a locking device. The method of granting the vehicle access permission may be selected according to actual conditions.
[0082] It should be understood that in some specific areas, only specific vehicles are usually allowed to enter. In this case, the vehicle needs to be verified first, and only after it is determined that the vehicle is a specific vehicle allowed to enter, the vehicle is allowed to enter. For ease of understanding, the following are some common scenarios for the vehicle identification method of this application:
[0083] Scenario 1: The target area is a new energy vehicle parking lot, and the target vehicle is a new energy vehicle. When the vehicle enters the entrance of the new energy parking lot, a target image including the vehicle can be obtained, and the first feature corresponding to the target image is matched with the second feature in the database. When the first feature matches the second feature, it is determined that the vehicle at the entrance of the new energy parking lot is a new energy vehicle, and the gate at the entrance of the new energy parking lot is controlled to open, and the vehicle can enter the new energy parking lot.
[0084] Scenario 2: The target area is a charging station, and the target vehicle is a new energy vehicle. When a vehicle enters the charging station entrance, a target image including the vehicle can be obtained, and the first feature corresponding to the target image is matched with the second feature in the database. When the first feature matches the second feature, it is determined that the vehicle at the charging station entrance is a new energy vehicle, and the gate at the charging station entrance is controlled to open, and the vehicle can enter the charging station.
[0085] Scenario 3: The target area is a certain community, and the target vehicle is a community owner's vehicle. Each owner's vehicle in the community can place or paste a special logo to indicate the community vehicle. When the vehicle enters the community gate entrance, the target image including the vehicle can be obtained, and the first feature corresponding to the target image (i.e., the special logo) can be matched with the second feature in the database (i.e., the special logo). When the first feature matches the second feature, it is determined that the vehicle at the community gate entrance is a community owner's vehicle, and the gate at the community gate entrance is controlled to open, and the vehicle can enter the community.
[0086] Scenario 4: The target area is a parking space, and the target vehicle is the designated vehicle to be parked in the parking space. The target vehicle may be placed or pasted with a personalized identification indicating that the vehicle can be parked in the parking space. When the vehicle reaches the vicinity of the parking space, a target image including the vehicle may be obtained, and the first feature (i.e., the personalized identification) corresponding to the target image may be matched with the second feature (i.e., the personalized identification) in the database. When the first feature matches the second feature, it is determined that the vehicle is the designated vehicle to be parked in the parking space, and the parking space lock is controlled to open, and the vehicle may be parked in the parking space.
[0087] The above-mentioned scenarios are merely exemplary, and the vehicle identification method in the embodiments of the present application can also be applied to more scenarios.
[0088] In the above implementation process, the present application determines whether a vehicle can enter the target area by identifying features other than the license plate. Even if the vehicle is newly purchased and has not been licensed in time or the license plate is damaged and has not been replaced in time, the corresponding charging or parking services can be obtained in time, thereby improving the user experience. In addition, the vehicle can be identified without collecting or storing the license plate of the vehicle, that is, the collection of private information such as the license plate can be reduced, which can protect the privacy of the owner and improve the security of vehicle information.
[0089] In a possible implementation, step 201 includes: matching the first image feature with the second image feature; if the first image feature does not match the second image feature, extracting the first vehicle feature in the target image; matching the first vehicle feature with the second vehicle feature in order of priority.
[0090] The first image feature and the second image feature here refer to the features of the entire image, such as shape features, spatial relationship features, key point features, hash features, etc. The specific feature types of the first image feature and the second image feature can be selected according to actual conditions.
[0091] It should be understood that after acquiring the target image, it is possible to first match the image features of the target image (i.e., the first image feature) with the image features in the database (i.e., the second image feature). If the first image feature and the second image feature match successfully, the vehicle in the target image can be directly determined to be the target vehicle without extracting the first vehicle feature in the target image.
[0092] In the case where the first image feature and the second image feature fail to match, the first vehicle feature in the target image is further extracted, and it is determined whether the vehicle in the target image is the target vehicle based on the first vehicle feature.
[0093] The first vehicle feature mentioned above includes multiple features. Therefore, when determining whether the vehicle in the target image is the target vehicle according to the first vehicle feature, it can be determined by each vehicle feature in order of priority.
[0094] The priority order here can be adjusted accordingly according to different application scenarios. The following continues to use the above scenarios 1 and 2 as examples to specifically describe the priority order setting method:
[0095] For scenario one and scenario two, the first vehicle feature and the second vehicle feature may be matched in order of priority by: matching the first vehicle logo with the second vehicle logo; if the first vehicle logo does not match the second vehicle logo, matching the first vehicle model with the second vehicle model; if the first vehicle model does not match the second vehicle model, matching the first vehicle model with the second vehicle model.
[0096] It should be understood that both scene one and scene two are scenes for identifying new energy vehicles and non-new energy vehicles. Since some manufacturers only produce new energy vehicles (for example, Xla, Xpeng, Xlai, Xmi, etc.). Therefore, the car logo can be identified first. If the car logo of the vehicle in the target image is identified as a manufacturer that only produces new energy vehicles, the vehicle can be directly determined as the target vehicle. If the car logo of the vehicle in the target image is not identified as a manufacturer that only produces new energy vehicles, the vehicle model characteristics can be further obtained. Since some vehicle models are only new energy models, the vehicle model can be further identified. When the vehicle model in the target image is identified as a new energy model, the vehicle can be directly determined as the target vehicle. If the vehicle model in the target image is identified as not a new energy model, the vehicle model can be further matched.
[0097] In the case where the first vehicle logo and the second vehicle logo, the first vehicle model and the second vehicle model, and the first vehicle model and the second vehicle model all fail to match, it is determined that the vehicle in the target image is not the target vehicle. In the case where any one of the first vehicle logo and the second vehicle logo, the first vehicle model and the second vehicle model, and the first vehicle model and the second vehicle model successfully matches, it is determined that the vehicle in the target image is the target vehicle.
[0098] In the above implementation process, when determining whether the vehicle in the target image is the target vehicle, the first image feature is used for judgment. When the vehicle in the target image is determined to be the target vehicle through the first image feature, there is no need to extract the first vehicle feature in the target image, which can reduce the vehicle feature recognition in the vehicle recognition process and improve the vehicle recognition efficiency. In addition, by setting the priority order, when matching the first vehicle feature and the second vehicle feature, the vehicle logo that can better reflect the target vehicle is matched first. When the vehicle logo fails to match, the vehicle model is further matched. When both the vehicle logo and the vehicle model fail to match, the vehicle model is matched. This method of matching various vehicle features layer by layer can reduce the number of feature extractions in the matching process, reduce the number of matches, improve vehicle recognition efficiency, and improve vehicle matching accuracy.
[0099] In a possible implementation, when the first image feature does not match the second image feature, extracting the first vehicle feature in the target image includes: when the first image feature does not match the second image feature, determining whether the target image contains a vehicle based on the similarity between the first image feature and the second image feature; and when the target image contains the vehicle, extracting the first vehicle feature in the target image.
[0100] Understandably, in some cases, the image acquisition device may be triggered by mistake, so that the acquired target image may be a non-vehicle image such as a person or cargo. In this case, if the first vehicle feature extraction is still performed on the target image, not only the first vehicle feature extraction time is wasted, but also no first vehicle feature can be extracted.
[0101] When matching the first image feature with the second image feature, it is determined whether there is a vehicle in the target image according to the similarity between the first image feature and the second image feature. If it is determined that there is no vehicle in the target image, the vehicle recognition method can be stopped.
[0102] In one embodiment, when the similarity between the first image feature and the second image feature is lower than a first similarity threshold, it can be determined that there is no vehicle in the target image.
[0103] Optionally, before matching the first image feature with the second image feature, it may be determined whether the first image feature contains a vehicle according to a set recognition method; if it is determined that the first image feature contains a vehicle, the first image feature is matched with the second image feature.
[0104] Among them, the set recognition method can be computer vision and image processing, deep learning and other methods.
[0105] In the above implementation process, the first vehicle feature in the target image is extracted only after it is determined that there is a vehicle in the target image. This can avoid extracting invalid first vehicle features when there is no vehicle in the target image, thereby improving vehicle recognition efficiency.
[0106] In a possible implementation, matching the first vehicle feature and the second vehicle feature in order of priority includes: calculating the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature by cosine similarity or Euclidean distance in order of priority; and determining a matching result of the first vehicle feature and the second vehicle feature according to the similarity.
[0107] Among them, the cosine similarity measures the size of the angle between two vectors, and the similarity of the two vectors is evaluated by calculating the cosine value of the angle between the two vectors.
[0108] The Euclidean distance here refers to the straight-line distance between two points in Euclidean space. In two-dimensional and three-dimensional space, the Euclidean distance is the actual distance between two points, which can be calculated using the Pythagorean theorem. In n-dimensional space, the Euclidean distance is the square root of the sum of the squares of the differences between the corresponding coordinates of the two points.
[0109] In one embodiment, when the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature is greater than or equal to a second similarity threshold, it can be determined that the first vehicle feature and the second vehicle feature match successfully. When the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature is less than the second similarity threshold, it can be determined that the first vehicle feature and the second vehicle feature match failed.
[0110] In the above implementation process, since cosine similarity is insensitive to the specific numerical value, only the direction difference of the vector needs to be paid attention to. By using cosine similarity to calculate the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature, the difficulty of data processing can be reduced and the efficiency and accuracy of data processing can be improved.
[0111] In one possible implementation, before step 201, the method further includes: applying a regularization factor in a scaling layer behind each convolutional layer of the deep learning model each time the deep learning model is trained using a training image set; counting the weights of each scaling layer to which the regularization factor is applied, and calculating a cumulative value based on global statistical information; cropping the trained deep learning model based on the cumulative value and a preset cropping value; continuing to train the cropped deep learning model using the training image set until a set iteration condition is reached to generate a target detection model; and extracting a first feature in the target image using the target detection model.
[0112] The training image set is a plurality of images containing vehicles, and the training image set here can be obtained from one or more channels such as an Internet platform, an image acquisition device in a target area, and an official website of a car company.
[0113] In one embodiment, before performing vehicle recognition, a target detection model needs to be established to extract the first feature in the target image.
[0114] The creation process of the target detection model can be as follows: train a deep learning model structure such as ResNet or VGG through a training atlas to obtain a basic monitoring model; replace the first convolution module in the basic monitoring model with the second convolution model, and the replaced model is the target detection model.
[0115] Optionally, the basic detection model can be trained in the following way:
[0116] The collected data is labeled according to the set problem; and, according to the set problem, the neural network design of the separable convolution structure is completed, and the global regularization coefficient is set for the neural network; the collected data and the corresponding labeled information are input into the deep separable convolutional neural network, and the model is trained to obtain a basic detection model.
[0117] In one embodiment, before generating the target detection model, the model may be pruned. The method of pruning the model may be as follows:
[0118] like Figure 4 As shown, a regularization factor is applied to the scaling layer behind each convolutional layer of the deep learning model (i.e., the basic detection model); the weights of each scaling layer to which the regularization factor is applied are counted, and the accumulated value is calculated based on the global statistical information; the trained deep learning model is cropped based on the accumulated value and the preset cropping value; the cropped deep learning model is continued to be trained through the training image set until the set iteration condition is met to generate a target detection model; and the first feature in the target image is extracted through the target detection model.
[0119] Here, the deep learning model after training is clipped according to the accumulated value and the preset clipping value, which may specifically include:
[0120] The channels whose accumulated values are lower than the preset clipping value are clipped, and the corresponding output channels of the convolution layer weights are clipped according to the clipping information of the scaling layer. The corresponding 1*1 convolution layer channels are clipped according to the clipped separable convolution layer information. According to the clipped convolution layer information, the input channels of the convolution layer weights that use the results of the clipped convolution layer as input are clipped to obtain the clipped deep learning model.
[0121] The above-mentioned set iteration condition can be reaching a set number of iterations, or the deep learning model can reach a set accuracy, etc. The set iteration condition can be selected according to actual conditions.
[0122] In one embodiment, the above-mentioned target detection model is provided with data enhancement technology.
[0123] Optionally, the data enhancement technology may be rotation, flipping, scaling, illumination change, etc.
[0124] Among them, the target image with rotation invariance or left-right symmetry requirements can be processed by rotation / flipping.
[0125] The size and position of the first feature may change as the distance between the vehicle and the camera changes. By scaling the image, the model can learn the characteristics of the first feature at different scales, helping the model adapt to input images of different sizes and improving the accuracy of license plate recognition.
[0126] For scenes with changing lighting conditions such as night and day, the model’s adaptability to lighting conditions is improved by simulating lighting changes.
[0127] In the above implementation process, during the training of the target detection model, the trained basic detection model is pruned, and then the pruned deep learning model is continued to be trained to obtain the target detection model. Unimportant parameters or structures in the target detection model can be removed, which can significantly reduce the size of the target detection model and reduce the resource usage of the target detection model to reduce storage and operation pressure. In addition, the underlying features such as edges and textures in the target image can be captured through the convolutional layer in the target detection model, and more representative high-level features can be formed through layer-by-layer abstraction, which is applicable to a variety of vehicle features and can increase the application scenarios of the vehicle recognition method.
[0128] In a possible implementation, after step 201, the method further includes: if the first feature does not match the second feature, determining whether there is an emergency situation of the vehicle in the target image; if there is an emergency situation of the vehicle in the target image, granting the vehicle permission to enter the target area.
[0129] The emergency situation here may be special situations such as whether the non-target vehicle is waiting for rescue, whether the non-target vehicle carries a patient, etc. The emergency situation can be selected according to the actual situation.
[0130] It should be understood that for different situations of the vehicle in the target image, the corresponding emergency situation determination method is different. The following lists the corresponding emergency situation determination methods in several situations:
[0131] Case 1: The vehicle in the target image is waiting for rescue: When the parking spaces in the oil truck parking lot are full and there are still vacancies in the new energy vehicle parking lot, through steps 201-203, it is identified that there are oil trucks heading towards the new energy parking lot, and an alarm signal can be sent to the background. After the background manually obtains the alarm signal, the real-time video image of the target area can be retrieved, and the vehicles in the target area can be inquired through voice calls, and the urgency of the vehicle can be assessed based on the obtained inquiry results. If the vehicle is in an emergency, the vehicle can be marked and permission to park in the electric vehicle parking space for a long time or for a limited time can be provided to give the vehicle permission to enter the target area.
[0132] Case 2: The vehicle in the target image carries an emergency patient: When a non-target vehicle is identified as driving towards the new energy parking lot through steps 201-203, an alarm signal can be sent to the background. After the background manually obtains the alarm signal, the real-time video image of the target area can be retrieved, and the vehicle in the target area can be inquired through a voice call, and the urgency of the vehicle can be assessed based on the query results; or, the urgency of the vehicle in the image can be assessed based on the video image. If the vehicle is in an emergency, the vehicle can be marked and permission to park in a parking space for a long time or for a limited time can be provided to grant the vehicle permission to enter the target area.
[0133] Case 3: The vehicle in the target image is an ambulance or a fire truck: When a non-target vehicle is identified as driving toward the new energy parking lot through steps 201 to 203, the special mark in the vehicle can be further identified. In the case where the vehicle in the target image is identified to include a special mark of an ambulance or a fire truck, it is determined that the vehicle in the target image is an ambulance or a fire truck, and the vehicle is automatically determined to be in an emergency situation, and the vehicle is immediately given permission to enter the target area.
[0134] The above-mentioned method for determining an emergency situation is only exemplary, and the method for determining an emergency situation can be adjusted according to actual conditions.
[0135] In one case, when the first feature does not match the second feature and there is no emergency situation of the vehicle, a warning is issued to drive the vehicle away.
[0136] In the above implementation process, when it is determined that the vehicle is not the target vehicle, it continues to determine whether the vehicle is in an emergency situation. When the vehicle is in an emergency situation, the vehicle is given permission to enter the target area to give priority to emergency situations, improve the flexibility of releasing the target area, and enhance the user experience.
[0137] In a possible implementation, before step 201, the method further includes: storing the second vehicle feature and the association relationship through a relational database; and storing the second image feature through a NoSQL database.
[0138] Among them, a relational database is a database based on a relational model. In a relational database, all data is organized into a series of tables, which are connected to each other through specific relationships (such as foreign keys). Each table contains multiple rows and columns, where rows represent records and columns represent fields or attributes. Relational databases use SQL (Structured Query Language) as the main language for data manipulation, query, and management.
[0139] Optionally, the relational database may be constructed by combining MySQL with a NoSQL database (eg, MongoDB), or by combining PostgreSQL with a NoSQL database. The construction method of the relational database may be selected according to actual conditions.
[0140] The association relationship here is the relationship between the second vehicle feature and the target vehicle.
[0141] The above-mentioned NoSQL database is a non-relational database suitable for large-scale data storage and high-concurrency access, and has the characteristics of flexible data model, high performance, and easy scalability.
[0142] In one embodiment, before step 201, the method further includes: extracting image features and vehicle features of vehicle images of published vehicles, and constructing a database according to the extracted image features and vehicle features of vehicle images of published vehicles.
[0143] In the above implementation process, by storing the second vehicle features and the association relationship in a relational database, the target vehicle and the second vehicle features corresponding to the target vehicle can be stored. The relational database can improve the integrity and efficiency of data storage through structured data organization, standardized SQL operation language and strict data integrity control. In addition, since the NoSQL database has the characteristics of flexible data model, high performance and easy expansion, the performance and flexibility of data storage can be improved by storing the second image features in the NoSQL database.
[0144] In a possible implementation, the method further includes: acquiring a vehicle image of a newly released vehicle; extracting a second feature of the vehicle image of the newly released vehicle; and updating a database according to the second feature.
[0145] It can be understood that the electronic device can be associated with the official website or new car release website of each car company. When a car company releases a new car on the official website or new car release website, the electronic device can obtain vehicle images or vehicle videos of the newly released vehicle from the official website or new car release website.
[0146] In one embodiment, after extracting the vehicle image or vehicle video of the newly released vehicle, the object detection model may be trained using the acquired vehicle image or vehicle video of the newly released vehicle.
[0147] Optionally, the target detection model may be used to extract second features in vehicle images or vehicle videos of newly released vehicles, and the database may be updated using the extracted second features.
[0148] In the above implementation process, when a new car is released, the vehicle image of the newly released vehicle is obtained in time, and the database is updated according to the second feature of the newly released vehicle, which can improve the accuracy and completeness of the second data in the database.
[0149] In a possible implementation, the method also includes: extracting a first characteristic feature from a target image when the vehicle passes through a target area; matching the first characteristic feature with a second characteristic feature in a database; updating the second characteristic feature in the database through the first characteristic feature if the first characteristic feature does not match the second characteristic feature; and determining the parking fee based on a time difference between obtaining the first characteristic and the second characteristic feature if the first characteristic feature matches the second characteristic.
[0150] The first characteristic and the second characteristic here refer to the unique characteristics of the vehicle, such as the personalized label attached to the vehicle, the doll hanging on the front window of the vehicle, the ribbon tied to the rearview mirror, etc. The first characteristic and the second characteristic can be set according to the actual situation.
[0151] Understandably, for some special scenarios, such as scenic spot parking lots, shopping mall parking lots, etc., there are no specific parked vehicles in these areas, but there may still be some vehicles with damaged license plates or vehicles that have not yet been licensed. For these vehicles, the individual characteristics of the vehicle can be extracted and the corresponding vehicle ID can be constructed based on the individual characteristics to perform operations such as charging for the vehicle.
[0152] Specifically, when the vehicle enters the parking lot entrance, the vehicle image of the vehicle can be obtained, and the first characteristic feature in the vehicle image can be extracted, and the first characteristic feature can be stored in the database to update the second characteristic feature in the database. When the vehicle needs to leave the parking lot, the vehicle image of the vehicle is obtained at the parking lot exit, and the first characteristic feature in the vehicle image is extracted again, and the first characteristic feature is matched with the second characteristic feature in the database. When the first characteristic feature matches the second characteristic feature, the parking fee is determined according to the time difference between the first characteristic feature and the second characteristic feature.
[0153] In addition to the above example scenarios, the method of identifying a vehicle by using the first characteristic and the second characteristic can also be used in other scenarios. The following uses the above scenarios 3 and 4 as examples to further illustrate the specific implementation method of identifying a vehicle by using the first characteristic and the second characteristic:
[0154] For scenario three, the target area is a certain community, the target vehicle is the community owner's vehicle, and a special mark used to indicate the community vehicle is placed or pasted on each owner's vehicle in the community as the individual feature of the target vehicle. When the vehicle enters the community, the vehicle image is obtained, and the first individual feature in the vehicle image is extracted, and the first individual feature is matched with the second individual feature in the database. When the first individual feature matches the second individual feature, the gate at the entrance of the community gate is controlled to open, and the vehicle can enter the community.
[0155] For scenario 4, the target area is a parking space, and the target vehicle is the vehicle that is designated to be parked in the parking space. A special mark used to indicate a community vehicle is placed or pasted on the vehicle as the personality feature of the target vehicle. When the vehicle reaches the vicinity of the parking space, a target image including the vehicle is obtained, and the first personality feature in the vehicle image is extracted, and the first personality feature is matched with the second personality feature in the database. When the first personality feature matches the second personality feature, the parking space lock is controlled to open, and the vehicle can be parked in the parking space.
[0156] In the above implementation process, in some scenarios where entry and exit of specific scenes need to be restricted, by setting the first characteristic feature in the target image to be extracted and matching the first characteristic feature with the second characteristic feature in the database, special vehicles can be identified, thereby increasing the application scenarios of the vehicle identification method.
[0157] Based on the same application concept, a vehicle identification device corresponding to the vehicle identification method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to that in the aforementioned vehicle identification method embodiment, the implementation of the device in this embodiment can refer to the description in the embodiment of the above method, and the repeated parts will not be repeated.
[0158] See also Figure 5 , is a functional module diagram of a vehicle identification device provided in an embodiment of the present application. Each module in the vehicle identification device in this embodiment is used to execute each step in the above method embodiment. The vehicle identification device includes a matching module 301, a determination module 302, and a permission module 303; wherein,
[0159] The matching module 301 is used to match a first feature of a target image with a second feature in a database; wherein the target image is an image of a target area and / or surroundings of the target area, and the first feature is a feature other than the license plate of the vehicle.
[0160] The determination module 302 is configured to determine that the vehicle in the target image is a target vehicle when the first feature matches the second feature.
[0161] The permission module 303 is used to grant permission for the vehicle to enter the target area when the vehicle in the target image is the target vehicle; wherein the target area includes an area where the target vehicle can be parked.
[0162] In a possible implementation, the matching module 301 is further used to: match the first image feature with the second image feature; if the first image feature is not matched with the second image feature, extract the first vehicle feature in the target image; and match the first vehicle feature with the second vehicle feature in order of priority.
[0163] In a possible implementation manner, the determination module 302 is further configured to: determine that the vehicle in the target image is a target vehicle when the first vehicle feature matches the second vehicle feature.
[0164] In a possible implementation manner, the matching module 301 is specifically configured to: match the first vehicle logo with the second vehicle logo; and if the first vehicle logo does not match the second vehicle logo, match other first vehicle features with other second vehicle features;
[0165] In a possible implementation manner, the determination module 302 is specifically configured to: determine that the vehicle in the target image is the target vehicle when other first vehicle features match other second vehicle features.
[0166] In a possible implementation, the matching module 301 is specifically configured to: match the first vehicle model with the second vehicle model; and if the first vehicle model is not matched with the second vehicle model, match the first vehicle model with the second vehicle model.
[0167] In a possible implementation manner, the determination module 302 is specifically configured to: determine that the vehicle in the target image is a target vehicle when the first vehicle model matches the second vehicle model.
[0168] In a possible implementation, the matching module 301 is specifically used to: when the first image feature does not match the second image feature, determine whether the target image contains a vehicle based on the similarity between the first image feature and the second image feature; and when the target image contains a vehicle, extract the first vehicle feature in the target image.
[0169] In a possible implementation manner, the matching module 301 is specifically used to: calculate the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature by cosine similarity or Euclidean distance in priority order; and determine the matching result between the first vehicle feature and the second vehicle feature according to the similarity.
[0170] In one possible implementation, the vehicle identification device further includes a creation module for applying a regularization factor in a scaling layer behind each convolutional layer of the deep learning model each time the deep learning model is trained using a training image set; wherein the training image set is a plurality of images containing vehicles; the weights of each scaling layer to which the regularization factor is applied are counted, and a cumulative value is calculated based on global statistical information; the trained deep learning model is cropped based on the cumulative value and a preset cropping value; the cropped deep learning model is continued to be trained using the training image set until a set iteration condition is reached to generate a target detection model; and a first feature in the target image is extracted using the target detection model.
[0171] In a possible implementation, the vehicle identification device further includes a judgment module for judging whether the vehicle in the target image is in an emergency situation when the first feature does not match the second feature; and granting the vehicle permission to enter the target area when the vehicle in the target image is in an emergency situation.
[0172] In a possible implementation, the vehicle identification device further includes a storage module for storing the second vehicle feature and an association relationship through a relational database; wherein the association relationship is a relationship between the second vehicle feature and the target vehicle; and storing the second image feature through a NoSQL database.
[0173] In a possible implementation manner, the vehicle identification device further includes an updating module, which is used to obtain a vehicle image of a newly released vehicle; extract a second feature of the vehicle image of the newly released vehicle; and update the database according to the second feature.
[0174] In a possible implementation manner, the matching module 301 is further used to: match the first personality feature with the second personality feature in the database based on the first personality feature extracted from the target image when the vehicle passes through the target area.
[0175] In a possible implementation manner, the vehicle identification device further includes an updating module, which is further configured to update the second personality feature in the database by using the first personality feature when the first personality feature does not match the second personality feature.
[0176] In a possible implementation, the determination module 302 is further configured to: when the first personality feature matches the second personality feature, determine the parking fee according to the time difference between obtaining the first personality feature and the second personality feature.
[0177] In addition, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle identification method described in the above method embodiment are executed.
[0178] The computer program product of the vehicle identification method provided in the embodiment of the present application includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the vehicle identification method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0179] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0180] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0181] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes. It should be noted that in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variation thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus. In the absence of more restrictions, the elements defined by the sentence "includes..." do not exclude the presence of other identical elements in the process, method, article or apparatus that includes the elements.
[0182] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0183] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A vehicle identification method, characterized in that: Applied to the scenario where the license plate is damaged or not on the vehicle, the method includes: Matching a first feature of a target image with a second feature in a database; wherein the target image is an image of a target area and / or a surrounding area of the target area, and the first feature is a feature other than the license plate of the vehicle; When the first feature matches the second feature, determining that the vehicle in the target image is a target vehicle; If the vehicle in the target image is a target vehicle, granting the vehicle permission to enter the target area; Wherein, the target area includes an area where the target vehicle can be parked; The first feature includes: a first image feature and a first vehicle feature, and the second feature includes a second image feature and a second vehicle feature; the first image feature is a feature of the image itself, and the first vehicle feature is a feature of the vehicle extracted from the target image; the first vehicle feature and the second vehicle feature include multiple features; The matching of the first feature of the target image with the second feature in the database includes: matching the first image feature with the second image feature; If the first image feature does not match the second image feature, extracting a first vehicle feature in the target image; matching the first vehicle feature with the second vehicle feature in order of priority; When the first feature matches the second feature, determining that the vehicle in the target image is a target vehicle includes: When the first vehicle feature matches the second vehicle feature, determining that the vehicle in the target image is a target vehicle; Wherein, the first vehicle feature includes: a first vehicle logo, and the second vehicle feature includes: a second vehicle logo; The matching of the first vehicle feature and the second vehicle feature in order of priority includes: Matching the first vehicle logo with the second vehicle logo; When the first vehicle logo is not matched with the second vehicle logo, matching other first vehicle features with other second vehicle features; When the first feature matches the second feature, determining that the vehicle in the target image is a target vehicle includes: In a case where the other first vehicle features match the other second vehicle features, determining that the vehicle in the target image is the target vehicle; The step of extracting a first vehicle feature from the target image when the first image feature does not match the second image feature includes: In the case where the first image feature does not match the second image feature, determining whether the target image contains a vehicle according to the similarity between the first image feature and the second image feature; In a case where the target image includes a vehicle, a first vehicle feature in the target image is extracted.
2. The method according to claim 1, characterized in that The first vehicle feature further includes: a first vehicle model and a first vehicle type, and the second vehicle feature further includes: a second vehicle model and a second vehicle type; The step of matching other first vehicle features with other second vehicle features when the first vehicle logo is not matched with the second vehicle logo includes: Matching the first vehicle model with the second vehicle model; If the first vehicle model is not matched with the second vehicle model, matching the first vehicle model with the second vehicle model; When the first feature matches the second feature, determining that the vehicle in the target image is a target vehicle includes: When the first vehicle model matches the second vehicle model, the vehicle in the target image is determined to be a target vehicle.
3. The method according to claim 1, characterized in that The matching of the first vehicle feature and the second vehicle feature in order of priority includes: Calculating the similarity between the feature vector of the first vehicle feature and the feature vector of the second vehicle feature by cosine similarity or Euclidean distance in order of priority; A matching result between the first vehicle feature and the second vehicle feature is determined according to the similarity.
4. The method according to any one of claims 1 to 3, characterized in that: Before matching the first feature of the target image with the second feature in the database, the method further includes: In each process of training the deep learning model through a training image set, applying a regularization factor in a scaling layer behind each convolutional layer of the deep learning model; wherein the training image set is a plurality of images containing vehicles; Counting the weights of each scaling layer to which the regularization factor is applied, and calculating the cumulative value based on the global statistical information; Clipping the trained deep learning model according to the accumulated value and a preset clipping value; Continue to train the cropped deep learning model using the training image set until a set iteration condition is reached to generate a target detection model; A first feature in the target image is extracted by the target detection model.
5. The method according to any one of claims 1 to 3, characterized in that: After matching the first feature of the target image with the second feature in the database, the method further includes: If the first feature does not match the second feature, determining whether the vehicle in the target image is in an emergency situation; In the event that an emergency occurs with a vehicle in the target image, permission is given to the vehicle to enter the target area.
6. The method according to any one of claims 1 to 3, characterized in that: Before matching the first feature of the target image with the second feature in the database, the method further includes: The second vehicle feature and the association relationship are stored in a relational database; wherein the association relationship is the relationship between the second vehicle feature and the target vehicle; The second image feature is stored via a NoSQL database.
7. The method according to claim 6, characterized in that The method further comprises: Obtain vehicle images of newly released vehicles; extracting a second feature of the vehicle image of the newly released vehicle; The database is updated according to the second feature.
8. The method according to any one of claims 1 to 3, characterized in that: The first characteristic comprises: a first sexual characteristic, and the second characteristic comprises: a second sexual characteristic; The method further comprises: A first characteristic feature extracted from the target image when the vehicle passes through the target area; matching the first personality characteristic with a second personality characteristic in a database; In the case where the first personality feature does not match the second personality feature, updating the second personality feature in the database by using the first personality feature; When the first personality feature matches the second personality feature, the parking fee is determined according to the time difference between obtaining the first personality feature and the second personality feature.
9. A vehicle identification system, characterized in that: include: processing equipment, image acquisition equipment, and locking equipment; The processing device is connected to the image acquisition device and the locking device; The image acquisition device is used to acquire a target image and send the target image to the processing device; The processing device is used to execute the vehicle identification method according to any one of claims 1 to 8 above; The locking device is used to allow or deny the vehicle to enter the target area according to the recognition result of the processing device.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.
