Vehicle type identification method, related device, equipment and storage medium

By selecting the applicable recognition model for vehicle model identification by predicting light conditions, the problem of poor compatibility of the existing technology under different light conditions is solved, and a higher precision in vehicle model identification is achieved.

CN119418024APending Publication Date: 2025-02-11IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411287071.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The existing vehicle model identification technology has poor compatibility under different light conditions and is difficult to achieve refined vehicle model identification.

Method used

By obtaining the predicted light conditions when shooting the image of the vehicle to be identified, select the applicable identification model for vehicle model identification. The specific steps include obtaining the predicted light conditions, selecting the first recognition model or the second recognition model, and identifying the vehicle image to be recognized based on the target recognition model.

Benefits of technology

Improves the compatibility of model identification under different light conditions and improves the fineness of model identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119418024A_ABST
    Figure CN119418024A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle type recognition method, a related device, equipment and a storage medium, and the method comprises the steps: obtaining a prediction light condition when a to-be-recognized vehicle image is shot; selecting the first recognition model or the second recognition model as a target recognition model based on the predicted light condition; wherein the first recognition model and the second recognition model are both used for vehicle type recognition, and the light condition suitable for the first recognition model is better than the light condition suitable for the second recognition model; and identifying the to-be-identified vehicle image based on the target identification model to obtain a target vehicle type to which the to-be-identified vehicle belongs in the to-be-identified vehicle image. According to the scheme, the compatibility of vehicle type recognition under different light conditions can be improved, and the fineness of a vehicle type recognition result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a vehicle type recognition method and related devices, equipment and storage media. Background Art

[0002] Vehicle type recognition is one of the important applications in scenarios such as smart driving. Through vehicle type recognition, it can provide richer perception for human-computer interaction and provide auxiliary information for autonomous driving.

[0003] At present, the existing vehicle model recognition technology is realized by analyzing the captured images, but this method is difficult to be compatible with different lighting conditions. In addition, there is also existing technology that realizes vehicle model recognition through laser radar, but this method can only recognize the rough vehicle model at most, such as whether it is a car or a large truck, and it is difficult to achieve more refined vehicle model recognition. In view of this, how to improve the compatibility of vehicle model recognition under different lighting conditions and improve the refinement of vehicle model recognition results has become an urgent problem to be solved. Summary of the invention

[0004] The main technical problem solved by the present application is to provide a vehicle type recognition method and related devices, equipment and storage media, which can improve the compatibility of vehicle type recognition under different lighting conditions and improve the precision of vehicle type recognition results.

[0005] In order to solve the above technical problems, the first aspect of the present application provides a vehicle model identification method, including: obtaining the predicted light conditions when shooting the image of the vehicle to be identified; based on the predicted light conditions, selecting the first recognition model or the second recognition model as the target recognition model; wherein the first recognition model and the second recognition model are both used for vehicle model identification, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model; based on the target recognition model, the vehicle image to be identified is identified to obtain the target vehicle model to which the vehicle to be identified in the vehicle image to be identified belongs.

[0006] In order to solve the above technical problems, the second aspect of the present application provides a vehicle model identification device, including: an acquisition module, a selection module and an identification module, the acquisition module is used to obtain the predicted light conditions when shooting the image of the vehicle to be identified; the selection module is used to select the first recognition model or the second recognition model as the target recognition model based on the predicted light conditions; wherein the first recognition model and the second recognition model are both used for vehicle model identification, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model; the identification module is used to identify the vehicle image to be identified based on the target recognition model, and obtain the target vehicle model to which the vehicle to be identified in the vehicle image to be identified belongs.

[0007] In order to solve the above technical problems, the third aspect of the present application provides an electronic device, which at least includes a memory and a processor coupled to each other, wherein the memory at least stores program instructions, and the processor is used to execute the program instructions to implement the vehicle model identification method in the above first aspect.

[0008] In order to solve the above technical problems, the fourth aspect of the present application provides a computer-readable storage medium storing program instructions that can be executed by a processor, and the program instructions are used to implement the vehicle model identification method of the first aspect.

