Vehicle tail mark detection method, device, electronic equipment and storage medium
Through the combination of vehicle model and vehicle tail mark detection model, the rear image of the vehicle is automatically identified, which solves the problems of low efficiency and low accuracy of the existing vehicle tail mark detection, and realizes efficient and accurate vehicle tail mark detection, reducing manual intervention .
Patent Information
- Application Number
- CN202111467633.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-12-02
AI Technical Summary
The existing vehicle tail mark detection methods are inefficient and low in accuracy, resulting in waste of human resources and detection errors, and it is impossible to effectively identify whether the vehicle tail mark is correctly mounted.
By obtaining the rear image of the vehicle, inputting the vehicle model detection model and the rear mark detection model, identifying the vehicle model and the rear mark, automatically determining whether the rear mark is correctly mounted, and using image processing and machine learning technology to achieve automated detection.
It improves the efficiency and accuracy of vehicle tail mark detection, reduces the dependence of manual inspection, reduces detection errors, and improves the efficiency and quality of the production line.
Smart Images

Figure CN114266930B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to computer technology, and in particular to a vehicle rear logo detection method, device, electronic device and storage medium. Background Art
[0002] During the vehicle production process, after the vehicle is assembled, it is necessary to conduct a quality inspection on the assembled vehicle. The rear label of a vehicle is usually affixed to the rear of the vehicle to indicate the model of the vehicle. Therefore, the above quality inspection includes checking whether the rear label of the vehicle is affixed incorrectly or missing.
[0003] The existing method of checking the rear label of a vehicle mainly involves manually checking whether the rear label of the vehicle is missing one by one, and determining whether the rear label is incorrectly affixed based on the manually memorized correspondence between the vehicle model and the rear label. However, due to limited manual capacity, the existing method of manually checking the rear label of a vehicle has problems such as low efficiency, low accuracy, and large waste of human resources. Summary of the invention
[0004] The present application provides a vehicle tail logo detection method, device, electronic device and storage medium to solve the problems of low efficiency and low accuracy of existing vehicle tail logo detection methods.
[0005] In a first aspect, the present application provides a vehicle rear logo detection method, the method comprising:
[0006] Acquire the rear image of the target vehicle;
[0007] Inputting the target vehicle rear image into a vehicle model detection model, and obtaining a first model of the target vehicle based on the target vehicle rear structure recognition;
[0008] Inputting the target vehicle rear image into a vehicle tail logo detection model to obtain the target vehicle tail logo;
[0009] According to the identified rear mark of the target vehicle, the model of the vehicle is identified to obtain an identification result of the target vehicle;
[0010] Determine, based on the first model and the recognition results of the target vehicle, a detection result of the rear label of the target vehicle; the detection result is used to indicate whether the rear label of the target vehicle is posted incorrectly;
[0011] The detection result is outputted.
[0012] Optionally, determining the detection result of the rear logo of the target vehicle according to the first model and the recognition result of the target vehicle includes:
[0013] If the recognition result of the target vehicle indicates that the second model of the target vehicle is recognized according to the rear mark of the target vehicle, then determining the detection result of the rear mark of the target vehicle according to the first model and the second model;
[0014] If the identification result of the target vehicle indicates that the model of the target vehicle cannot be identified based on the rear label of the target vehicle, then the detection result of the rear label of the target vehicle is determined to be that the rear label of the target vehicle is incorrectly posted.
[0015] Optionally, determining the detection result of the rear logo of the target vehicle according to the first model and the second model includes:
[0016] If the first model and the second model are the same, determining that the detection result is that the rear label of the target vehicle is correctly posted;
[0017] If the first model and the second model are different, determining that the detection result is that the detection result of the rear label of the target vehicle is that the rear label of the target vehicle is incorrectly posted.
[0018] Optionally, there are multiple tail signs, and identifying the model of the vehicle according to the identified tail sign of the target vehicle to obtain the identification result of the target vehicle includes:
[0019] Combining a plurality of the vehicle tail logos to obtain a plurality of vehicle tail logo combinations;
[0020] According to the plurality of vehicle tail logo combinations and the mapping relationship between the vehicle tail logo combinations and the vehicle models, the model of the target vehicle is identified to obtain an identification result of the target vehicle.
[0021] Optionally, the method further includes:
[0022] If the target vehicle rear image is input into a vehicle model detection model, and the first model of the target vehicle is not identified based on the target vehicle rear structure, feedback information is output, where the feedback information is used to indicate that the target vehicle is a new model vehicle.
[0023] Optionally, the method further includes:
[0024] Acquire a first sample image and a second sample image of the target vehicle; the first sample image is an image obtained by annotating the model based on the sample tail image of the target vehicle, and the second sample image is an image obtained by annotating the tail label based on the sample tail image of the target vehicle; the sample tail image is a tail image of the target vehicle captured when the tail label of the target vehicle is correctly posted;
[0025] Using the first sample image, updating and training the vehicle model detection model;
[0026] The vehicle tail logo detection model is updated and trained using the second sample image.
[0027] Optionally, the method further includes:
[0028] Acquire a training data set, the training data set comprising a first training data subset and a second training data subset, the first training data subset comprising at least one image obtained by annotating a model number based on a sample rear image of a sample vehicle, and the second training data subset comprising at least one image obtained by annotating a vehicle rear label based on a sample rear image of a sample vehicle;
[0029] Using the first training data subset, training a first preset model to obtain the vehicle model detection model;
[0030] The second preset model is trained using the second training data subset to obtain the vehicle tail logo detection model.
[0031] Optionally, acquiring the target vehicle rear image includes:
[0032] Acquire M consecutive frames of the target vehicle rear image from the collected target vehicle rear video;
[0033] The step of inputting the target vehicle rear image into a vehicle rear logo detection model to obtain the vehicle rear logo of the target vehicle includes:
[0034] Inputting M frames of the target vehicle's rear end images into a vehicle tail logo detection model in sequence to obtain M recognized vehicle tail logos of the target vehicle;
[0035] The step of identifying the model of the vehicle according to the identified rear mark of the target vehicle and obtaining the identification result of the target vehicle includes:
[0036] According to the M identified tail signs of the target vehicles, the model of the vehicle is identified to obtain M initial identification results of the target vehicles;
[0037] The recognition result of the target vehicle is obtained according to the M initial recognition results of the target vehicle.
[0038] Optionally, after determining the detection result of the rear logo of the target vehicle, the method further includes:
[0039] According to the detection result of the rear mark of the target vehicle, the detection statistical result is updated, and the detection statistical result is used to count the cumulative number of detected vehicles belonging to the same model.
[0040] In a second aspect, the present application provides a vehicle tail sign detection device, the device comprising:
[0041] An acquisition module is used to acquire the rear image of the target vehicle;
[0042] The processing module is used to input the target vehicle rear image into a vehicle model detection model, and obtain the first model of the target vehicle based on the target vehicle rear structure identification; input the target vehicle rear image into a vehicle tail logo detection model to obtain the target vehicle tail logo; identify the vehicle model according to the identified target vehicle tail logo, and obtain the target vehicle identification result; determine the target vehicle tail logo detection result according to the first model and the target vehicle identification result; the detection result is used to characterize whether the target vehicle tail logo is posted incorrectly;
[0043] An output module is used to output the detection result.
[0044] In a third aspect, the present application provides an electronic device, including: at least one processor and a memory;
[0045] The memory stores computer-executable instructions;
[0046] The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method described in any one of the first aspects.
[0047] In a fourth aspect, the present application provides a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the method described in any one of the first aspects is implemented.
[0048] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in any one of the first aspects when executed by a processor.
[0049] The vehicle tail sign detection method, device, electronic device and storage medium provided by the present application can obtain the target vehicle's tail sign through the vehicle tail sign detection model, and the vehicle model can be identified based on the tail sign, thereby obtaining the target vehicle identification result. Through the above-mentioned target vehicle identification result, as well as the first model of the target vehicle obtained based on the vehicle model detection model, the detection result used to characterize whether the target vehicle's tail sign is posted incorrectly can be determined to achieve the target vehicle's tail sign detection. Through the above-mentioned method, there is no need to manually detect the tail sign. Through the automatic detection of whether the vehicle's tail sign is posted incorrectly, the problem of limited manual detection capabilities is avoided, and the detection efficiency and accuracy are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0051] Figure 1 A schematic diagram of a vehicle structure;
[0052] Figure 2 A schematic diagram of a process for detecting a rear vehicle logo provided in this application;
[0053] Figure 3 A flowchart of a model training method provided in this application;
[0054] Figure 4 A schematic diagram of the process of another vehicle tail sign detection method provided in this application;
[0055] Figure 5 A schematic diagram of the structure of a vehicle tail sign detection device provided in this application;
[0056] Figure 6 A schematic diagram of the structure of an electronic device provided in this application.
[0057] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0058] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0059] Figure 1 Figure 1 is a schematic diagram of a vehicle structure. Figure 1 As shown, the tail label of a vehicle is usually affixed to the rear of the vehicle to indicate the model of the vehicle. During the vehicle production process, after the vehicle is assembled, the assembled vehicle needs to be inspected for quality. The quality inspection includes checking whether the tail label of the vehicle is affixed incorrectly or missing.
[0060] The existing method for checking the rear label of a vehicle mainly involves manually checking whether the rear label of the vehicle is missing one by one, and determining whether the rear label of the vehicle is incorrectly affixed based on the manually memorized correspondence between the vehicle model and the rear label.
[0061] However, there are usually many vehicles and models on a vehicle production line, while manual labor is limited and manual memory may be confused. Therefore, the existing vehicle tail logo detection method has problems such as low efficiency, low accuracy, and large waste of human resources.
[0062] Considering that the reason why the existing vehicle tail logo detection method has the above-mentioned problems is that the manual detection capability is limited, the present application proposes a method for automatic vehicle tail logo detection based on an image including the vehicle tail logo, which does not require manual detection of the vehicle tail logo, avoids the problem of limited manual detection capability, and improves detection efficiency and accuracy.
[0063] The execution subject of the above method can be an electronic device with processing function such as a terminal and a server. Optionally, the electronic device can be an image acquisition device that acquires "an image including a car tail logo", that is, the electronic device can have an image acquisition function and a car tail logo detection function. Alternatively, the image acquisition device that acquires "an image including a car tail logo" and the electronic device used to execute the car tail logo detection method can also be different devices. In this implementation, the image acquisition device can acquire the above image and send it to the electronic device, and then the electronic device can detect the car tail logo based on the image.
[0064] The image acquisition device may be, for example, a camera or other device. For example, the camera may be installed on a vehicle quality inspection production line to acquire images corresponding to each vehicle including the rear logo.
[0065] The following uses the above-mentioned electronic device and image acquisition device as different devices as an example, and describes the technical solution of the present application in detail in combination with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0066] Figure 2 This is a flow chart of a vehicle tail mark detection method provided in this application. Figure 2 As shown, the method comprises the following steps:
[0067] S101, acquiring a target vehicle rear image.
[0068] The target vehicle's rear image may include the target vehicle's rear logo and the target vehicle's rear structure. Figure 1 shown.
[0069] In some embodiments, the target vehicle rear image may be at least one image. Alternatively, the target vehicle rear image may be each frame image in a video stream including the target vehicle.
[0070] The electronic device may, for example, receive the target vehicle rear image captured by the above-mentioned image acquisition device. Alternatively, in some embodiments, the electronic device may, for example, also receive the target vehicle rear image input by a user. Alternatively, the electronic device may also receive the target vehicle rear image sent by other electronic devices other than the above-mentioned image acquisition device.
[0071] S102: Input the target vehicle rear image into a vehicle model detection model, and obtain a first model of the target vehicle based on the target vehicle rear structure recognition.
[0072] by Figure 1 Taking the vehicle shown in FIG. 1 as an example, the target vehicle rear structure mentioned here may be, for example, a region in the target vehicle rear image that includes the entire rear of the vehicle.
[0073] The vehicle model detection model may be pre-stored in the electronic device. The vehicle model detection model may be used to output a first model of the target vehicle based on the target vehicle tail structure included in the target vehicle tail image. Exemplarily, the vehicle model detection model may be, for example, a model obtained by training a first preset model. It should be understood that the present application does not limit the method for training the vehicle model detection model. Optionally, reference may be made to an existing model training method, which will not be described in detail herein.
[0074] S103: Input the target vehicle rear image into a vehicle tail logo detection model to obtain the target vehicle tail logo.
[0075] The above-mentioned vehicle tail sign detection model may be pre-stored in the electronic device. The vehicle tail sign detection model may be used to output the vehicle tail sign of the target vehicle based on the target vehicle tail image. Exemplarily, the vehicle tail sign detection model may be, for example, a model obtained by training the second preset model. It should be understood that the present application does not limit the method for training the vehicle tail sign detection model. Optionally, reference may be made to the existing model training method, which will not be described in detail here.
[0076] S104, identifying the model of the vehicle according to the identified rear logo of the target vehicle, and obtaining an identification result of the target vehicle.
[0077] If the electronic device can identify the model of the vehicle according to the tail mark of the target vehicle obtained by the above identification, the identification result of the target vehicle can be used to indicate that the second model of the target vehicle is identified according to the tail mark of the target vehicle. Alternatively, if the electronic device cannot identify the model of the vehicle according to the tail mark of the target vehicle, the identification result of the target vehicle can be used to indicate that the model of the target vehicle is not identified according to the tail mark of the target vehicle.
[0078] Optionally, for different target vehicles, the tail mark of the target vehicle identified by the electronic device may be one or more. Figure 1 As shown, the target vehicle may include only one tail mark (such as tail mark 1), or may include multiple tail marks (such as tail mark 1 and tail mark 2).
[0079] Taking the case where the target vehicle has multiple tail logos as an example, the electronic device can combine the multiple tail logos to obtain multiple tail logo combinations. Then, according to the multiple tail logo combinations and the mapping relationship between the tail logo combinations and the vehicle models, the model of the target vehicle is identified to obtain the identification result of the target vehicle.
[0080] For example, the target vehicle's tail logo obtained by the electronic device includes tail logo 1 and tail logo 2. By combining tail logo 1 and tail logo 2, two tail logo combinations of "tail logo 1 and tail logo 2" and "tail logo 2 and tail logo 1" can be obtained. Then, based on the multiple tail logo combinations and the mapping relationship between the tail logo combinations and the vehicle models, the electronic device can identify the model of the target vehicle.
[0081] For example, the mapping relationship between the above-mentioned vehicle tail logo combination and the vehicle model can be shown in the following Table 1:
[0082] Table 1
[0083]
[0084]
[0085] Among them, taking Table 1 as an example, there is a mapping relationship between "tail mark 2, tail mark 1" and model 3 in the mapping relationship. According to the above-mentioned "tail mark 1, tail mark 2", and the two tail mark combinations of "tail mark 2, tail mark 1", and the mapping relationship between the tail mark combination and the vehicle model, the electronic device can identify the model of the target vehicle as model 3, and the identification result of the target vehicle is that the model of the target vehicle is model 3.
[0086] For example, the mapping relationship between the above-mentioned vehicle tail logo combination and the vehicle model is shown in Table 2 below:
[0087] Table 2
[0088] Car tail logo combination Vehicle Model Car tail mark 1 Car tail mark 4 Model 1 Car tail mark 4 Car tail mark 2 Model 2 Car tail mark 3 Car tail mark 1 Model 3 Car tail mark 5 Car tail mark 3 Model 4
[0089] Still taking the above-mentioned tail logo combination including "tail logo 1, tail logo 2", and "tail logo 2, tail logo 1" as an example, according to the mapping relationship shown in Table 2, the electronic device cannot identify the model of the vehicle based on the tail logo of the target vehicle, then the recognition result of the target vehicle can be used to characterize that the model of the target vehicle is not identified based on the tail logo of the target vehicle.
[0090] Taking the target vehicle having one tail mark as an example, the electronic device can, for example, identify the model of the target vehicle based on the one tail mark and the mapping relationship between the tail mark combination and the vehicle model, and obtain the identification result of the target vehicle. Optionally, the specific implementation method of the electronic device obtaining the identification result of the target vehicle based on the one tail mark can refer to the above method, which will not be repeated here.
[0091] S105: Determine a detection result of the rear logo of the target vehicle according to the recognition results of the first model and the target vehicle.
[0092] Among them, the above detection results can be used to indicate whether the rear label of the target vehicle is posted incorrectly.
[0093] Exemplarily, taking the above-mentioned first model as model 1, and the recognition result of the target vehicle as model 2 as an example, the electronic device can determine that the rear label of the target vehicle is posted incorrectly. Alternatively, taking the above-mentioned first model as model 1, and the recognition result of the target vehicle as model 1 as an example, the electronic device can determine that the rear label of the target vehicle is posted correctly. Alternatively, taking the above-mentioned first model as model 1, and the recognition result of the target vehicle as model 1, and the target vehicle recognition result as model 1, the electronic device can also determine that the rear label of the target vehicle is posted incorrectly.
[0094] S106. Output the detection result.
[0095] Optionally, the electronic device may output the above test results to a user terminal, for example, via a wireless network. The user terminal may, for example, be a user terminal corresponding to a vehicle quality inspection user. Optionally, the electronic device may also send the test results to the user terminal after receiving a request message from the user terminal for requesting to obtain the above test results. Alternatively, the electronic device may also output the test results, for example, via a display device. Optionally, the display device may be a display device of the electronic device, or a display device connected to the electronic device.
[0096] In this embodiment, the tail sign of the target vehicle can be obtained through the tail sign detection model, and the model of the vehicle can be identified based on the tail sign, thereby obtaining the identification result of the target vehicle. Through the identification result of the target vehicle and the first model of the target vehicle obtained based on the vehicle model detection model, the detection result used to characterize whether the tail sign of the target vehicle is posted incorrectly can be determined to achieve the detection of the tail sign of the target vehicle. Through the above method, there is no need to manually detect the tail sign. By automatically detecting whether the tail sign of the vehicle is posted incorrectly, the problem of limited manual detection ability is avoided, and the detection efficiency and accuracy are improved.
[0097] The following is a detailed description of how the electronic device determines the detection result of the tail mark of the target vehicle based on the recognition result of the first model and the target vehicle:
[0098] As a possible implementation method, taking the identification result of the target vehicle as an example, in which the second model of the target vehicle is identified based on the rear logo of the target vehicle, optionally, the electronic device can determine the detection result of the rear logo of the target vehicle based on the first model of the target vehicle identified based on the rear structure of the target vehicle, and the second model.
[0099] In this example, optionally, the electronic device can determine that the second model obtained based on the tail label of the target vehicle is correct when the first model and the second model are the same. Then the electronic device can determine that the tail label is correctly posted, and therefore can determine that the above detection result is that the tail label of the target vehicle is correctly posted.
[0100] When the first model and the second model are different, it means that the second model obtained based on the rear label of the target vehicle is wrong, and the electronic device can determine that the rear label is posted incorrectly. Therefore, the electronic device can determine that the above detection result is that the rear label of the target vehicle is posted incorrectly.
[0101] Taking the above-mentioned target vehicle recognition result characterization based on the failure to recognize the model of the target vehicle according to the rear label of the target vehicle as an example, in this example, the electronic device can determine that the detection result of the target vehicle's rear label is that the target vehicle's rear label is posted incorrectly.
[0102] In this embodiment, when the identification result of the target vehicle indicates that the second model of the target vehicle is identified according to the tail mark of the target vehicle, and the first model of the target vehicle obtained based on the vehicle model detection model is the same as the second model obtained based on the tail mark of the target vehicle, the electronic device can determine that the tail mark of the target vehicle is correctly posted. By jointly determining whether the tail mark is posted incorrectly by the first model and the second model, the accuracy of the automatic tail mark detection is further improved.
[0103] As a possible implementation, if the target vehicle rear image is input into the vehicle model detection model, and the electronic device fails to identify the first model of the target vehicle based on the target vehicle rear structure, it means that the vehicle may be a new model, resulting in the vehicle model detection model failing to determine the model of the vehicle based on the existing model information. The electronic device can then output vehicle feedback information indicating that the target vehicle is a new model, to prompt the user that a new model vehicle has appeared. Optionally, the electronic device can output the feedback information in a manner that refers to the implementation of the electronic device outputting the detection result described in the aforementioned embodiment, which will not be repeated here.
[0104] In some embodiments, after determining that the target vehicle is a new model of vehicle, the electronic device can also use the sample image of the target vehicle to update and train the above-mentioned vehicle model detection model and tail logo detection model, so that the vehicle model detection model can identify the model of the target vehicle, and the tail logo detection model can identify the tail logo of the vehicle, thereby further improving the accuracy and scope of application of tail logo detection.
[0105] Optionally, the electronic device may first obtain a first sample image and a second sample image of the target vehicle. The first sample image is an image obtained by annotating the model based on the sample tail image of the target vehicle. The second sample image is an image obtained by annotating the tail label based on the sample tail image of the target vehicle. The sample tail image is a tail image of the target vehicle captured when the tail label of the target vehicle is correctly posted.
[0106] Exemplarily, the electronic device may receive the first sample image and the second sample image of the target vehicle input by the user. Alternatively, the electronic device may also receive the sample tail image of the target vehicle, and then the electronic device may receive the annotation information of the sample tail image of the target vehicle by the user to obtain the first sample image and the second sample image of the target vehicle.
[0107] Exemplarily, the electronic device may receive the first sample image and the second sample image of the target vehicle, or the sample tail image of the target vehicle, input by the user, for example, through an application programming interface (API) or a graphical user interface (GUI).
[0108] Then, the electronic device may use the first sample image to update and train the vehicle model detection model, and use the second sample image to update and train the vehicle tail logo detection model.
[0109] Optionally, the electronic device may use, for example, first sample images and second sample images of vehicles of various models, and the first sample image and second sample image of the target vehicle to update and train the vehicle model detection model and the vehicle tail logo detection model.
[0110] In addition, it should be understood that the present application does not limit the execution order of the electronic device updating and training the vehicle model detection model, and updating and training the vehicle tail logo detection model. Optionally, the electronic device may first use the above-mentioned first sample image to update the vehicle model detection model, and then use the second sample image to update the vehicle tail logo detection model. Alternatively, the electronic device may also first use the second sample image to update the vehicle tail logo detection model, and then use the above-mentioned first sample image to update the vehicle model detection model. Alternatively, the electronic device may also simultaneously update the vehicle tail logo detection model and update the vehicle model detection model.
[0111] The following is a detailed description of how to train the above-mentioned vehicle model detection model. It should be understood that the device used to train the above-mentioned vehicle model detection model and the vehicle tail logo detection model can be the same electronic device or different electronic devices. The following is an exemplary description based on the example that the device for training the vehicle model detection model and the vehicle tail logo detection model can be the same electronic device. In addition, it should be understood that the device for training the vehicle model detection model and the vehicle tail logo detection model and the electronic device for executing the vehicle tail logo detection method can be the same device or different electronic devices.
[0112] For example, Figure 3 A flow chart of a model training method provided in this application. Figure 3 As shown, the method comprises the following steps:
[0113] S201. Obtain a training data set.
[0114] The training data set includes a first training data subset and a second training data subset. The first training data subset includes at least one image obtained by annotating the model based on a sample tail image of a sample vehicle. The second training data subset includes at least one image obtained by annotating the vehicle tail logo based on a sample tail image of a sample vehicle.
[0115] Optionally, the electronic device may obtain the training data set in a manner that refers to the implementation method of obtaining the first sample image and the second sample image of the target vehicle described in the above embodiment, which will not be described in detail here.
[0116] S202: Use the first training data subset to train the first preset model to obtain a vehicle model detection model.
[0117] It should be understood that the present application does not limit the type of the first preset model. Exemplarily, the first preset model may be a model such as a convolutional neural network (CNN).
[0118] S203: Use the second training data subset to train the second preset model to obtain a vehicle rear logo detection model.
[0119] It should be understood that the present application does not limit the type of the second preset model. Optionally, the second preset model and the first preset model can be the same preset model or different preset models.
[0120] In addition, it should be understood that the present application does not limit the order in which the electronic device executes steps S202 and S203. Optionally, the electronic device may first execute step S202 and then execute step S203. Alternatively, the electronic device may first execute step S202 and then execute step S203. Alternatively, the electronic device may also execute steps S202 and S203 simultaneously.
[0121] As a possible implementation, the target vehicle rear image acquired by the electronic device may also be a continuous M-frame target vehicle rear image in a target vehicle rear video. In this implementation, the electronic device may acquire a continuous M-frame target vehicle rear image from the acquired target vehicle rear video. Optionally, the target vehicle rear video may be acquired by the electronic device or by an image acquisition device. The electronic device may receive the target vehicle rear video from the image acquisition device. The M may be an integer greater than or equal to 1. Optionally, the value of M may be, for example, pre-stored in the electronic device by a user.
[0122] In this implementation, optionally, after the electronic device obtains M consecutive frames of target vehicle rear images from the collected target vehicle rear video, it can input the M frames of target vehicle rear images into the vehicle rear logo detection model in sequence to obtain M identified target vehicle rear logos.
[0123] Then, the electronic device can identify the model of the vehicle according to the rear logo of the M identified target vehicles, and obtain the identification results of the M initial target vehicles. Based on the identification results of the M initial target vehicles, the electronic device can obtain the identification result of the target vehicle to improve the accuracy of determining the identification result for the target vehicle.
[0124] Optionally, if the number of recognition results for characterizing "identifying the second model of the target vehicle based on the rear mark of the target vehicle" among the recognition results of the above-mentioned M initial target vehicles is greater than a preset number threshold and less than or equal to M, it means that the M frames of target vehicle rear images are vehicle rear images corresponding to the same target vehicle. Based on the recognition results of the M initial target vehicles, the electronic device can obtain a recognition result of the target vehicle for characterizing "identifying the second model of the target vehicle based on the rear mark of the target vehicle". The above-mentioned preset number threshold is less than M, and the preset number threshold can be, for example, pre-stored by the user in the electronic device.
[0125] In this implementation, the electronic device may optionally obtain a target vehicle identification result for identifying the target vehicle "the second model of the target vehicle is identified according to the rear mark of the target vehicle" when the ratio of the number of identification results for identifying the target vehicle "the second model of the target vehicle is identified according to the rear mark of the target vehicle" in the above-mentioned M initial target vehicle identification results to M is greater than or equal to a preset ratio threshold and less than or equal to 1. The above-mentioned preset ratio threshold may be greater than 0 and less than or equal to 1, and the preset ratio threshold may be, for example, pre-stored in the electronic device by the user.
[0126] Alternatively, if the number of recognition results used to characterize "the second model of the target vehicle is recognized based on the tail logo of the target vehicle" among the above-mentioned M initial target vehicle recognition results is greater than the above-mentioned M, it means that the number of tail logos included in the M frames of the target vehicle tail image is too large, that is, the tail logo of the vehicle may be posted repeatedly. Therefore, based on the recognition results of the M initial target vehicles, the electronic device can, for example, obtain a recognition result of the target vehicle in which the model of the target vehicle is not recognized based on the tail logo of the target vehicle, or the recognition result of the target vehicle can also be used to characterize that the tail logo is posted incorrectly.
[0127] Alternatively, if the number of recognition results characterizing "recognizing the second model of the target vehicle based on the tail sign of the target vehicle" among the recognition results of the above-mentioned M initial target vehicles is less than or equal to the above-mentioned preset number threshold, it means that the electronic device can detect the tail sign of the target vehicle less frequently, and the tail sign of the target vehicle may be posted irregularly or partially blocked. Therefore, based on the recognition results of the M initial target vehicles, the electronic device can, for example, obtain the recognition result of the target vehicle whose model is not recognized based on the tail sign of the target vehicle.
[0128] As a possible implementation manner, after determining the detection result of the rear mark of the target vehicle, the electronic device may also update the detection statistical result used to count the cumulative number of vehicles of the same model detected according to the detection result of the rear mark of the target vehicle.
[0129] Optionally, when the detection result is used to indicate that the rear label of the target vehicle is correctly posted, the electronic device may add 1 to the cumulative number of vehicles of the same model as the target vehicle. If the detection result is used to indicate that the rear label of the target vehicle is posted incorrectly, the electronic device may not update the cumulative number of vehicles of the same model as the target vehicle.
[0130] In this implementation, after updating the above detection statistics, the electronic device may optionally output the updated detection statistics so that the user can understand the cumulative number of vehicles of the same model detected, thereby further improving the user experience.
[0131] Figure 4 This is a flow chart of another method for detecting a rear logo of a vehicle provided in this application. Figure 4 As shown, the method comprises the following steps:
[0132] Step 1: The image acquisition device acquires a video of the rear end of a target vehicle and sends the video of the rear end of the target vehicle to an electronic device.
[0133] Correspondingly, the electronic device can receive the rear video of the target vehicle.
[0134] Step 2: The electronic device obtains M consecutive frames of target vehicle rear end images from the target vehicle rear end video.
[0135] Then, the electronic device may perform step 6, and steps 3 to 5.
[0136] Step 3: The electronic device sequentially inputs the M frames of the target vehicle rear end images into a vehicle rear end logo detection model to obtain M recognized vehicle rear end logos of the target vehicle.
[0137] Step 4: The electronic device identifies the model of the vehicle based on the rear logo of the M identified target vehicles, and obtains the identification results of M initial target vehicles.
[0138] Step 5: Based on the recognition results of the M initial target vehicles, the electronic device can obtain the recognition result of the target vehicle.
[0139] Step 6: Input the target vehicle rear image into the vehicle model detection model, and obtain the first model of the target vehicle based on the target vehicle rear structure recognition.
[0140] Step 7: When the first model is the same as any model in the preset model library, and the recognition result of the target vehicle is used to characterize the second model of the target vehicle identified according to the rear mark of the target vehicle, determine whether the second model is consistent with the first model.
[0141] If the second model is consistent with the first model, the electronic device can determine that the rear label of the target vehicle is correctly posted, and the electronic device can execute step 8. If the second model is inconsistent with the first model, the electronic device can determine that the rear label of the target vehicle is incorrectly posted, and the electronic device can execute step 9.
[0142] If the first model is different from any model in the preset model library, the electronic device may determine that the model of the target vehicle is a new model.
[0143] Step 8: Make sure the rear label of the target vehicle is posted correctly.
[0144] Then, the electronic device may perform step 10 .
[0145] Step 9: Determine if the target vehicle's rear label is posted incorrectly.
[0146] Step 10: Based on the detection result of the rear mark of the target vehicle, update the detection statistical result used to count the number of vehicles of the same model that have been detected cumulatively.
[0147] Figure 5 This is a schematic diagram of the structure of a vehicle tail sign detection device provided in this application. Figure 5 As shown, the device includes: an acquisition module 31, a processing module 32, and an output module 33. Among them,
[0148] The acquisition module 31 is used to acquire the rear image of the target vehicle.
[0149] The processing module 32 is used to input the target vehicle rear image into a vehicle model detection model, and obtain the first model of the target vehicle based on the target vehicle rear structure recognition; input the target vehicle rear image into a vehicle tail logo detection model to obtain the target vehicle tail logo; identify the vehicle model based on the identified target vehicle tail logo, and obtain the target vehicle recognition result; determine the target vehicle tail logo detection result based on the first model and the target vehicle recognition result. The detection result is used to characterize whether the target vehicle tail logo is posted incorrectly.
[0150] The output module 33 is used to output the detection result.
[0151] Optionally, the processing module 32 is specifically used to determine the detection result of the rear label of the target vehicle based on the first model and the second model when the recognition result of the target vehicle represents that the second model of the target vehicle is identified according to the rear label of the target vehicle; and to determine that the detection result of the rear label of the target vehicle is that the rear label of the target vehicle is incorrectly posted when the recognition result of the target vehicle represents that the model of the target vehicle is not identified based on the rear label of the target vehicle.
[0152] Optionally, the processing module 32 is specifically configured to determine that the detection result is that the tail label of the target vehicle is correctly posted when the first model and the second model are the same. When the first model and the second model are different, determine that the detection result is that the tail label of the target vehicle is incorrectly posted.
[0153] Optionally, the processing module 32 is specifically used to combine multiple vehicle tail logos to obtain multiple vehicle tail logo combinations; identify the model of the target vehicle according to the multiple vehicle tail logo combinations and the mapping relationship between the vehicle tail logo combinations and the vehicle models, and obtain the identification result of the target vehicle.
[0154] Optionally, the output module 33 is further configured to output feedback information when the processing module 32 inputs the target vehicle rear image into the vehicle model detection model and fails to identify the first model of the target vehicle based on the target vehicle rear structure. The feedback information is used to indicate that the target vehicle is a new model vehicle.
[0155] Optionally, the device may further include a training module 34, which is used to obtain a first sample image and a second sample image of the target vehicle; use the first sample image to update the vehicle model detection model; use the second sample image to update the vehicle tail logo detection model. The first sample image is an image obtained by annotating the model based on the sample tail image of the target vehicle, and the second sample image is an image obtained by annotating the tail logo based on the sample tail image of the target vehicle; the sample tail image is a tail image of the target vehicle captured when the tail logo of the target vehicle is correctly posted.
[0156] Optionally, the training module 34 is further used to obtain a training data set, use the first training data subset to train the first preset model to obtain the vehicle model detection model; use the second training data subset to train the second preset model to obtain the vehicle tail logo detection model. The training data set includes a first training data subset and a second training data subset, the first training data subset includes at least one image obtained by annotating the model based on a sample tail image of a sample vehicle, and the second training data subset includes at least one image obtained by annotating the vehicle tail logo based on a sample tail image of a sample vehicle.
[0157] Optionally, the acquisition module 31 is specifically used to acquire M consecutive frames of the target vehicle's rear image from the collected target vehicle's rear video. In this implementation, the processing module 32 is specifically used to sequentially input the M frames of the target vehicle's rear image into a vehicle tail logo detection model to obtain M identified vehicle tail logos of the target vehicle; identify the vehicle model based on the M identified vehicle tail logos of the target vehicle to obtain M initial identification results of the target vehicle; and obtain the identification result of the target vehicle based on the M initial identification results of the target vehicle.
[0158] Optionally, the device may further include an updating module 35, which is used to update the detection statistical result according to the detection result of the tail mark of the target vehicle after determining the detection result of the tail mark of the target vehicle. The detection statistical result is used to count the number of vehicles of the same model that have been detected cumulatively.
[0159] The vehicle tail sign detection device provided in this embodiment can execute the above-mentioned vehicle tail sign detection method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0160] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 6 As shown, the electronic device 400 may include: at least one processor 401 and a memory 402 .
[0161] The memory 402 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.
[0162] The memory 402 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0163] The processor 401 is used to execute the computer-executable instructions stored in the memory 402 to implement the vehicle tail logo detection method described in the above method embodiment. The processor 401 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0164] Optionally, the electronic device 400 may further include a communication interface 403. In a specific implementation, if the communication interface 403, the memory 402 and the processor 401 are implemented independently, the communication interface 403, the memory 402 and the processor 401 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0165] Optionally, in a specific implementation, if the communication interface 403, the memory 402 and the processor 401 are integrated on a chip, the communication interface 403, the memory 402 and the processor 401 can communicate through an internal interface.
[0166] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used for the methods in the above embodiments.
[0167] The present application also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of an electronic device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the electronic device implements the vehicle tail logo detection method provided by the above various embodiments.
[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting a vehicle tail sign, It is characterized in that The method comprises: Acquire M consecutive frames of target vehicle rear end images, where M is an integer greater than 1; Inputting the target vehicle rear image into a vehicle model detection model, and obtaining a first model of the target vehicle based on the target vehicle rear structure recognition included in the target vehicle rear image; Input the tail image of the target vehicle in M frames into the vehicle tail logo detection model in sequence to obtain the tail logo of the target vehicle in each frame in the M frames; When there are multiple tail signs of the target vehicle in each frame, for the multiple tail signs of the target vehicle in each frame in M frames, the multiple tail signs of the target vehicle in each frame are combined to obtain a combination of multiple tail signs of the target vehicle in each frame; According to the multiple tail logo combinations of the target vehicle in each frame and the mapping relationship between the tail logo combinations and the vehicle models, the model of the target vehicle in each frame is identified to obtain M initial recognition results of the target vehicle; the recognition results are used to indicate whether the second model of the target vehicle is recognized; If, among the M initial recognition results of the target vehicle, the number of recognition results for characterizing that the second model of the target vehicle is recognized is greater than a preset number threshold and is less than or equal to M, then the recognition result of the target vehicle is determined to be that the second model of the target vehicle is recognized; wherein the preset number threshold is less than the M; If, among the M initial recognition results of the target vehicle, the number of recognition results for indicating that the second model of the target vehicle is recognized is greater than the M, or less than or equal to the preset number threshold, then determining that the recognition result of the target vehicle is that the second model of the target vehicle is not recognized; Determine, based on the first model and the recognition results of the target vehicle, a detection result of the rear label of the target vehicle; the detection result is used to indicate whether the rear label of the target vehicle is posted incorrectly; The detection result is outputted.
2. The method according to claim 1, It is characterized in that The step of determining the detection result of the rear logo of the target vehicle according to the recognition result of the first model and the target vehicle includes: If the recognition result of the target vehicle indicates that the second model of the target vehicle is recognized according to the rear mark of the target vehicle, then determining the detection result of the rear mark of the target vehicle according to the first model and the second model; If the identification result of the target vehicle indicates that the model of the target vehicle cannot be identified based on the rear label of the target vehicle, then the detection result of the rear label of the target vehicle is determined to be that the rear label of the target vehicle is incorrectly posted.
3. The method according to claim 2, It is characterized in that The step of determining the detection result of the rear logo of the target vehicle according to the first model and the second model includes: If the first model and the second model are the same, determining that the detection result is that the rear label of the target vehicle is correctly posted; If the first model and the second model are different, determining that the detection result is that the detection result of the rear label of the target vehicle is that the rear label of the target vehicle is incorrectly posted.
4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: If the target vehicle rear image is input into a vehicle model detection model, and the first model of the target vehicle is not identified based on the target vehicle rear structure, feedback information is output, where the feedback information is used to indicate that the target vehicle is a new model vehicle.
5. The method according to claim 4, It is characterized in that The method further comprises: Acquire a first sample image and a second sample image of the target vehicle; the first sample image is an image obtained by annotating the model based on the sample tail image of the target vehicle, and the second sample image is an image obtained by annotating the tail label based on the sample tail image of the target vehicle; the sample tail image is a tail image of the target vehicle captured when the tail label of the target vehicle is correctly posted; Using the first sample image, updating and training the vehicle model detection model; The vehicle tail logo detection model is updated and trained using the second sample image.
6. The method according to claim 5, It is characterized in that The method further comprises: Acquire a training data set, the training data set comprising a first training data subset and a second training data subset, the first training data subset comprising at least one image obtained by annotating a model number based on a sample rear image of a sample vehicle, and the second training data subset comprising at least one image obtained by annotating a vehicle rear label based on a sample rear image of a sample vehicle; Using the first training data subset, training a first preset model to obtain the vehicle model detection model; The second preset model is trained using the second training data subset to obtain the vehicle tail logo detection model.
7. The method according to any one of claims 1 to 3, It is characterized in that The step of acquiring M consecutive frames of target vehicle rear end images comprises: Acquire M consecutive frames of the target vehicle rear end image from the collected target vehicle rear end video.
8. The method according to any one of claims 1 to 3, It is characterized in that After determining the detection result of the rear mark of the target vehicle, the method further includes: According to the detection result of the rear mark of the target vehicle, the detection statistical result is updated, and the detection statistical result is used to count the cumulative number of detected vehicles belonging to the same model.
9. A vehicle tail mark detection device, It is characterized in that The device comprises: An acquisition module, used to acquire M consecutive frames of target vehicle rear end images, where M is an integer greater than 1; A processing module, configured to input the target vehicle rear image into a vehicle model detection model, and obtain a first model of the target vehicle based on the target vehicle rear structure recognition included in the target vehicle rear image; Input the tail image of the target vehicle in M frames into the vehicle tail logo detection model in sequence to obtain the tail logo of the target vehicle in each frame in the M frames; When there are multiple tail signs of the target vehicle in each frame, for the multiple tail signs of the target vehicle in each frame in M frames, the multiple tail signs of the target vehicle in each frame are combined to obtain a combination of multiple tail signs of the target vehicle in each frame; According to the multiple tail logo combinations of the target vehicle in each frame and the mapping relationship between the tail logo combinations and the vehicle models, the model of the target vehicle in each frame is identified to obtain M initial recognition results of the target vehicle; the recognition results are used to indicate whether the second model of the target vehicle is recognized; If, among the M initial recognition results of the target vehicle, the number of recognition results for characterizing that the second model of the target vehicle is recognized is greater than a preset number threshold and is less than or equal to M, then the recognition result of the target vehicle is determined to be that the second model of the target vehicle is recognized; wherein the preset number threshold is less than the M; If, among the M initial recognition results of the target vehicle, the number of recognition results for indicating that the second model of the target vehicle is recognized is greater than the M, or less than or equal to the preset number threshold, then determining that the recognition result of the target vehicle is that the second model of the target vehicle is not recognized; Determine, based on the first model and the recognition results of the target vehicle, a detection result of the rear label of the target vehicle; the detection result is used to indicate whether the rear label of the target vehicle is posted incorrectly; An output module is used to output the detection result.
10. An electronic device, It is characterized in that include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Vehicle tail character recognition based vehicle type identification method and system
CN105046255A
Vehicle identification method and device and client side
CN105426899A
Method, device and server for improving vehicle loss assessment image recognition result
CN107766805A
Vehicle detection method and device, computer equipment and storage medium
CN111144372A
Vehicle inspection method and device, electronic equipment and storage medium
CN111652087A
