A vehicle re-identification model training method and device
By establishing primary and secondary annotation libraries to select data groups for vehicle re-identification model training, the problem of traditional vehicle re-identification systems being unable to upgrade autonomously is solved, enabling online training and autonomous upgrading of the model, and improving the accuracy and adaptability of vehicle re-identification.
Patent Information
- Application Number
- CN202011079672.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-10
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2040-10-10
AI Technical Summary
Traditional vehicle re-identification (ReID) systems cannot be trained online or upgraded autonomously, resulting in the inability of the algorithm to automatically update and optimize based on new data.
By establishing a primary and secondary annotation library, high-confidence data sets are selected for model training. After a certain number of data sets are obtained from the secondary annotation library, the vehicle re-identification model is trained online, enabling the model to upgrade autonomously.
It has achieved autonomous upgrading of the vehicle re-identification model, improving the model's accuracy and adaptability, and enabling it to be automatically updated and optimized based on new data.
Smart Images

Figure CN114419385B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent transportation, in particular to a vehicle re-identification model training method and device. BACKGROUND
[0002] A traditional vehicle re-identification ReID system needs to be trained offline and then loaded into a device for running, and does not have the ability of online training and algorithm self-upgrading.
[0003] The related art does not provide a solution to the problem that the vehicle re-identification ReID does not have the ability of self-upgrading through offline training. SUMMARY
[0004] The embodiments of the present application provide a vehicle re-identification model training method and device to at least solve the problem that the vehicle re-identification ReID does not have the ability of self-upgrading through offline training in the related art.
[0005] According to an embodiment of the present application, a vehicle re-identification model training method is provided, comprising:
[0006] determining vehicle electronic information corresponding to a predetermined number of vehicle images;
[0007] storing the data groups in a pre-set first-level annotation library, wherein each data group includes the vehicle image and the vehicle electronic information;
[0008] storing data groups with a target confidence greater than a first preset threshold in the first-level annotation library into a second-level annotation library;
[0009] In the case where the number of data groups in the second-level annotation library is greater than or equal to a second preset threshold, training a vehicle re-identification model according to the second-level annotation library to obtain a target re-identification model.
[0010] Optionally, after training the vehicle re-identification model according to the second-level annotation library to obtain the target re-identification model, the method further comprises:
[0011] inputting a target image of a target vehicle into the target re-identification model to obtain a re-identification result of the target vehicle output by the target re-identification model.
[0012] Optionally, determining the vehicle electronic information corresponding to the predetermined number of vehicle images comprises:
[0013] repeating the following steps to obtain the vehicle electronic information corresponding to the predetermined number of vehicle images:
[0014] acquiring a vehicle image by a first device, and acquiring the detection result of the vehicle by a second device;
[0015] acquiring the vehicle electronic information by a roadside communication device, and positioning the vehicle communication device of the vehicle to obtain the positioning result;
[0016] determining the vehicle electronic information corresponding to the vehicle image according to the detection result and the positioning result.
[0017] Optionally, determining the vehicle electronic information corresponding to the vehicle image according to the detection result and the positioning result comprises:
[0018] determining the position coordinates of the vehicle at the second positioning time according to the first position information in the detection result and the vehicle speed, wherein the detection result comprises the first position information, the vehicle speed, and the first positioning time, and the positioning result comprises the second position information and the second positioning time;
[0019] in a case where the distance difference between the position coordinates and the second position information is less than a second preset threshold, determining that the vehicle image and the vehicle electronic information correspond to the same vehicle, and obtaining the vehicle electronic information corresponding to the vehicle image.
[0020] Optionally, the method further comprises:
[0021] determining the target confidence of the data group according to the first position confidence in the detection result and the second position confidence in the positioning result.
[0022] Optionally, acquiring the detection result of the vehicle by the second device comprises:
[0023] in a case where the second device is a millimeter wave radar, positioning the vehicle by the millimeter wave radar to obtain the detection result, wherein the detection result comprises the first position information, the vehicle speed, the first positioning time, and the first position confidence;
[0024] in a case where the second device is a laser radar, positioning the vehicle by the laser radar at least twice to obtain the first position, the first time, the first confidence, the second position, the second time, and the second confidence; determining the vehicle speed according to the first position, the second position, the first time, and the second time to obtain the detection result, wherein the first position information is the second position, the first positioning time is the second time, and the first position confidence is the average of the first confidence and the second confidence.
[0025] Optionally, after storing the data group with a target confidence greater than a first preset threshold in the first-level annotation library into the second-level annotation library, the method further comprises:
[0026] receiving an annotation instruction of manually annotating a target data group in the first-level annotation library and not belonging to the second-level annotation library;
[0027] annotating the target data group according to the annotation instruction;
[0028] storing the annotated target data group into the second-level annotation library.
[0029] According to another embodiment of the present application, a vehicle re-identification model training device is further provided, comprising:
[0030] a determination module configured to determine vehicle electronic information corresponding to a predetermined number of vehicle images;
[0031] a first storage module configured to store the predetermined number of data groups into a pre-set first-level annotation library, wherein each data group comprises the vehicle image and the vehicle electronic information;
[0032] a second storage module configured to store a data group with a target confidence greater than a first preset threshold in the first-level annotation library into a second-level annotation library;
[0033] a training module configured to train a vehicle re-identification model according to the second-level annotation library to obtain a target re-identification model in a case that the number of data groups in the second-level annotation library is greater than or equal to a second preset threshold.
[0034] Optionally, the device further comprises:
[0035] a re-identification module configured to input a target image of a target vehicle into the target re-identification model to obtain a re-identification result of the target vehicle output by the target re-identification model.
[0036] Optionally, the determination module comprises:
[0037] an execution sub-module configured to repeatedly execute the following steps to obtain the vehicle electronic information corresponding to the predetermined number of vehicle images:
[0038] an acquisition unit configured to acquire a vehicle image through a first device and acquire the detection result of the vehicle through a second device;
[0039] a positioning unit configured to acquire the vehicle electronic information through a roadside communication device and position a vehicle-mounted communication device of the vehicle to obtain the positioning result;
[0040] The first determining unit is configured to determine the vehicle electronic information corresponding to the vehicle image according to the detection result and the positioning result.
[0041] Optionally, the first determining unit is further configured to
[0042] determine the position coordinate of the vehicle at the second positioning time according to the first position information in the detection result and the vehicle speed, wherein the detection result comprises the first position information, the vehicle speed, and the first positioning time, and the positioning result comprises the second position information and the second positioning time;
[0043] In a case where a distance difference between the position coordinate and the second position information is less than a second preset threshold, it is determined that the vehicle image and the vehicle electronic information correspond to a same vehicle, and the vehicle electronic information corresponding to the vehicle image is obtained.
[0044] Optionally, the apparatus further comprises:
[0045] The second determining unit is configured to determine a target confidence of the data group according to a first position confidence in the detection result and a second position confidence in the positioning result.
[0046] Optionally, the obtaining unit is further configured to
[0047] In a case where the second device is a millimeter wave radar, the vehicle is positioned by the millimeter wave radar to obtain the detection result, wherein the detection result comprises the first position information, the vehicle speed, the first positioning time, and the first position confidence;
[0048] In a case where the second device is a laser radar, the vehicle is positioned at least twice by the laser radar to obtain a first position, a first time, a first confidence, a second position, a second time, and a second confidence; the vehicle speed is determined according to the first position, the second position, the first time, and the second time to obtain the detection result, wherein the first position information is the second position, the first positioning time is the second time, and the first position confidence is an average of the first confidence and the second confidence.
[0049] Optionally, the apparatus further comprises:
[0050] The receiving module is configured to receive a labeling instruction for manually labeling a target data group in the primary labeling library and not belonging to the secondary labeling library;
[0051] The labeling module is configured to label the target data group according to the labeling instruction.
[0052] A storage module is configured to store the labeled target data set into the secondary labeling library.
[0053] According to a further embodiment of the present application, a computer readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is configured to perform the steps of any of the above method embodiments when executed.
[0054] According to a further embodiment of the present application, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps of any of the above method embodiments.
[0055] According to the present application, a predetermined number of vehicle images corresponding to vehicle electronic information are determined; the predetermined number of data sets are stored in a pre-set first labeling library, wherein each data set comprises the vehicle image and the vehicle electronic information; data sets with a target confidence greater than a first preset threshold in the first labeling library are stored in a second labeling library; and in a case where the number of data sets in the second labeling library is greater than or equal to a second preset threshold, a target re-identification model is obtained by training a vehicle re-identification model according to the second labeling library, which can solve the problem that a vehicle re-identification ReID does not have self-upgrading capability through an offline training method in the related art, and realizes self-upgrading of the model by online training of the vehicle re-identification model through the second standard library. BRIEF DESCRIPTION OF DRAWINGS
[0056] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0057] Figure 1 is a hardware structure block diagram of a mobile terminal of a vehicle re-identification model training method according to an embodiment of the present application;
[0058] Figure 2 is a flowchart of a vehicle re-identification model training method according to an embodiment of the present application;
[0059] Figure 3 is a schematic diagram of a roadside unit collecting vehicle electronic information according to an embodiment of the present application;
[0060] Figure 4 is a block diagram of a vehicle re-identification model training device according to an embodiment of the present application;
[0061] Figure 5 is a block diagram of a vehicle re-identification model training device according to a preferred embodiment of the present application Figure 1 ;
[0062] Figure 6 is a block of a vehicle re-identification model training device according to a preferred embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0063] Hereinafter, the present application will be described in detail with reference to the accompanying drawings and embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0064] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence.
[0065] The method embodiment provided by the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking the case of running on a mobile terminal, Figure 1 is a hardware structure block diagram of a mobile terminal of a vehicle re-identification model training method according to an embodiment of the present application, as shown in Figure 1 The mobile terminal can include one or more (only one is shown in Figure 1 ) processor 102 (the processor 102 can include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned mobile terminal can also include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal can also include more or less components than Figure 1 shown, or have a different configuration from Figure 2 shown.
[0066] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the vehicle re-identification model training method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can be a high-speed random access memory, and can also be a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can be a memory remotely arranged with respect to the processor 102, and these remote memories can be connected to the mobile terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0067] The transmission device 106 is configured to receive or send data, for example, via a network. The network can include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet through a wireless manner.
[0068] In the embodiment, a vehicle re-identification model training method running on the mobile terminal or the network architecture is provided, Figure 2 is a flowchart of the vehicle re-identification model training method according to the embodiment of the present application, as shown in the figure, the flow includes the following steps: Figure 3
[0069] In step S202, vehicle electronic information corresponding to a predetermined number of vehicle images is determined.
[0070] The vehicle electronic information in the embodiment of the present application can be a license plate number, and optionally, can include a vehicle model, a vehicle color, a vehicle frame number, etc. The predetermined number in the embodiment of the present application can be set according to the needs of model training, for example, set to 20,000, 30,000, etc. The specific number is only illustrative and does not limit the scope of protection.
[0071] In step S204, the predetermined number of data groups are stored in a pre-set first-level annotation library, wherein each data group includes the vehicle image and the vehicle electronic information.
[0072] In step S206, the data group with a target confidence greater than a first preset threshold in the first-level annotation library is stored in a second-level annotation library.
[0073] In the above step S206, the data group with a more accurate annotation, i.e., the data group with a target confidence greater than a first preset threshold, is selected and stored in the second-level annotation library, so that the content of the data group in the second-level annotation library is more accurate.
[0074] In step S208, when the number of data groups in the second-level annotation library is greater than or equal to a second preset threshold, a vehicle re-identification model is trained according to the second-level annotation library to obtain a target re-identification model.
[0075] Through the above steps S202 to S208, the problem that the vehicle re-identification ReID does not have a self-upgrading capability through an offline training manner in the related art can be solved, and the model self-upgrading is realized through the online training of the vehicle re-identification model by the second-level standard library.
[0076] The step S202 can specifically include: repeatedly performing the following steps to obtain the vehicle electronic information corresponding to the predetermined number of vehicle images.
[0077] S2021, collecting a vehicle image by a first device and obtaining the detection result of the vehicle by a second device, wherein the second device triggers the first device to collect the vehicle image, the first device can be an image collection device including a camera, and the second device can be a laser radar and a millimeter wave radar. It should be noted that the first device and the second device can also be the same device, that is, a device that simultaneously collects a vehicle image and obtains a detection result of a vehicle. Further, in the case where the second device is a millimeter wave radar, the vehicle is positioned by the millimeter wave radar to obtain the detection result, wherein the detection result includes first position information, vehicle speed, a first positioning time, and a first positioning confidence. In the case where the second device is a laser radar, the vehicle is positioned at least twice by the laser radar to obtain a first position, a first time, a first confidence, a second position, a second time, and a second confidence. Specifically, if positioned twice, the vehicle is positioned by the laser radar for the first time to obtain the first position, the first time, and the first confidence of the vehicle. After a certain interval of time, the vehicle is positioned by the laser radar for the second time to obtain the second position, the second time, and the second confidence of the vehicle. The detection result of the vehicle can be determined by the two positioning operations, which has a fast calculation speed. Of course, the detection result can also be obtained by multiple positioning operations, and the detection result obtained by multiple positioning operations is more accurate. The vehicle speed is determined according to the first position, the second position, the first time, and the second time to obtain the detection result, wherein the first position information is the second position, the first positioning time is the second time, and the first positioning confidence is the average of the first confidence and the second confidence.
[0078] If the first device and the second device are target devices including a camera and a laser radar, the detection result of the vehicle is obtained through the target device, the camera is triggered to collect the image of the vehicle, and further, the vehicle is positioned twice through the laser radar to obtain a first position x1, a first time t1, a first confidence y1, a second position x2, a second time t2 and a second confidence y2. The processing mode of twice positioning is taken as an example for description, and the processing mode of more than twice positioning is similar to that of twice positioning, which will not be described here. Specifically, the vehicle is positioned once through the laser radar to obtain the first position x1, the first time t1 and the first confidence y1. After a preset interval time 20 ms (the interval time can be set in advance according to the situation, and can also be set as other values such as 30 seconds, 50 seconds, etc.), the vehicle is positioned twice through the laser radar to obtain the second position x2, the second time t2 and the second confidence y2. The detection result of the vehicle can be determined through twice positioning. The vehicle speed is determined according to x1, x2, t1 and t2, and the vehicle speed v=(x2-x1) / (t2-t1). The first position information is x2, the first positioning time is t2, the first positioning confidence is the average value y3 of y1 and y2, and the obtained detection result includes x2, v, t2 and y3.
[0079] S2022, the vehicle electronic information is obtained through the roadside communication device, and the vehicle-mounted communication device of the vehicle is positioned to obtain the positioning result;
[0080] The roadside communication device in the embodiment of the application can be a roadside unit (RSU) or a vehicle-to-everything (V2X) device. The roadside communication device establishes a wireless connection with the vehicle-mounted communication device, and the vehicle communication device can be a vehicle-mounted unit, a vehicle-mounted terminal, etc.
[0081] S2023, determine the vehicle electronic information corresponding to the vehicle image according to the detection result and the positioning result, and further determine the position coordinates of the vehicle at the second positioning time in the positioning result according to the first position information in the detection result and the vehicle speed, wherein the detection result comprises the first position information, the vehicle speed, and the first positioning time, and the positioning result comprises the second position information and the second positioning time; in the case that the distance difference between the position coordinates and the second position information is less than a second preset threshold, it is determined that the vehicle image and the vehicle electronic information correspond to the same vehicle, and the vehicle electronic information corresponding to the vehicle image is obtained; whether the vehicle image and the vehicle electronic information correspond to the same vehicle is determined through the second position information in the positioning result and the position coordinates obtained based on the detection result, and if the distance difference between the position coordinates and the second position information is less than the second preset threshold, they correspond to the same vehicle, otherwise they correspond to different vehicles.
[0082] The first preset threshold and the second preset threshold in the embodiment of the application can be set according to actual conditions, for example, the second preset threshold can be set to 3 meters, 5 meters, etc., which are only examples and do not constitute a limitation on the protection scope of the embodiment of the application.
[0083] In an optional embodiment, the target confidence of the data set can also be determined according to the first positioning confidence in the detection result and the second positioning confidence in the positioning result, which can be the average of the first positioning confidence and the second positioning confidence, or the weighted sum of the first positioning confidence and the second positioning confidence, specifically, the first positioning confidence is set to weight 1, the second positioning confidence is set to weight 2, and the target confidence = (first positioning confidence * second positioning confidence * weight 2) / (weight 1 + weight 2). The above method is only an example and the specific method is not limited herein.
[0084] In an optional embodiment, after the vehicle re-identification model is trained according to the secondary annotation library to obtain a target re-identification model, a target image of a target vehicle is input into the target re-identification model to obtain a re-identification result of the target vehicle output by the target re-identification model, that is, the target vehicle is re-identified based on the target re-identification model obtained by training to obtain the re-identification result of the target vehicle, thereby improving the accuracy of vehicle re-identification.
[0085] In another optional embodiment, after storing the data groups with target confidence greater than the first preset threshold in the first-level annotation library into the second-level annotation library, the data groups with inaccurate annotations can be revised. Specifically, after a user selects a data group to be revised, an annotation instruction is triggered. The terminal receives an annotation instruction for manually annotating a target data group in the first-level annotation library and not belonging to the second-level annotation library. The target data group is annotated according to the annotation instruction, and the annotated target data group is stored into the second-level annotation library. That is, the data group with low confidence in the first-level annotation library, that is, the target data group not belonging to the second-level annotation library, is manually annotated, and the inaccurate annotations are revised manually, so that the annotation accuracy can be further improved.
[0086] The target device detects the vehicle to obtain the detection result, where the detection result can specifically include first position information, vehicle speed, a first positioning time, and a first positioning confidence. Meanwhile, a camera is triggered to capture a vehicle image. The target device can be a laser radar and a millimeter wave radar. The laser radar and the millimeter wave radar both use echo imaging to display the detected vehicle. The electromagnetic wave emitted by the laser radar is a straight line, and the electromagnetic wave emitted by the millimeter wave radar is a conical beam. The antenna of this wave band is mainly electromagnetic radiation. Since the millimeter wave radar can directly detect the vehicle speed, the detection result can be obtained by positioning once by the millimeter wave radar. Since the laser radar detects the position of the vehicle each time, the detection result can be obtained by positioning at least twice by the laser radar. The vehicle speed needs to be calculated according to the data obtained by twice detection.
[0087] Figure 3 is a schematic diagram of a roadside unit collecting vehicle electronic information according to an embodiment of the present application. As shown in Figure 4 If the roadside communication device is an RSU and the vehicle-mounted communication device is a vehicle-mounted unit, a wireless connection is established with the vehicle-mounted communication device, communication is performed between the RSU and the vehicle-mounted unit, and vehicle electronic information is obtained. The vehicle electronic information can at least include a license plate number, and can optionally include a vehicle model, a vehicle color, a vehicle frame number, and the like. The vehicle-mounted unit (or vehicle-mounted terminal) is positioned at least once to obtain a positioning result. The positioning result includes second position information, a second positioning time, and a second positioning confidence.
[0088] According to the first position information, the first positioning time, and the vehicle speed, the position 10 at the second positioning time is calculated. In the case that the difference between the second position information and the position 10 is less than a threshold value Y, it is considered that the vehicle image 11 and the vehicle electronic information correspond to each other, and the data set: [vehicle image 11 vehicle electronic information] is put into a first-level labeling library. Then, the comprehensive confidence is calculated: the average value of the detection confidence and the positioning confidence. If the comprehensive confidence is greater than a given threshold value D, the data set: [vehicle image 11 vehicle electronic information] is put into a second-level labeling library, so as to complete the labeling of the vehicle image.
[0089] The first vehicle re-identification model is initially loaded, and the second-level labeling library is monitored in real time. When the number of the second-level labeling library reaches a preset number N, the first vehicle re-identification model is trained by using the second-level labeling library for self-learning: the vehicle image information in the second-level labeling library is input into the first vehicle re-identification model, and the result is output. The format of the result is a plurality of image sets recognized as the same vehicle:
[0090] Vehicle1: {
[0091] vehicle image 11,
[0092] vehicle image 12,
[0093] vehicle image 13,
[0094] …
[0095] }
[0096] Vehicle2: {
[0097] vehicle image 21,
[0098] vehicle image 22,
[0099] vehicle image 23,
[0100] …
[0101] }
[0102] For each vehicle image information in Vehicle1, the vehicle electronic information corresponding to the vehicle image information in the second-level labeling library is used for proofreading, for example, the license plate number is used to determine whether the vehicle images belong to the same vehicle, so as to realize supervised training. The second vehicle re-identification model (corresponding to the above-mentioned target vehicle re-identification model) is trained, and the second vehicle re-identification model is loaded into the re-identification algorithm processing, so as to realize online training of the vehicle re-identification model and autonomous upgrading of the algorithm.
[0103] According to another embodiment of the present application, a vehicle re-identification model training device is also provided, Figure 4 is a block diagram of a vehicle re-identification model training device according to an embodiment of the present application, likeFigure 5 As shown in the figure, the device comprises:
[0104] A determination module 42 is configured to determine vehicle electronic information corresponding to a predetermined number of vehicle images.
[0105] A first storage module 44 is configured to store the predetermined number of data groups into a first-level labeling library, wherein each data group comprises the vehicle image and the vehicle electronic information.
[0106] A second storage module 46 is configured to store data groups with a target confidence greater than a first preset threshold in the first-level labeling library into a second-level labeling library.
[0107] A training module 48 is configured to train a vehicle re-identification model according to the second-level labeling library when the number of data groups in the second-level labeling library is greater than or equal to a second preset threshold, to obtain a target re-identification model.
[0108] Figure 1 is a block of a vehicle re-identification model training device according to a preferred embodiment of the present application Figure 5 As shown in the figure, the device further comprises: Figure 6 A re-identification module 52 is configured to input a target image of a target vehicle into the target re-identification model, to obtain a re-identification result of the target vehicle output by the target re-identification model.
[0109]
[0110] is a block of a vehicle re-identification model training device according to a preferred embodiment of the present application Figure 2 As shown in the figure, the determination module 42 comprises: Figure 6 An execution sub-module 62 is configured to repeatedly execute the following steps to obtain vehicle electronic information corresponding to the predetermined number of vehicle images:
[0111] An acquisition unit 621 is configured to acquire a vehicle image by a first device, and acquire a detection result of a vehicle by a second device.
[0112] A positioning unit 622 is configured to acquire vehicle electronic information by a roadside communication device, and position a vehicle-mounted communication device of the vehicle to obtain a positioning result.
[0113] A first determination unit 623 is configured to determine the vehicle electronic information corresponding to the vehicle image according to the detection result and the positioning result.
[0114] Optionally, the first determination unit 623 is further configured to
[0115]
[0116] determine a position coordinate of the vehicle at a second positioning time in the positioning result according to the first position information in the detection result and the vehicle speed, wherein the detection result comprises the first position information, the vehicle speed and the first positioning time, and the positioning result comprises the second position information and the second positioning time;
[0117] in a case where a distance difference between the position coordinate and the second position information is less than a second preset threshold, determine that the vehicle image and the vehicle electronic information correspond to a same vehicle, and obtain the vehicle electronic information corresponding to the vehicle image.
[0118] Optionally, the apparatus further comprises:
[0119] a second determination unit configured to determine a target confidence of the data group according to a first positioning confidence in the detection result and a second positioning confidence in the positioning result.
[0120] Optionally, the acquisition unit 621 is further configured to
[0121] in a case where the second device is a millimeter wave radar, position the vehicle by using the millimeter wave radar to obtain the detection result, wherein the detection result comprises the first position information, the vehicle speed, the first positioning time and the first positioning confidence;
[0122] in a case where the second device is a laser radar, position the vehicle by using the laser radar at least twice to obtain a first position, a first time, a first confidence, a second position, a second time and a second confidence; determine the vehicle speed according to the first position, the second position, the first time and the second time to obtain the detection result, wherein the first position information is the second position, the first positioning time is the second time, and the first positioning confidence is an average of the first confidence and the second confidence.
[0123] Optionally, the apparatus further comprises:
[0124] a receiving module configured to receive a labeling instruction for manually labeling a target data group in the primary labeling library and not belonging to the secondary labeling library;
[0125] a labeling module configured to label the target data group according to the labeling instruction;
[0126] a storage module configured to store the labeled target data group into the secondary labeling library.
[0127] It should be noted that the above various modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all the above modules are located in the same processor; or the above various modules are located in different processors in any combination.
[0128] Embodiments of the present application also provide a storage medium having a computer program stored therein, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0129] Optionally, in the embodiment, the above storage medium can be configured to store a computer program for executing the following steps:
[0130] S1, determining vehicle electronic information corresponding to a predetermined number of vehicle images;
[0131] S2, storing the predetermined number of data groups into a pre-set first-level labeling library, wherein each data group includes the vehicle image and the vehicle electronic information;
[0132] S3, storing data groups with a target confidence greater than a first preset threshold in the first-level labeling library into a second-level labeling library;
[0133] S4, in the case where the number of data groups in the second-level labeling library is greater than or equal to a second preset threshold, training a vehicle re-identification model according to the second-level labeling library to obtain a target re-identification model.
[0134] Optionally, in the embodiment, the above storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various storage media that can store computer programs.
[0135] Embodiments of the present application also provide an electronic device including a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
[0136] Optionally, the above electronic device can further include a transmission device connected to the processor and an input / output device connected to the processor.
[0137] Optionally, in the embodiment, the above processor can be configured to execute the following steps through the computer program:
[0138] S1, determining vehicle electronic information corresponding to a predetermined number of vehicle images;
[0139] S2, store the predetermined number of data groups into a preset first-level annotation library, wherein each of the data groups comprises the vehicle image and the vehicle electronic information;
[0140] S3, store data groups with a target confidence greater than a first preset threshold in the first-level annotation library into a second-level annotation library;
[0141] S4, in a case where the number of the data groups in the second-level annotation library is greater than or equal to a second preset threshold, train a vehicle re-identification model according to the second-level annotation library to obtain a target re-identification model.
[0142] Optionally, specific examples in the embodiments can refer to the examples described in the above embodiments and optional implementation manners, and the embodiments will not be described herein again.
[0143] Obviously, those skilled in the art should understand that each module or each step of the above-mentioned application can be realized by a general computing device, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and can be realized by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in an order different from that shown here, or they can be manufactured into each integrated circuit module respectively, or multiple modules or steps among them can be manufactured into a single integrated circuit module to realize. Thus, the application is not limited to any specific combination of hardware and software.
[0144] The above only describes the preferred embodiments of the application and is not used to limit the application. For those skilled in the art, the application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the principles of the application shall be included in the protection scope of the application.
Claims
1. A vehicle re-identification model training method, characterized in that, The method comprises: determining vehicle electronic information corresponding to a predetermined number of vehicle images, comprising: repeatedly performing the following steps to obtain vehicle electronic information corresponding to the predetermined number of vehicle images: collecting a vehicle image by a first device and obtaining a detection result of the vehicle by a second device; positioning a vehicle-mounted communication device of the vehicle to obtain a positioning result; determining the vehicle electronic information corresponding to the vehicle image according to the detection result and the positioning result, comprising: determining the position coordinates of the vehicle at the second positioning time in the positioning result according to the first position information in the detection result and the vehicle speed, wherein the detection result comprises: first position information, vehicle speed, first positioning time, and the positioning result comprises second position information and second positioning time; in the case that the distance difference between the position coordinates and the second position information is less than a second preset threshold, determining that the vehicle image and the vehicle electronic information correspond to the same vehicle, and obtaining the vehicle electronic information corresponding to the vehicle image; storing the predetermined number of data groups into a pre-set first labeling library, wherein each data group comprises the vehicle image and the vehicle electronic information; storing data groups with a target confidence greater than a first preset threshold in the first labeling library into a second labeling library; in the case that the number of data groups in the second labeling library is greater than or equal to a second preset threshold, training a vehicle re-identification model according to the second labeling library to obtain a target re-identification model.
2. The method of claim 1, wherein, After training the vehicle re-identification model according to the second labeling library to obtain the target re-identification model, the method further comprises: inputting a target image of a target vehicle into the target re-identification model to obtain a re-identification result of the target vehicle output by the target re-identification model.
3. The method of claim 2, wherein, The method further comprises: determining the target confidence of the data group according to the first positioning confidence in the detection result and the second positioning confidence in the positioning result.
4. The method of claim 1, wherein, obtaining the detection result of the vehicle by the second device comprises: in the case that the second device is a millimeter wave radar, positioning the vehicle by the millimeter wave radar to obtain the detection result, wherein the detection result comprises first position information, vehicle speed, first positioning time, and first positioning confidence; in the case that the second device is a laser radar, positioning the vehicle by the laser radar at least twice to obtain a first position, a first time, a first confidence, a second position, a second time, and a second confidence; determining the vehicle speed according to the first position, the second position, the first time, and the second time to obtain the detection result, wherein the first position information is the second position, the first positioning time is the second time, and the first positioning confidence is the average of the first confidence and the second confidence. 5.A vehicle re-identification model training apparatus, characterized in that, The method comprises: The determining module is configured to determine vehicle electronic information corresponding to a predetermined number of vehicle images, including: repeatedly performing the following steps to obtain the vehicle electronic information corresponding to the predetermined number of vehicle images: collecting a vehicle image by a first device and obtaining a detection result of a vehicle by a second device; positioning a vehicle-mounted communication device of the vehicle to obtain a positioning result; determining the vehicle electronic information corresponding to the vehicle image according to the detection result and the positioning result, including: determining a position coordinate of the vehicle at a second positioning time in the positioning result according to first position information in the detection result and a vehicle speed, wherein the detection result includes first position information, a vehicle speed, and a first positioning time, and the positioning result includes second position information and a second positioning time; and determining that the vehicle image and the vehicle electronic information correspond to the same vehicle and obtaining the vehicle electronic information corresponding to the vehicle image in a case where a distance difference between the position coordinate and the second position information is less than a second preset threshold value; The first storage module is configured to store the predetermined number of data groups in a pre-set first-level annotation library, wherein each data group includes the vehicle image and the vehicle electronic information; The second storage module is configured to store data groups with a target confidence greater than a first preset threshold value in the first-level annotation library in a second-level annotation library; The training module is configured to train a vehicle re-identification model according to the second-level annotation library in a case where the number of data groups in the second-level annotation library is greater than or equal to a second preset threshold value, and obtain a target re-identification model.
6. The apparatus of claim 5, wherein, The device further includes: The re-identification module is configured to input a target image of a target vehicle into the target re-identification model to obtain a re-identification result of the target vehicle output by the target re-identification model.
7. A computer readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 4 when running. 8.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to execute the computer program to execute the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Image recognition system and image recognition method
CN107690659A
Vehicle weight identification method, device and system
CN109063768A