[0009] The above scheme obtains the predicted light conditions when shooting the image of the vehicle to be identified, and based on the predicted light conditions, selects the first recognition model or the second recognition model as the target recognition model, and both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model, and then recognizes the vehicle image to be identified based on the target recognition model to obtain the target vehicle type described by the vehicle to be identified in the vehicle image to be identified. Therefore, on the one hand, the recognition model used for different light conditions is adaptively selected by predicting the light conditions, which helps to improve the compatibility of vehicle type recognition under different light conditions. On the other hand, compared with the laser radar that recognizes the vehicle type through the vehicle contour features, the vehicle type recognition through the image can dig out the vehicle detail features in the image data as much as possible, which helps to improve the precision of the vehicle type recognition results. Therefore, it is possible to improve the compatibility of vehicle type recognition under different light conditions and improve the precision of the vehicle type recognition results. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flow chart of an embodiment of a vehicle type identification method of the present application; Figure 2 This is a schematic diagram of the process of an embodiment of the vehicle model identification method of the present application; Figure 3 It is a schematic diagram of the framework of an embodiment of a vehicle type identification device of the present application; Figure 4 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application; Figure 5 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0011] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0012] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0013] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the fragment " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0014] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of the vehicle model identification method of the present application. Specifically, it may include the following steps: Step S11: Obtain the predicted light conditions when capturing the image of the vehicle to be identified.

[0015] In one implementation scenario, the image of the vehicle to be identified can be automatically captured by a camera set in the vehicle. If the vehicle is provided with a shooting angle facing the front of the vehicle, the camera can automatically capture the front of the vehicle to obtain the image of the vehicle to be identified; or the vehicle can also be set to face multiple directions of the vehicle (such as the front of the vehicle, the rear of the vehicle, the left side of the left door of the vehicle, the right side of the right door of the vehicle, etc.), then the image of the vehicle to be identified can be selected from the images captured in multiple directions in response to the request for identification instruction based on the request for identification instruction. Exemplarily, the request for identification instruction can be "please identify the model of the oncoming vehicle in front", and the oncoming vehicle part can be cut out from the image captured "in front of the vehicle" as the image of the vehicle to be identified; or the request for identification instruction can be "please identify the model of the vehicle in the same direction in front", and the vehicle part in the same direction can be cut out from the image captured "in front of the vehicle" as the image of the vehicle to be identified. Of course, the above examples are only several possible examples of obtaining the image of the vehicle to be identified, and are not limited to obtaining the image of the vehicle to be identified by other methods, and no examples are given here one by one.

[0016] In one implementation scenario, the predicted light conditions when shooting the image of the vehicle to be identified can be obtained based on the automatic light sensing signal of the vehicle when shooting the image of the vehicle to be identified. It should be noted that the automatic light sensing signal can be used to trigger turning on or off the headlights and clearance lights of the vehicle, or can be used to trigger the vehicle screen to switch between night mode and day mode, etc. The specific use of the automatic light sensing signal is not limited here. Specifically, when the automatic light sensing signal triggers the turning on of the vehicle's headlights, position lights and other lights or triggers the vehicle's screen to switch to night mode, it can be considered that the external light conditions have deteriorated. If the external environment enters night or the external environment is a low-light environment (such as entering a tunnel, underground garage, etc.), the predicted light conditions can be determined to be daytime or high-light. Conversely, when the automatic light sensing signal triggers the turning off of the vehicle's headlights, position lights and other lights or triggers the vehicle's screen to switch to day mode, it can be considered that the external light conditions have improved. If the external environment enters daytime or the external environment is a high-light environment (such as leaving a tunnel, underground garage, etc.), the predicted light conditions can be determined to be night or low-light.

[0017] In one implementation scenario, the predicted light conditions when the image of the vehicle to be identified is taken can be obtained based on the reference time of sunrise and sunset. For example, if the image of the vehicle to be identified is taken at a reference time starting from sunrise and ending at a reference time of sunset, the predicted light conditions can be determined to be daytime or high light, whereas if the image of the vehicle to be identified is taken at a reference time starting from sunset and ending at a reference time of sunrise, the predicted light conditions can be determined to be night or low light.

[0018] In one implementation scenario, the image brightness, color saturation and other information of the vehicle image to be identified can also be analyzed to determine whether the predicted lighting condition is daytime or high light, or whether the predicted lighting condition is night or low light based on the image brightness, color saturation and other information.

[0019] It should be noted that the above examples are only several possible examples of obtaining predicted light conditions, and are not limited to other methods of obtaining predicted light conditions. Specific methods of obtaining predicted light conditions will not be given one by one here.

[0020] Step S12: Based on the predicted light condition, select the first recognition model or the second recognition model as the target recognition model.

[0021] In the disclosed embodiment, both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model. For example, the first recognition model can be used to predict the light conditions as daytime or high light conditions, while the second recognition model can be used to predict the light conditions as nighttime or low light conditions.

[0022] In one implementation scenario, the first recognition model can be obtained by training based on a sample vehicle image, and the sample vehicle image can display the whole vehicle appearance of the sample vehicle and the sample vehicle image is annotated with the model to which the sample vehicle belongs. As a possible example, vehicle appearance images of various models can be collected as sample vehicle images. On this basis, the sample vehicle image can be recognized based on the first recognition model to obtain the predicted model of the sample vehicle in the sample vehicle image, and then the network parameters of the first recognition model can be adjusted based on the difference between the annotated model and the predicted model of the sample vehicle image. It should be noted that the first recognition model can include but is not limited to a convolutional neural network, etc., and the network structure of the first recognition model is not limited here. In the above manner, the first recognition model is obtained by training based on a sample vehicle image, and the sample vehicle image displays the whole vehicle appearance of the sample vehicle and the sample vehicle image is annotated with the model to which the sample vehicle belongs. This can force the first recognition model to learn to map the whole vehicle appearance to the model to which it belongs during the training process, which helps to improve the model recognition accuracy of the first recognition model under daytime or high light conditions.

[0023] In one implementation scenario, the second recognition model can be trained based on a sample headlight image, and the sample headlight image can at least show the headlight part of the sample vehicle and the sample headlight image is annotated with the model of the sample vehicle. As a possible example, partial images of headlights of various models and their corresponding images of headlights lit at night can be collected as sample headlight images. On this basis, the sample headlight image can be recognized based on the second recognition model to obtain the predicted model of the sample vehicle in the sample headlight image, and then the network parameters of the second recognition model can be adjusted based on the difference between the annotated model and the predicted model of the sample vehicle in the sample headlight image. It should be noted that the second recognition model can include but is not limited to convolutional neural networks, etc., and the network structure of the second recognition model is not limited here. In the above manner, the second recognition model is trained based on the sample headlight image, and the sample headlight image at least shows the headlight part of the sample vehicle and the sample headlight image is annotated with the model of the sample vehicle, which can force the second recognition model to learn to map the headlights to the model during the training process, which helps to improve the model recognition accuracy of the second recognition model.

[0024] It should be noted that in the disclosed embodiment, "various models" can be specific to brands, models, etc., such as "Toyota Corolla", "Hyundai Elantra", "Volkswagen Sagitar", etc., and the target model finally identified can also be specific to brands, models, etc., such as the target model of the vehicle to be identified in the image of the vehicle to be identified is "Volkswagen Sagitar". Of course, the above examples of models are only several possible examples in the actual application process, and the specific models are not limited here.

[0025] In an implementation scenario, taking the predicted lighting condition as day or night, or the predicted lighting condition as low light or high light as an example, when the predicted lighting condition is day or high light, the first recognition model can be selected as the target recognition model, and when the predicted lighting condition is night or low light, the second recognition model can be selected as the target recognition model.

[0026] In an implementation scenario, please refer to Figure 2 , Figure 2 Schematic diagram of the process of an embodiment of the vehicle model identification method of the present application. Figure 2 As shown, when the first recognition model is selected as the target recognition model, the image of the vehicle to be recognized can be directly used as the input data of the target recognition model. In other words, the image of the vehicle to be recognized can be directly input into the first recognition model to obtain the target vehicle model output by the first recognition model. As a possible example, the first recognition model can specifically output the probability values ​​of the vehicle to be recognized belonging to various vehicle models, and then select the vehicle model corresponding to the maximum probability value as the target vehicle model.

[0027] In an implementation scenario, please continue to refer to Figure 2 In the case where the second recognition model is selected as the target recognition model, before the vehicle image to be recognized is recognized based on the target recognition model and the target vehicle model to which the vehicle to be recognized belongs in the vehicle image to be recognized is obtained, several headlight areas in the vehicle image to be recognized can be determined first, and then at least one headlight area can be selected as the target area. Then, the image data of the target area can be extracted from the vehicle image to be recognized, and in the case where the second recognition model is selected as the target recognition model, the image data of the target area can be used as input data for the target recognition model. In the above manner, in the case where the second recognition model is selected as the target recognition model, a series of operations such as determining the headlight area, selecting the headlight area, and extracting the target area can provide the target recognition model with input data with as little interference information as possible.

[0028] In a specific implementation scenario, the luminous parts in the image of the vehicle to be identified can be detected to obtain the luminous area in the image of the vehicle to be identified. Exemplarily, the brightness value of each pixel in the image of the vehicle to be identified can be obtained, and the pixels with brightness values ​​higher than a certain threshold value can be included in the luminous area. In addition, the specific shape of the luminous area may include but is not limited to a rectangle, etc., which is not limited here. On this basis, based on the distribution of pixels with brightness values ​​higher than the above threshold value in the luminous area, several headlight areas can be cut out in the luminous area. Exemplarily, the connected domain formed by the pixels with brightness values ​​higher than the above threshold value in the luminous area can be obtained, and the connected domain with an area greater than a certain threshold value can be taken as the headlight area, so that the headlight area can be cut out from the luminous area.

[0029] In a specific implementation scenario, as a possible example, after obtaining several headlight areas, the headlight areas can be sorted in order of distortion from small to large based on the distortion comparison results between the several headlight areas, and the headlight areas before the first rank can be selected as the target areas. In particular, the first rank can be 1, and the headlight area with the smallest distortion can be selected as the target area. The above method selects the target area from several headlight areas through distortion comparison for subsequent vehicle model recognition, which helps to further improve the accuracy of vehicle model recognition.

[0030] In a specific implementation scenario, as another possible example, after obtaining several headlight areas, the headlight areas can be sorted in order of brightness from small to large based on the brightness comparison results between the several headlight areas, and the headlight areas before the second rank can be selected as the target areas. In particular, the second rank can be 1, and the headlight area with the highest brightness can be selected as the target area. The above method selects the target area from several headlight areas through brightness comparison for subsequent vehicle model recognition, which helps to further improve the accuracy of vehicle model recognition.

[0031] Step S13: Identify the vehicle image to be identified based on the target recognition model to obtain the target vehicle model to which the vehicle to be identified in the vehicle image to be identified belongs.

[0032] In an implementation scenario, as mentioned above, when the first recognition model is selected as the target recognition model, the image of the vehicle to be recognized can be directly used as the input data of the target recognition model, that is, the image of the vehicle to be recognized can be directly recognized based on the target recognition model to obtain the probability value of the vehicle to be recognized in the image of the vehicle to be recognized belonging to various models. On this basis, as a possible example, the model corresponding to the maximum probability value can be selected as the target model. Of course, the various models can also be sorted in order of probability value from high to low, and the models before the third rank can be selected as the target models for reference.

[0033] In an implementation scenario, as mentioned above, when the second recognition model is selected as the target recognition model, the image data of the target area can be first extracted from the image of the vehicle to be recognized as the input data of the target recognition model. The specific process can refer to the aforementioned related description, which will not be repeated here. On this basis, as a possible example, the image data of the target area can be directly recognized based on the target recognition model to obtain the probability value of the vehicle to be recognized in the image of the vehicle to be recognized belonging to various models. After that, the target model of the vehicle to be recognized can be determined based on the probability value of the vehicle to be recognized belonging to various models. The specific process can refer to the aforementioned related description, which will not be repeated here.

[0034] In another implementation scenario, different from the aforementioned implementation, the second recognition model may include a headlight recognition model and a taillight recognition model. The headlight recognition model may be used to identify a vehicle model based on a headlight image, and the taillight recognition model may be used to identify a vehicle model based on a taillight image. In the case where the second recognition model is selected as the target recognition model, the image data of the ground area in the image of the vehicle to be identified may be specifically analyzed to obtain an analysis result, and the analysis result may be used to identify the headlights in the image of the vehicle to be identified as headlights or taillights, and then the headlight recognition model or the taillight recognition model in the target recognition model may be selected based on the analysis result to identify the image of the vehicle to be identified, and then the target vehicle model to which the vehicle to be identified belongs in the image of the vehicle to be identified belongs. In the above method, by first analyzing whether the headlights in the image of the vehicle to be identified are headlights or taillights, and then selecting the headlight recognition model or the taillight recognition model in the target recognition model to identify the image of the vehicle to be identified, a more suitable vehicle model recognition model may be adaptively selected, which helps to further improve the accuracy of vehicle model recognition, especially the accuracy of vehicle model recognition under night or low light conditions.

[0035] In a specific implementation scenario, similar to the aforementioned training process, for the headlight recognition model, during the training process, the headlight recognition model can be used to recognize the headlight image, obtain the predicted vehicle model to which the sample vehicle in the headlight image belongs, and then adjust the network parameters of the headlight recognition model based on the difference between the labeled vehicle model of the sample vehicle in the headlight image and the predicted vehicle model. For the taillight recognition model, during the training process, the taillight recognition model can be used to recognize the taillight image, obtain the predicted vehicle model to which the sample vehicle in the taillight image belongs, and then adjust the network parameters of the taillight recognition model based on the difference between the labeled vehicle model of the sample vehicle in the taillight image and the predicted vehicle model. It should be noted that the headlight recognition model may include but is not limited to convolutional neural networks, etc., and the network structure of the headlight recognition model is not limited herein; the taillight recognition model may also include convolutional neural networks, etc., and the network structure of the taillight recognition model is not limited herein.

[0036] In a specific implementation scenario, in order to determine whether the headlight in the image of the vehicle to be identified is a headlight or a taillight, a neighborhood area (such as a 3*3 neighborhood area, a 9*9 neighborhood area, etc.) with a pixel point in the image data of the ground area as the center point in the image of the vehicle to be identified can be first obtained, and then a brightness threshold can be obtained based on the brightness value of each pixel point in the neighborhood area, so that it can be determined whether to select the center point of the neighborhood area as the target point based on the ratio of the number of pixels with brightness values ​​higher than the brightness threshold to the number of pixels with brightness values ​​lower than the brightness threshold in the neighborhood area, and then the analysis result can be obtained based on the fitting graph of each target point, that is, whether the headlight in the image of the vehicle to be identified is a headlight or a taillight. The above method, by performing image analysis on the neighborhood areas with each pixel point as the center point in the ground area respectively, to determine whether to select the center point of the neighborhood area as the target point, and thus obtaining the analysis result of whether the headlight is a headlight or a taillight according to the graph formed by the target point, helps to improve the accuracy of the headlight analysis.

[0037] In a specific implementation scenario, after obtaining the image of the vehicle to be identified, the image of the vehicle to be identified can be first segmented (e.g., instance segmentation, etc.) to obtain image regions of various objects (e.g., ground, vehicle, tree, building, road sign, sky, etc.) in the image of the vehicle to be identified, and then the image data of the ground region is selected for subsequent analysis. It should be noted that the specific process of image segmentation can refer to technical details such as instance segmentation, which will not be repeated here.

[0038] In a specific implementation scenario, for each neighborhood area, the brightness values ​​of each pixel in the neighborhood area can be averaged as the brightness threshold; or, the brightness values ​​of each pixel in the neighborhood area can be weighted to obtain the brightness threshold, and the closer the pixel is to the center point, the greater its weighting factor, and conversely, the farther the pixel is from the center point, the smaller its weighting factor. Of course, the above examples are only several possible examples in the actual application process, and are not limited to other methods for determining the brightness threshold of the neighborhood area, and no examples are given here one by one.

[0039] In a specific implementation scenario, after determining the number ratio between the pixels with brightness values ​​higher than the brightness threshold and the pixels with brightness values ​​lower than the brightness threshold in the neighborhood area based on the brightness threshold, it can be determined whether to select the center point of the neighborhood area as the target point based on the number ratio. Exemplarily, in response to the number ratio being within the target interval, it can be determined to select the center point of the neighborhood area as the target point, and in response to the number ratio being outside the target interval, it can be determined not to select the center point of the neighborhood area as the target point. It should be noted that the center value of the target interval can be set to 0.5. For example, the target interval can be set to 0.45 to 0.55, 0.48 to 0.52, etc., and the target interval is not limited here. In the above manner, for each neighborhood area, whether the number ratio is within the target interval with 0.5 as the center value is determined to determine whether to select the center point of the neighborhood area as the target point, and the pixel point at the light and dark boundary can be selected as the target point as much as possible.

[0040] In a specific implementation scenario, after analyzing each neighborhood area and selecting the target point, a graph formed by connecting the target points can be obtained. It should be noted that the connected target points can be controlled within a preset number of pixels, that is, if the target points span more than the preset number of pixels, the target points may not be connected, and conversely, if the target points span no more than the preset number of pixels, the target points may be connected. On this basis, in response to the fitting graph containing line segments, it can be determined that the analysis result includes the headlights in the image of the vehicle to be identified, and conversely, in response to the fitting graph not containing line segments, it can be determined that the analysis result includes the taillights in the image of the vehicle to be identified. In other words, when the fitting graph contains line segments, it can be considered that a light-dark boundary line is formed on the ground, so the headlights in the image of the vehicle to be identified can be considered as headlights, and conversely, it can be considered that no light-dark boundary line is formed on the ground, so the headlights in the image of the vehicle to be identified can be considered as taillights. It should be noted that the "line segment" described in the embodiments of the present disclosure may not strictly be required to conform to the definition of a line segment in the mathematical sense, and may also be allowed to fluctuate within a certain error range, and may be approximately the definition of a line segment in the mathematical sense within the error allowable range. In the above manner, by detecting whether the fitting graph contains a line segment, determining that the result to be analyzed includes whether the headlight in the vehicle image to be identified is a headlight or a taillight, the accuracy of the headlight analysis can be further improved.

[0041] In a specific implementation scenario, after determining that the lights in the vehicle image to be identified are headlights or taillights, as a possible example, the headlight recognition model or the taillight recognition model in the target recognition model can be selected to directly identify the vehicle image to be identified, and obtain the target vehicle model to which the vehicle to be identified in the vehicle image to be identified belongs; or, as another possible example, the headlight recognition model or the taillight recognition model in the target recognition model can also be selected to identify the image data of the aforementioned target area, and obtain the target vehicle model to which the vehicle to be identified in the vehicle image to be identified belongs.

[0042] The above scheme obtains the predicted light conditions when shooting the image of the vehicle to be identified, and based on the predicted light conditions, selects the first recognition model or the second recognition model as the target recognition model, and both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model, and then recognizes the vehicle image to be identified based on the target recognition model to obtain the target vehicle type described by the vehicle to be identified in the vehicle image to be identified. Therefore, on the one hand, the recognition model used for different light conditions is adaptively selected by predicting the light conditions, which helps to improve the compatibility of vehicle type recognition under different light conditions. On the other hand, compared with the laser radar that recognizes the vehicle type through the vehicle contour features, the vehicle type recognition through the image can dig out the vehicle detail features in the image data as much as possible, which helps to improve the precision of the vehicle type recognition results. Therefore, it is possible to improve the compatibility of vehicle type recognition under different light conditions and improve the precision of the vehicle type recognition results.

[0043] See also Figure 3 , Figure 3 It is a schematic diagram of the framework of an embodiment of the vehicle type recognition device of the present application. The vehicle type recognition device 30 includes: an acquisition module 31, a selection module 32 and a recognition module 33, wherein the acquisition module 31 is used to acquire the predicted light conditions when shooting the image of the vehicle to be recognized; the selection module 32 is used to select the first recognition model or the second recognition model as the target recognition model based on the predicted light conditions; wherein the first recognition model and the second recognition model are both used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model; the recognition module 33 is used to recognize the vehicle image to be recognized based on the target recognition model, and obtain the target vehicle type to which the vehicle to be recognized in the vehicle image to be recognized belongs.

[0044] In the above scheme, the vehicle type recognition device 30 obtains the predicted light conditions when shooting the image of the vehicle to be recognized, and based on the predicted light conditions, selects the first recognition model or the second recognition model as the target recognition model, and both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model, and then recognizes the vehicle image to be recognized based on the target recognition model to obtain the target vehicle type described by the vehicle to be recognized in the vehicle image to be recognized. Therefore, on the one hand, the recognition model used for different light conditions is adaptively selected by predicting the light conditions, which helps to improve the compatibility of vehicle type recognition under different light conditions. On the other hand, compared with the laser radar that recognizes the vehicle type through the vehicle contour features, the vehicle type recognition through the image can dig out the vehicle detail features in the image data as much as possible, which helps to improve the precision of the vehicle type recognition results. Therefore, the compatibility of vehicle type recognition under different light conditions can be improved, and the precision of the vehicle type recognition results can be improved.

[0045] In some disclosed embodiments, the vehicle type recognition device 30 includes a headlight area determination module, which is used to determine several headlight areas in the vehicle image to be identified when the second recognition model is selected as the target recognition model; the vehicle type recognition device 30 includes a headlight area selection module, which is used to select at least one headlight area as the target area; the vehicle type recognition device 30 includes an image data extraction module, which is used to extract image data of the target area from the vehicle image to be identified; wherein the image data is used as input data of the target recognition model.

[0046] In some disclosed embodiments, the headlight area selection module includes a first selection submodule for sorting the headlight areas in order of distortion from small to large based on distortion comparison results between the headlight areas, and selecting the headlight area before the first rank.

[0047] In some disclosed embodiments, the headlight area selection module includes a second selection submodule for sorting the headlight areas in descending order of brightness based on brightness comparison results between the headlight areas, and selecting the headlight areas before the second rank.

[0048] In some disclosed embodiments, when the first recognition model is selected as the target recognition model, the image of the vehicle to be recognized is used as input data of the target recognition model.

[0049] In some disclosed embodiments, the second recognition model includes a headlight recognition model and a taillight recognition model, the headlight recognition model is used to identify the vehicle type based on the headlight image, and the taillight recognition model is used to identify the vehicle type based on the taillight image, the recognition module 33 includes a ground image analysis submodule, which is used to analyze the image data of the ground area in the image of the vehicle to be identified when the second recognition model is selected as the target recognition model, and obtain an analysis result; wherein the analysis result includes whether the lights in the image of the vehicle to be identified are headlights or taillights; the recognition module 33 includes a model selection recognition submodule, which is used to select the headlight recognition model or the taillight recognition model in the target recognition model based on the analysis result to identify the vehicle image to be identified, and obtain the target vehicle type to which the vehicle to be identified in the image of the vehicle to be identified belongs.

[0050] In some disclosed embodiments, the ground image analysis submodule includes a neighborhood acquisition unit for acquiring a neighborhood area with a pixel point in the image data of the ground area as the center point; the ground image analysis submodule includes a threshold determination unit for obtaining a brightness threshold based on the brightness value of each pixel point in the neighborhood area; the ground image analysis submodule includes a pixel selection unit for determining whether to select the center point of the neighborhood area as the target point based on the ratio of the number of pixel points in the neighborhood area whose brightness values ​​are higher than the brightness threshold to the number of pixel points whose brightness values ​​are lower than the brightness threshold; the ground image analysis submodule includes a result acquisition unit for obtaining an analysis result based on the fitting graph of each target point.

[0051] In some disclosed embodiments, the pixel selection unit is specifically used to determine to select the center point of the neighborhood area as the target point in response to the number ratio being within the target interval; and to determine not to select the center point of the neighborhood area as the target point in response to the number ratio being outside the target interval; wherein the center value of the target interval is 0.5.

[0052] In some disclosed embodiments, the result acquisition unit is specifically used to determine that the analysis result includes the headlights in the image of the vehicle to be identified in response to the fitting graphic containing a line segment; and to determine that the analysis result includes the taillights in the image of the vehicle to be identified in response to the fitting graphic not containing a line segment.

[0053] In some disclosed embodiments, the first recognition model is trained based on sample vehicle images, in which the sample vehicle images display the entire vehicle appearance of the sample vehicle and the sample vehicle images are labeled with the model of the sample vehicle; and / or, the second recognition model is trained based on sample headlight images, in which the sample headlight images at least display the headlight part of the sample vehicle and the sample headlight images are labeled with the model of the sample vehicle.

[0054] See also Figure 4 , Figure 4: is a schematic diagram of the framework of an embodiment of an electronic device of the present application. The electronic device 40 includes at least a memory 41 and a processor 42 coupled to each other, the memory 41 stores at least program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the above-mentioned vehicle model identification method embodiments. For details, please refer to the aforementioned disclosed embodiments, which will not be repeated here. As a possible example, the electronic device 40 may include but is not limited to a server, a smart phone, a tablet computer, or a vehicle-mounted device such as a car computer, etc., and the specific type of the electronic device 40 is not limited here.

[0055] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned vehicle type identification method embodiments. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.

[0056] In the above scheme, the electronic device 40 obtains the predicted light conditions when shooting the image of the vehicle to be identified, and based on the predicted light conditions, selects the first recognition model or the second recognition model as the target recognition model, and both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model, and then recognizes the image of the vehicle to be identified based on the target recognition model to obtain the target vehicle type described by the vehicle to be identified in the image of the vehicle to be identified. On the other hand, compared with the laser radar for vehicle type recognition through vehicle contour features, vehicle type recognition through images can mine the vehicle detail features in the image data as much as possible, which helps to improve the refinement of vehicle type recognition results. Therefore, it is possible to improve the compatibility of vehicle type recognition under different light conditions and improve the refinement of vehicle type recognition results.

[0057] See also Figure 5 , Figure 51 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium 50 of the present application. The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor, and the program instructions 51 are used to implement the steps in any of the above-mentioned vehicle type identification method embodiments.

[0058] In the above scheme, the computer-readable storage medium 50 obtains the predicted light conditions when shooting the image of the vehicle to be identified, and based on the predicted light conditions, selects the first recognition model or the second recognition model as the target recognition model, and both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model, and then the vehicle image to be identified is identified based on the target recognition model to obtain the target vehicle type described by the vehicle to be identified in the vehicle image to be identified. Therefore, on the one hand, the recognition model used for different light conditions is adaptively selected by predicting the light conditions, which helps to improve the compatibility of vehicle type recognition under different light conditions. On the other hand, compared with the laser radar that recognizes the vehicle type through the vehicle contour features, the vehicle type recognition through the image can dig out the vehicle detail features in the image data as much as possible, which helps to improve the precision of the vehicle type recognition results. Therefore, the compatibility of vehicle type recognition under different light conditions can be improved, and the precision of the vehicle type recognition results can be improved.

[0059] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0060] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0061] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0062] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0063] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0064] If the integrated unit is implemented in the form of a software functional unit 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 is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each implementation method 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 and other media that can store program code.

[0065] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

Claims

1. A vehicle type identification method, characterized in that: include: Obtaining predicted lighting conditions when taking an image of a vehicle to be identified; Based on the predicted light conditions, selecting a first recognition model or a second recognition model as a target recognition model; wherein both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model; The vehicle image to be identified is identified based on the target recognition model to obtain a target vehicle model to which the vehicle to be identified in the vehicle image to be identified belongs.

2. The method according to claim 1, characterized in that In the case where the second recognition model is selected as the target recognition model, before the vehicle image to be recognized is recognized based on the target recognition model to obtain the target vehicle model to which the vehicle to be recognized in the vehicle image to be recognized belongs, the method further includes: Determining a plurality of vehicle light regions in the image of the vehicle to be identified; Select at least one of the vehicle light areas as a target area; The image data of the target area is extracted from the image of the vehicle to be identified; wherein the image data is used as input data of the target recognition model.

3. The method according to claim 2, characterized in that The selecting at least one of the vehicle light areas as the target area includes any one of the following: Based on the distortion comparison result between the plurality of headlight regions, the plurality of headlight regions are sorted in order of distortion from small to large, and the headlight regions before the first order are selected; Based on the brightness comparison result between the plurality of vehicle light areas, the plurality of vehicle light areas are sorted in descending order of brightness, and the vehicle light areas before the second order are selected.

4. The method according to claim 1, characterized in that: When the first recognition model is selected as the target recognition model, the vehicle image to be recognized serves as input data of the target recognition model.

5. The method according to claim 1, characterized in that The second recognition model includes a headlight recognition model and a taillight recognition model, the headlight recognition model is used to identify the vehicle type based on the headlight image, and the taillight recognition model is used to identify the vehicle type based on the taillight image. When the second recognition model is selected as the target recognition model, the vehicle image to be identified is identified based on the target recognition model to obtain the target vehicle type to which the vehicle to be identified in the vehicle image to be identified belongs. The method also includes: Analyze the image data of the ground area in the image of the vehicle to be identified to obtain an analysis result; wherein the analysis result includes whether the headlight in the image of the vehicle to be identified is a headlight or a taillight; Based on the analysis result, the headlight recognition model or the taillight recognition model in the target recognition model is selected to recognize the vehicle image to be recognized, so as to obtain a target vehicle model to which the vehicle to be recognized in the vehicle image to be recognized belongs.

6. The method according to claim 5, characterized in that The analyzing the image data of the ground area in the image of the vehicle to be identified to obtain the analysis result includes: Acquire a neighborhood area with a pixel point in the image data of the ground area as a center point; Obtaining a brightness threshold based on the brightness value of each pixel in the neighborhood area; Determine whether to select the center point of the neighborhood area as the target point based on the ratio of the number of pixels in the neighborhood area whose brightness values ​​are higher than the brightness threshold to the number of pixels in the neighborhood area whose brightness values ​​are lower than the brightness threshold; The analysis result is obtained based on the fitting graphs of the target points.

7. The method according to claim 6, characterized in that The determining whether to select the center point of the neighborhood area as the target point based on the ratio of the number of pixels in the neighborhood area whose brightness values ​​are higher than the brightness threshold to the number of pixels in the neighborhood area whose brightness values ​​are lower than the brightness threshold includes at least one of the following: In response to the quantity ratio being within a target interval, determining to select a center point of the neighborhood area as the target point; In response to the quantity ratio being outside the target interval, determining not to select the center point of the neighborhood area as the target point; The center value of the target interval is 0.

5.

8. The method according to claim 6, characterized in that The analysis result is obtained based on the fitting graph of each of the target points, including at least one of the following: In response to the fitting graph including a line segment, determining that the analysis result includes that the image of the vehicle to be identified is a headlight; In response to the fitting graph not including a line segment, determining that the analysis result includes that the image of the vehicle to be identified is a taillight.

9. The method according to any one of claims 1 to 8, characterized in that: The first recognition model is obtained by training based on a sample vehicle image, wherein the sample vehicle image displays the entire vehicle appearance of the sample vehicle and the sample vehicle image is annotated with the model of the sample vehicle; And / or, the second recognition model is trained based on a sample headlight image, wherein the sample headlight image at least displays a headlight part of a sample vehicle and the sample headlight image is annotated with the model of the sample vehicle.

10. A vehicle type identification device, characterized in that: include: An acquisition module, used to acquire predicted light conditions when shooting an image of a vehicle to be identified; A selection module, configured to select a first recognition model or a second recognition model as a target recognition model based on the predicted light conditions; wherein both the first recognition model and the second recognition model are used for vehicle type recognition, and the light conditions applicable to the first recognition model are better than the light conditions applicable to the second recognition model; The recognition module is used to recognize the vehicle image to be recognized based on the target recognition model to obtain the target vehicle model to which the vehicle to be recognized in the vehicle image to be recognized belongs.

11. An electronic device, characterized in that: The invention comprises at least a memory and a processor coupled to each other, wherein the memory at least stores program instructions, and the processor is used to execute the program instructions to implement the vehicle model identification method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the vehicle model identification method described in any one of claims 1 to 9.