Vehicle re-identification method, device, training method and electronic device
Vehicle re-identification is performed through the initial 3D model generated based on the 3D information of the sample, which solves the accuracy problem under the influence of small appearance differences and posture, and achieves higher recognition accuracy and reliability.
Patent Information
- Application Number
- CN202011123358.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-20
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-10-20
AI Technical Summary
Existing vehicle re-identification technology suffers from low accuracy due to small appearance differences and the influence of posture.
The initial three-dimensional model generated based on the three-dimensional information of the sample is used to re-identify the image of the target vehicle. By describing the various dimensional information of the vehicle from a three-dimensional perspective, the accuracy and reliability of the identification are improved.
By describing the relevant information of the target vehicle in detail, the accuracy and reliability of re-identification are improved, and the image and comprehensiveness of the identification results of the target vehicle are enhanced.
Smart Images

Figure CN112132113B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, specifically to computer vision, deep learning and intelligent transportation technology, and in particular to a method, device, training method, electronic device and storage medium for vehicle re-identification. Background Art
[0002] In recent years, as the data captured by surveillance cameras has become larger and larger, the demand for surveillance data analysis capabilities has also increased rapidly. However, compared with the speed at which data is increasing, the development of data analysis technology is far from meeting the requirements. Vehicle re-identification technology aims to make up for the problem of fixed camera angle limitations. It can retrieve the required specific vehicle across cameras, which not only saves the step of manual retrieval, but also improves efficiency. Therefore, the rational and effective use of vehicle re-identification technology is of great significance for criminal investigation tasks, intelligent monitoring tasks, etc.
[0003] In the prior art, the commonly used vehicle re-identification method is: analyzing the information of the acquired vehicle image, determining the vehicle's appearance information, such as the vehicle type (truck, SUV, and sedan, etc.), and determining whether the vehicles in different scenarios are the same vehicle based on the appearance information.
[0004] However, the differences in appearance of some vehicles are relatively small, and the appearance is easily affected by the vehicle posture, resulting in low re-identification accuracy. Summary of the invention
[0005] The present application provides a vehicle re-identification method, device, training method, electronic device and storage medium for improving the accuracy of re-identification.
[0006] According to one aspect of the present application, a vehicle re-identification method is provided, comprising:
[0007] Obtain a picture of the target vehicle to be re-identified;
[0008] Determining a target two-dimensional image of the target vehicle based on the picture and a preset initial three-dimensional model, wherein the initial three-dimensional model is generated based on sample three-dimensional information of a sample vehicle;
[0009] The target two-dimensional image is re-recognized, and a recognition result is generated and outputted.
[0010] In this embodiment, by re-identifying the target vehicle based on the initial three-dimensional model generated based on the sample three-dimensional information, the technical effect of improving the accuracy and reliability of the re-identification can be achieved.
[0011] According to another aspect of the present application, a vehicle re-identification device is provided, comprising:
[0012] An acquisition module is used to acquire a picture of a target vehicle to be re-identified;
[0013] A first determination module is used to determine a target two-dimensional image of the target vehicle based on the image and a preset initial three-dimensional model, wherein the initial three-dimensional model is generated based on sample three-dimensional information of a sample vehicle;
[0014] The re-recognition module is used to re-recognize the target two-dimensional image, generate and output a recognition result.
[0015] According to another aspect of the present application, there is provided an electronic device, including:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any of the above embodiments.
[0019] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in any of the above embodiments.
[0020] According to another aspect of the present application, a model training method is provided, comprising:
[0021] Collecting sample information of sample vehicles, wherein the sample information of the sample vehicles includes: sample three-dimensional information and sample quantity;
[0022] An initial three-dimensional model is constructed according to the sample three-dimensional information and the number of samples, and the initial three-dimensional model is used to re-identify the target vehicle based on the image of the target vehicle.
[0023] According to another aspect of the present application, a computer program product is provided, the program product comprising: a computer program, the computer program being stored in a readable storage medium, at least one processor of an electronic device being able to read the computer program from the readable storage medium, and the at least one processor executing the computer program so that the electronic device executes the method described in the first aspect.
[0024] The present application provides a method, device, training method, electronic device and storage medium for vehicle re-identification, including: obtaining a picture of a target vehicle to be re-identified, determining a target two-dimensional image of the target vehicle based on the picture and a pre-set initial three-dimensional model, wherein the initial three-dimensional model is generated based on sample three-dimensional information of a sample vehicle, re-identifying the target two-dimensional image, generating and outputting a recognition result, and introducing an initial three-dimensional model generated based on the sample three-dimensional information. Since the sample three-dimensional information includes relevant information of each dimension of each vehicle that can be used to describe from a stereoscopic three-dimensional perspective, when the target two-dimensional image is determined based on the initial three-dimensional model, the target two-dimensional image can be made to describe the relevant information of the target vehicle in more detail, thereby achieving the technical effect of accuracy and reliability of the recognition result determined based on the target two-dimensional image.
[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0027] Figure 1 A schematic diagram of an application scenario of the vehicle re-identification method according to an embodiment of the present application;
[0028] Figure 2 A schematic flow chart of a vehicle re-identification method according to an embodiment of the present application;
[0029] Figure 3 A schematic flow chart of a vehicle re-identification method according to another embodiment of the present application;
[0030] Figure 4 A schematic flow chart of a vehicle re-identification method according to another embodiment of the present application;
[0031] Figure 5 A schematic flow chart of a vehicle re-identification method according to another embodiment of the present application;
[0032] Figure 6 A schematic diagram of a vehicle re-identification device according to an embodiment of the present application;
[0033] Figure 7 A schematic diagram of a vehicle re-identification device according to another embodiment of the present application;
[0034] Figure 8 A block diagram of an electronic device for a vehicle re-identification method according to an embodiment of the present application;
[0035] Fig. 9A flowchart of the model training method according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0037] With the continuous increase in the number of vehicles and people's increasing demand for the reliability of vehicle travel, vehicle re-identification technology has emerged. Among them, vehicle re-identification technology can be understood as a technology for identifying a target vehicle from a large number of vehicles.
[0038] In order to improve the reliability of vehicle re-identification and improve the safety of vehicle travel, the embodiment of the present application provides a vehicle re-identification method, and the method of the embodiment of the present application can be applied to Figure 1 The application scenario shown in the figure. Figure 1 A schematic diagram of an application scenario of the vehicle re-identification method according to an embodiment of the present application.
[0039] In such Figure 1 In the application scenario shown, the target vehicle 100 is a vehicle that causes a traffic accident, and in Figure 1 In the application scenario shown, the traffic accident is specifically a rear-end collision accident, that is, the target vehicle 100 is the vehicle that causes the rear-end collision accident, the vehicle rear-ended by the target vehicle 100 is called the accident vehicle 200, and vehicles other than the accident vehicle 200 are called other vehicles 300, that is, the other vehicles 300 include the target vehicle 100.
[0040] like Figure 1 As shown, the accident vehicle 200 travels in front of the target vehicle 100 and is rear-ended by the target vehicle 100, resulting in a traffic rear-end collision.
[0041] However, after causing the rear-end traffic accident, the target vehicle 100 continues to travel and blends into the other vehicles 300 , becoming one of the other vehicles 300 .
[0042] The server 400 can obtain a picture of the target vehicle 100 through an image acquisition device 500 (such as a camera, etc.) set up on the roadside, and determine the target vehicle 100 from other vehicles 300 based on the picture of the target vehicle 100, and can determine the driving track of the target vehicle 100, thereby locating and tracking the target vehicle 100.
[0043] It is worth noting that the above application scenarios are only used to illustrate the possible application scenarios of the vehicle re-identification method in the embodiments of the present application, and cannot be understood as a specific limitation on the application scenarios of the vehicle re-identification method.
[0044] In the related art, in order to realize the re-identification of the target vehicle, a method generally adopted is: determining the appearance features related to the appearance of the target vehicle based on the picture of the target vehicle, and determining the target vehicle from other vehicles based on the appearance features.
[0045] However, the appearance of a vehicle is easily affected by its posture, and some vehicles have relatively small differences in appearance. Therefore, adopting the solutions in related technologies may result in low accuracy of re-identification.
[0046] The inventors of this application have obtained the inventive concept of this application through creative work: generating an initial three-dimensional model based on sample three-dimensional information of a sample vehicle, and identifying a target vehicle from other vehicles based on the initial three-dimensional model and a picture of the target vehicle, so as to improve the accuracy and reliability of vehicle re-identification.
[0047] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below 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. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0048] The present application provides a vehicle re-identification method, which is applied to the fields of artificial intelligence, autonomous driving, intelligent transportation, and deep learning technology to achieve the technical effect of improving the accuracy and reliability of vehicle re-identification.
[0049] See also Figure 2 , Figure 2 A schematic flow chart of a vehicle re-identification method according to an embodiment of the present application.
[0050] like Figure 2 As shown, the method includes:
[0051] S101: Obtain a picture of a target vehicle to be re-identified.
[0052] Among them, the executor of the vehicle re-identification method of this embodiment can be a vehicle re-identification device, and the vehicle re-identification device can be a server (including a local server and a cloud server), a processor, a terminal device, and a chip, etc., which is not limited in this embodiment.
[0053] For example, when the vehicle re-identification method of the embodiment of the present application is applied to Figure 1 In the application scenario shown in FIG. 1 , the vehicle re-identification device may be as follows: Figure 1 The server shown in .
[0054] In this embodiment, a vehicle re-identification device is taken as a server for example for exemplary description.
[0055] It should be understood that the “target” in the target vehicle is used to distinguish it from other vehicles (such as sample vehicles, etc.) below, and should not be understood as a limitation on the vehicle.
[0056] Combined with Figure 1 In the application scenario shown, this step can be understood as: if the target vehicle causes a traffic accident (such as the traffic rear-end collision described in the above application scenario), the server can obtain a picture of the target vehicle.
[0057] It is worth noting that this embodiment does not limit the way in which the server obtains the image, for example:
[0058] In a possible implementation, the server may obtain a picture from the video information transmitted by the image acquisition device, and the picture may be a picture of the target vehicle causing a rear-end collision.
[0059] In another possible implementation, the server may obtain the image of the target vehicle from a preset database. For example, the server receives the identifier (such as the license plate number, etc.) of the target vehicle input by the traffic platform, and obtains the image from the database according to the identifier.
[0060] In another possible implementation, the server may receive pictures input by a staff member (eg, uploaded to the server by scanning).
[0061] It should be understood that the above examples are only used to illustrate possible ways in which the server obtains images, and should not be understood as limiting the way in which the server obtains images. Other ways in which the server obtains images will not be listed one by one this time.
[0062] S102: determining a target two-dimensional image of a target vehicle based on the picture and a preset initial three-dimensional model, where the initial three-dimensional model is generated based on sample three-dimensional information of the sample vehicle;
[0063] Similarly, the “initial”, “target” and “sample” in this step should not be understood as limitations on their corresponding contents.
[0064] Among them, the sample three-dimensional information can be used to represent relevant information of the sample vehicle from a three-dimensional dimension, such as the three-dimensional size of the sample vehicle, the names of the various components of the sample vehicle, and the relationship between the various components of the sample vehicle, etc.
[0065] The initial three-dimensional model can be understood as a neural network model, and the neural network model is generated based on the sample three-dimensional information.
[0066] It is worth noting that, in this embodiment, the concept of an initial three-dimensional model is introduced, and the initial three-dimensional model is generated based on the sample three-dimensional information.
[0067] Combined with Figure 1 In the application scenario shown, this step can be understood as: when the server determines the target two-dimensional image based on the initial three-dimensional model and the picture, since the initial three-dimensional model is generated based on the sample three-dimensional information, the sample three-dimensional information includes relevant information of each dimension of each vehicle that can be used to describe from a stereoscopic three-dimensional perspective. Therefore, when the server determines the target two-dimensional image based on the initial three-dimensional model, it can be achieved that the target two-dimensional image describes the relevant information of the target vehicle in more detail.
[0068] Therefore, in this step, when the target two-dimensional image is determined based on the initial three-dimensional model, it is possible to analyze the image from a stereoscopic three-dimensional dimension to achieve comprehensiveness and completeness of the analysis, so that the target two-dimensional image can accurately and vividly represent the relevant information of the target vehicle, thereby achieving the technical effect of improving the accuracy and reliability of the recognition result when the recognition result is determined based on the target two-dimensional image.
[0069] S103: Re-recognize the target two-dimensional image, generate and output a recognition result.
[0070] Combined with Figure 1 In the application scenario shown, this step can be understood as: the server performs re-identification based on the target two-dimensional image to determine the target vehicle from other vehicles, thereby generating and outputting a recognition result.
[0071] In a possible implementation, the server may be connected to a display device, and may send the recognition result to the display device, and display the recognition result through the display device.
[0072] Among them, the display device can be used to represent a device for displaying video, such as a liquid crystal display (LCD), a light emitting diode (LED) display, and an organic light emitting display (OLED) display, etc., which is not limited in the embodiments of the present application.
[0073] In another possible implementation, the server may be connected to a voice device, and may send the recognition result to the voice device, and voice broadcast the recognition result through the voice device.
[0074] The server may convert the recognition result into audio information and send the audio information to the voice device, and the voice device may make a voice announcement based on the audio information; the server may also send the recognition result to the voice device, and the voice device may convert the recognition result into audio information and make a voice announcement based on the audio information;
[0075] In another possible implementation scheme, the display device and the voice device can be an integrated device (such as a terminal device), and the server can send the recognition result to the integrated device, display the recognition result through the integrated device, and voice broadcast the recognition result.
[0076] It is worth noting that the above examples are only used to illustrate the ways in which the server may output the recognition results, and should not be understood as limiting the ways in which the recognition results are output.
[0077] Based on the above analysis, it can be seen that an embodiment of the present application provides a method for vehicle re-identification, including: obtaining a picture of a target vehicle to be re-identified, determining a target two-dimensional image of the target vehicle based on the picture and a pre-set initial three-dimensional model, wherein the initial three-dimensional model is generated based on sample three-dimensional information of a sample vehicle, re-identifying the target two-dimensional image, generating and outputting a recognition result, and by introducing the initial three-dimensional model generated based on the sample three-dimensional information, since the sample three-dimensional information includes relevant information of each dimension of each vehicle from a stereoscopic three-dimensional perspective, when the target two-dimensional image is determined based on the initial three-dimensional model, it is possible to achieve a more detailed description of the relevant information of the target vehicle in the target two-dimensional image, thereby achieving the technical effect of accuracy and reliability of the recognition result determined based on the target two-dimensional image.
[0078] In order to enable readers to have a deeper understanding of the vehicle re-identification method of the present application embodiment, Figure 3 , the method of this embodiment is described in more detail from the dimension of generating a target two-dimensional image based on an initial three-dimensional model.
[0079] like Figure 3 As shown, the method includes:
[0080] S201: Obtain a picture of a target vehicle to be re-identified.
[0081] Among them, the description of S201 can be found in S101 and will not be repeated here.
[0082] S202: Adjusting the initial three-dimensional model based on the image.
[0083] For example, the server can adjust the initial three-dimensional model by stretching, shrinking, rotating, etc. based on the image.
[0084] S203: Determine the adjusted initial 3D model that meets a preset adjustment condition as the target 3D model, wherein the adjustment condition includes: the similarity between the adjusted initial 3D model and the image is greater than a preset similarity threshold.
[0085] Similarly, the "target" in the target three-dimensional model of this step cannot be understood as a limitation on the content of the three-dimensional model.
[0086] In combination with S202, it can be known that the server can adjust the initial three-dimensional model based on the picture, and the adjustment methods include but are not limited to stretching, shrinking and rotating. In this step, if the initial three-dimensional model is adjusted by at least one of the above adjustment methods so that the similarity between the adjusted initial three-dimensional model and the picture is greater than the similarity threshold, the adjusted initial three-dimensional model can be determined as the target three-dimensional model, that is, the target three-dimensional model has a relatively high similarity with the picture.
[0087] The similarity threshold may be set by the server based on demand, historical records, and experiments, and is not limited in this embodiment.
[0088] For example, the server sets the similarity threshold based on the demand as an example and describes it as follows:
[0089] The demand can be understood as the demand for the accuracy of the recognition results. If it is a scenario with higher demand, that is, a scenario with higher requirements for the accuracy of the recognition results, the similarity threshold can be set to a relatively large value; conversely, if it is a scenario with lower demand, that is, a scenario with lower requirements for the accuracy of the recognition results, the similarity threshold can be set to a relatively small value.
[0090] Specifically, S202 and S203 can be understood as: the server adjusts the initial three-dimensional model, and after each adjustment, calculates the similarity between the adjusted initial three-dimensional model and the picture, and determines whether the similarity is greater than the similarity threshold. If the similarity is less than or equal to the similarity threshold, the initial three-dimensional model continues to be adjusted. Specifically, the adjustment can be based on the size of the difference between the similarity and the similarity threshold. For example, if the difference between the similarity and the similarity threshold is large, the adjustment amplitude of the initial three-dimensional model can be large. If the difference between the similarity and the similarity threshold is small, the adjustment amplitude of the initial three-dimensional model can be small; if the similarity is greater than or equal to the similarity threshold, the adjusted initial three-dimensional model that is greater than or equal to the similarity threshold is determined as the target three-dimensional model.
[0091] S204: Determine a target two-dimensional image according to the target three-dimensional model.
[0092] If the server determines a target three-dimensional model with a high similarity to the image, the target two-dimensional image may be determined based on the target three-dimensional model.
[0093] It is worth noting that, in this embodiment, by adjusting the initial three-dimensional model, a target three-dimensional model with a high similarity to the picture is obtained. Since the target three-dimensional model has a high similarity to the picture, when the target two-dimensional image is determined based on the three-dimensional model, the accuracy and reliability of the target two-dimensional image can be improved, so that the target two-dimensional image is highly fitted to the target vehicle, thereby achieving the technical effect of improving the accuracy and reliability of the recognition result when the recognition result is determined based on the target two-dimensional image.
[0094] In some embodiments, S204 may include:
[0095] S2041: Determine attribute information of each target component of the target vehicle according to the target three-dimensional model.
[0096] Similarly, the “target” in the target component of this step cannot be understood as a limitation on the component.
[0097] Among them, attribute information can be understood as relevant information describing the target component, such as the name of the target component, the size of the target component, and the relationship between the target components (such as the relationship between two target components is that they are adjacent to each other, or they are bolted together, etc.), etc.
[0098] It is worth noting that since the initial three-dimensional model is generated based on the sample three-dimensional information, and the target three-dimensional model is generated by adjusting the initial three-dimensional model, the target three-dimensional model can also be represented by the sample three-dimensional information, and the sample three-dimensional information includes relevant information of the sample vehicle. Therefore, the attribute information can be determined based on the target three-dimensional model, and since the target three-dimensional model has a high similarity with the picture, the attribute information can be used to accurately characterize the relevant information of each target component of the target vehicle.
[0099] S2042: splicing target components according to attribute information to generate a target two-dimensional image.
[0100] Combined with the above analysis, it can be seen that the attribute information can describe the relevant information of each target component, such as the name, size, and the association relationship between the target components. Therefore, in this step, the server can generate a two-dimensional image of the target vehicle (i.e., a target two-dimensional image) based on the attribute information, including relevant information for characterizing the target vehicle.
[0101] It is worth noting that in this embodiment, since the target three-dimensional model has a high degree of similarity with the picture, the attribute information can be used to accurately characterize the relevant information of each target component of the target vehicle. When a target two-dimensional image is generated based on the attribute information, the target two-dimensional image can have high accuracy and high reliability. Furthermore, when a recognition result is generated based on the target two-dimensional image, the recognition result can have a technical effect of high accuracy and high reliability.
[0102] In some embodiments, the attribute information includes: an identifier of the target component and three-dimensional parameters of the target component, and S2042 may include:
[0103] S20421: Determine the connection relationship between the target components according to the identifiers of the target components.
[0104] The identifier of the target component may be the name described in the above example, or may be an identifier allocated by the server to the target component.
[0105] S20422: According to the connection relationship and the three-dimensional parameters of each target component, the target components are spliced to generate a target two-dimensional image.
[0106] For example, the server can splice the target components into a two-dimensional image based on the connection relationship, and on this basis, adaptively adjust the spliced two-dimensional image based on the three-dimensional parameters of each target component, so that the target two-dimensional image not only describes the target vehicle from the connection relationship of the target components, but also describes the target vehicle in terms of size.
[0107] It is worth noting that, in this embodiment, since the target two-dimensional image can describe the target vehicle from two dimensions, such as from the dimension of the connection relationship between the target components and from the dimension of the size of the target components, the technical effect of the accuracy and reliability of the target two-dimensional image's description of the target vehicle can be improved.
[0108] S205: Re-recognize the target two-dimensional image, generate and output a recognition result.
[0109] The description of S205 can be found in S103 and will not be repeated here.
[0110] S206: Determine the tracking and positioning information of the target vehicle according to the recognition result.
[0111] Based on the above analysis, the recognition result can be understood as the server identifying the target vehicle from other vehicles, and in this step, the server can continue to determine the tracking and positioning information of the target vehicle.
[0112] Among them, the tracking and positioning information may include the location information of the target vehicle, and may also include the environmental information around the location information based on the location information, etc., which are not listed one by one here.
[0113] In combination with the above embodiments, when the server is connected to a display device and the display device displays the recognition results, the display device can also display the tracking and positioning information, and can statically display the recognition results and tracking and positioning information, such as displaying the recognition results of the target vehicle (the physical target vehicle in the actual scene) and the current location information; the recognition results can also be dynamically displayed, such as displaying the recognition results of the target vehicle (the physical target vehicle in the actual scene) and the driving trajectory of the target vehicle within a certain period of time, and marking the current location information of the target vehicle on the driving trajectory, etc., which are not listed one by one here.
[0114] It is worth noting that in this embodiment, the server determines the tracking and positioning information through the recognition result. Since the recognition result is the target vehicle accurately determined from other vehicles, when the tracking and positioning information is determined based on the recognition result, the accuracy and reliability of the tracking and positioning information can be improved, thereby achieving the technical effect of accurate tracking and positioning of the target vehicle.
[0115] In order to enable readers to have a deeper understanding of the vehicle re-identification method of the present application embodiment, Figure 4 , the method of this embodiment is explained in more detail from the dimension of re-identifying the target two-dimensional image.
[0116] like Figure 4 As shown, the method includes:
[0117] S301: Collect sample information of a sample two-dimensional image.
[0118] Similarly, the “sample” in the sample two-dimensional image in this step cannot be a limitation on the content of the sample two-dimensional image.
[0119] The sample two-dimensional image can be understood as a two-dimensional image of a sample vehicle collected by the server. The number of sample vehicles is not limited in this embodiment, that is, the number of sample two-dimensional images is not limited in this embodiment, and can be set by the server based on demand, historical records, and experiments, etc., and the setting principle can be referred to in the above embodiment, which will not be repeated here.
[0120] S302: Training a preset initial network model according to sample information of the sample two-dimensional image to generate a re-recognition network model.
[0121] Among them, this embodiment does not limit the type and structure of the initial network model. For example, the initial network model can be a memory neural network model (long short-term memory neural network model and bidirectional long short-term memory neural network model), a convolutional neural network model, and an adversarial neural network model; for example, the number of channels and the number of convolution kernels of the initial network model can be set by the server based on demand, historical records, and experiments.
[0122] In some embodiments, S302 may specifically include: inputting sample information of the sample two-dimensional image into the initial network model, generating a prediction result, comparing the prediction result with a pre-calibrated real result, and adaptively adjusting the parameters of the initial network model based on the comparison result, until the comparison result meets a preset comparison requirement (such as the comparison result is a loss value, and the comparison requirement is that the loss value is less than a preset loss value threshold), or the number of iterations is equal to the preset number requirement, and the initial network model after parameter adjustment is determined as the re-identification network model.
[0123] S303: Obtain a picture of the target vehicle to be re-identified.
[0124] The description of S303 can be found in S101 and will not be repeated here.
[0125] S304: Determine a target two-dimensional image of the target vehicle based on the picture and a preset initial three-dimensional model, where the initial three-dimensional model is generated based on sample three-dimensional information of the sample vehicle.
[0126] Among them, the description of S304 can refer to S102, or can refer to S202 to S204, which will not be repeated here.
[0127] S305: Input the target two-dimensional image into the re-recognition network model, generate and output the recognition result.
[0128] This step can be understood as: the server uses the target two-dimensional image as the input of the re-recognition network model, and the re-recognition network model extracts and analyzes the image features of the target two-dimensional image to generate a recognition result corresponding to the target two-dimensional image, that is, to determine the target vehicle corresponding to the target two-dimensional image from other vehicles.
[0129] It is worth noting that in this embodiment, by training to generate a re-identification network model, and using the re-identification network model to identify the target two-dimensional image to obtain a recognition result, the recognition efficiency of re-identification can be improved, and the accuracy and reliability of re-identification can be improved.
[0130] In order to enable readers to have a deeper understanding of the vehicle re-identification method of the present application embodiment, Figure 5, from the dimension of constructing the initial three-dimensional model, the method of this embodiment is explained in more detail.
[0131] like Figure 5 As shown, the method includes:
[0132] S401: Collect sample information of sample vehicles, where the sample information of sample vehicles includes: sample three-dimensional information and sample quantity.
[0133] Similarly, in this embodiment, the sample information can be understood in two dimensions, one dimension is the relevant information of the sample vehicles (ie, three-dimensional information), and the other dimension is the relevant information of the number of sample vehicles (ie, the number of samples).
[0134] The selection of sample vehicles and the number of samples may be selected by the server based on demand, historical records, and experiments, etc., and are not limited in this embodiment.
[0135] Preferably, the sample vehicles cover various types of vehicles as much as possible, that is, the sample three-dimensional information can describe various types of vehicles as much as possible, so that through the diversity of the sample vehicles, an initial three-dimensional model that characterizes the various sample vehicles in more detail can be constructed, thereby achieving the technical effect of accuracy and reliability of re-identification.
[0136] S402: constructing an initial three-dimensional model according to the sample three-dimensional information and the sample quantity.
[0137] It is worth noting that, in this embodiment, by collecting sample information of sample vehicles and constructing an initial three-dimensional model from the dimensions of sample three-dimensional information and sample quantity, the initial three-dimensional model can be used to describe the characteristics of the sample vehicle from multiple dimensions, thereby achieving the initial three-dimensional model having a strong ability to describe relevant information of the sample vehicle, thereby achieving the technical effect of improving the accuracy and reliability of re-identification when re-identifying the target vehicle based on the initial three-dimensional model.
[0138] In some embodiments, S402 may include:
[0139] S4021: Determine average three-dimensional information based on the sample three-dimensional information and the number of samples.
[0140] For example, if the sample size is 400,000, that is, the sample vehicles are 400,000, then a total of 1.2 million dimensions (ie, 400,000*3) of information can be included. Through this 1.2 million dimensions of information, the mean of the information in each dimension can be calculated to obtain the average information of each dimension (ie, average three-dimensional information).
[0141] S4022: Train a preset basic model framework according to the average three-dimensional information to generate an initial three-dimensional model.
[0142] The basic model framework may be understood as a pre-set structural framework and coordinate system of the vehicle, and the coordinate system may be pre-set by the server.
[0143] This step can be understood as: adaptively adjusting the parameters of the basic model framework based on the average three-dimensional information to generate an initial three-dimensional model. Since the initial three-dimensional model is generated by the average three-dimensional information, the initial three-dimensional model is equivalent to the average model of each sample vehicle, and the relevant information of each sample vehicle can be obtained by adaptively adjusting the initial three-dimensional model.
[0144] It is worth noting that, in this embodiment, by constructing the initial three-dimensional model based on the average three-dimensional information, the initial three-dimensional model can be converted into various vehicles as accurately as possible, thereby achieving the technical effect of improving the accuracy and reliability of re-identification when the target vehicle is re-identified based on the initial three-dimensional model.
[0145] In some implementations, the sample three-dimensional information includes: three-dimensional parameters of each sample component of the sample vehicle and an identification of each sample component.
[0146] That is to say, in some possible implementation schemes, the sample three-dimensional information can not only describe the sample vehicle from the various parameters of the sample vehicle (such as the length, width and height of the vehicle body, etc.), but also describe the identification of the sample components of the sample vehicle. By describing the relevant information of the sample vehicle from the three-dimensional parameters of the sample components and the identification of the sample components, the comprehensiveness and reliability of the description of the sample vehicle can be achieved, thereby achieving the technical effect of the accuracy and reliability of the initial three-dimensional model.
[0147] In some embodiments, the three-dimensional parameters of each sample component are three-dimensional parameters corresponding to the pre-set calibration points of each sample component.
[0148] That is, the server can select punctuation points in advance based on requirements, historical records, and experiments, and when constructing the initial three-dimensional model, the three-dimensional parameters corresponding to the calibrated points can be determined as the three-dimensional parameters of the sample component.
[0149] Preferably, the server may select points that are highly representative of the relevant information of the sample vehicle as calibration points, for example, connection points between sample components, etc.
[0150] It is worth noting that, in this embodiment, by selecting calibration points and determining the three-dimensional parameters of each sample component using the three-dimensional parameters corresponding to the calibration points, it is possible to avoid the disadvantages of large amount of calculation caused by constructing the initial three-dimensional model based on the three-dimensional parameters of all points, thereby achieving the technical effect of reducing the amount of calculation, saving computing resources and improving construction efficiency.
[0151] S403: Obtain a picture of the target vehicle to be re-identified.
[0152] The description of S403 can be found in S101 and will not be repeated here.
[0153] S404: Determine a target two-dimensional image of the target vehicle based on the picture and a preset initial three-dimensional model, where the initial three-dimensional model is generated based on sample three-dimensional information of the sample vehicle.
[0154] Among them, the description of S404 can refer to S102, or can refer to S202 to S204, which will not be repeated here.
[0155] S405: Re-recognize the target two-dimensional image, generate and output a recognition result.
[0156] Among them, the description of S405 can refer to S103, or can refer to S304, and when referring to S304, it can also be combined with S301 to S302 in the above embodiment, which will not be repeated here.
[0157] According to another aspect of the embodiment of the present application, the embodiment of the present application further provides a vehicle re-identification device for executing the vehicle re-identification method as described in any of the above embodiments, such as for executing Figures 2 to 5 The method shown in any one of the embodiments.
[0158] See also Figure 6 , Figure 6 A schematic diagram of a vehicle re-identification device according to an embodiment of the present application.
[0159] like Figure 6 As shown, the device comprises:
[0160] An acquisition module 11 is used to acquire a picture of a target vehicle to be re-identified;
[0161] A first determination module 12 is used to determine a target two-dimensional image of the target vehicle based on the image and a preset initial three-dimensional model, wherein the initial three-dimensional model is generated based on sample three-dimensional information of a sample vehicle;
[0162] The re-recognition module 13 is used to re-recognize the target two-dimensional image, generate and output a recognition result.
[0163] In some embodiments, the first determination module 12 is used to adjust the initial three-dimensional model based on the picture, and determine the adjusted initial three-dimensional model that meets preset adjustment conditions as the target three-dimensional model, wherein the adjustment conditions include: the similarity between the adjusted initial three-dimensional model and the picture is greater than a preset similarity threshold, and the target two-dimensional image is determined based on the target three-dimensional model.
[0164] In some embodiments, the first determination module 12 is used to determine the attribute information of each target component of the target vehicle according to the target three-dimensional model, and to splice each target component according to the attribute information to generate the target two-dimensional image.
[0165] In some embodiments, the attribute information includes: an identification of the target component and three-dimensional parameters of the target component; the first determination module 12 is used to determine the connection relationship between the target components according to the identification of the target component, and to splice the target components according to the connection relationship and the three-dimensional parameters of the target components to generate the target two-dimensional image.
[0166] Combination Figure 7 It can be seen that in some embodiments, the device further includes:
[0167] A first acquisition module 14, used for acquiring sample information of a sample two-dimensional image;
[0168] A training module 15 is used to train a preset initial network model according to the sample information of the sample two-dimensional image to generate a re-recognition network model;
[0169] And, the re-recognition module 13 is used to input the target two-dimensional image into the re-recognition network model, generate and output the recognition result.
[0170] Combination Figure 7 It can be seen that in some embodiments, the device further includes:
[0171] The second acquisition module 16 is used to acquire sample information of the sample vehicle, where the sample information of the sample vehicle includes: the sample three-dimensional information and the sample quantity;
[0172] The construction module 17 is used to construct the initial three-dimensional model according to the sample three-dimensional information and the sample quantity.
[0173] In some embodiments, the construction module 17 is used to determine average three-dimensional information based on the sample three-dimensional information and the number of samples;
[0174] A preset basic model framework is trained according to the average three-dimensional information to generate the initial three-dimensional model.
[0175] In some embodiments, the sample three-dimensional information includes: three-dimensional parameters of each sample component of the sample vehicle and identifications of each sample component.
[0176] In some embodiments, the three-dimensional parameters of each of the sample components are three-dimensional parameters corresponding to pre-set calibration points of each of the sample components.
[0177] Combination Figure 7 It can be seen that in some embodiments, the device further includes:
[0178] The second determination module 18 is used to determine the tracking and positioning information of the target vehicle according to the recognition result.
[0179] According to an embodiment of the present application, the present application also provides a computer program product, the program product includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
[0180] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
[0181] like Figure 8 , is a block diagram of an electronic device for a vehicle re-identification method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0182] like Figure 8As shown, the electronic device includes: one or more processors 801, a memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 801 is taken as an example.
[0183] The memory 802 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the vehicle re-identification method provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the vehicle re-identification method provided in the present application.
[0184] The memory 802 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the vehicle re-identification method in the embodiment of the present application. The processor 801 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 802, that is, the vehicle re-identification method in the above method embodiment is implemented.
[0185] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the electronic device of the vehicle re-identification method, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the electronic device of the vehicle re-identification method via 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 combinations thereof.
[0186] The electronic device of the vehicle re-identification method may further include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0187] The input device 803 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device of the vehicle re-identification method, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 804 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
[0188] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0189] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0190] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0191] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a Block-chain-based Service Network (BSN), a wide area network (WAN), and the Internet.
[0192] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0193] According to another aspect of the embodiments of the present application, the embodiments of the present application also provide a method for model training.
[0194] See also Fig. 9 , Fig. 9 A flowchart of the model training method according to an embodiment of the present application.
[0195] like Fig. 9 As shown, the method includes:
[0196] S501: Collect sample information of sample vehicles, where the sample information of sample vehicles includes: sample three-dimensional information and sample quantity.
[0197] S502: constructing an initial three-dimensional model according to the sample three-dimensional information and the number of samples, where the initial three-dimensional model is used to re-identify the target vehicle based on the image of the target vehicle.
[0198] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0199] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A vehicle re-identification method, include: Obtain a picture of the target vehicle to be re-identified; Determining a target two-dimensional image of the target vehicle based on the picture and a preset initial three-dimensional model, wherein the initial three-dimensional model is generated based on sample three-dimensional information of a sample vehicle; Re-identifying the target two-dimensional image, generating and outputting a recognition result; Collecting sample information of the sample vehicle, wherein the sample information of the sample vehicle includes: the sample three-dimensional information and the sample quantity; According to the sample three-dimensional information and the sample quantity, average three-dimensional information is determined; according to the average three-dimensional information, a preset basic model framework is trained to generate the initial three-dimensional model.
2. The method according to claim 1, in, Determining a target two-dimensional image of the target vehicle based on the image and a preset initial three-dimensional model includes: Adjusting the initial three-dimensional model based on the picture; Determining the adjusted initial three-dimensional model that meets a preset adjustment condition as the target three-dimensional model, wherein the adjustment condition includes: the similarity between the adjusted initial three-dimensional model and the image is greater than a preset similarity threshold; The target two-dimensional image is determined according to the target three-dimensional model.
3. The method according to claim 2, in, Determining the target two-dimensional image according to the target three-dimensional model includes: Determining attribute information of each target component of the target vehicle according to the target three-dimensional model; The target components are spliced according to the attribute information to generate the target two-dimensional image.
4. The method according to claim 3, in, The attribute information includes: an identification of the target component and a three-dimensional parameter of the target component; splicing the target components according to the attribute information to generate the target two-dimensional image includes: Determining the connection relationship between the target components according to the identifiers of the target components; According to the connection relationship and the three-dimensional parameters of each target component, each target component is spliced to generate the target two-dimensional image.
5. The method according to any one of claims 1 to 4, further comprising: include: Collecting sample information of a sample two-dimensional image; Training a preset initial network model according to sample information of the sample two-dimensional image to generate a re-recognition network model; And, re-recognizing the target two-dimensional image, generating and outputting the recognition result includes: inputting the target two-dimensional image into the re-recognition network model, generating and outputting the recognition result.
6. The method according to any one of claims 1 to 4, in, The sample three-dimensional information includes: three-dimensional parameters of each sample component of the sample vehicle and identifications of each sample component.
7. The method according to claim 6, in, The three-dimensional parameters of each of the sample components are three-dimensional parameters corresponding to the pre-set calibration points of each of the sample components.
8. The method according to any one of claims 1 to 4, further comprising: include: The tracking and positioning information of the target vehicle is determined according to the recognition result.
9. A vehicle re-identification device, include: An acquisition module is used to acquire a picture of a target vehicle to be re-identified; A first determination module is used to determine a target two-dimensional image of the target vehicle based on the image and a preset initial three-dimensional model, wherein the initial three-dimensional model is generated based on sample three-dimensional information of a sample vehicle; A re-recognition module, used to re-recognize the target two-dimensional image, generate and output a recognition result; A second collection module is used to collect sample information of the sample vehicle, where the sample information of the sample vehicle includes: the sample three-dimensional information and the sample quantity; A construction module is used to determine average three-dimensional information based on the sample three-dimensional information and the sample quantity; and to train a pre-set basic model framework based on the average three-dimensional information to generate the initial three-dimensional model.
10. The device according to claim 9, in, The first determination module is used to adjust the initial three-dimensional model based on the picture, and determine the adjusted initial three-dimensional model that meets preset adjustment conditions as the target three-dimensional model, wherein the adjustment conditions include: the similarity between the adjusted initial three-dimensional model and the picture is greater than a preset similarity threshold, and the target two-dimensional image is determined based on the target three-dimensional model.
11. The device according to claim 10, in, The first determination module is used to determine the attribute information of each target component of the target vehicle according to the target three-dimensional model, and to splice each target component according to the attribute information to generate the target two-dimensional image.
12. The device according to claim 11, in, The attribute information includes: an identification of the target component and three-dimensional parameters of the target component; the first determination module is used to determine the connection relationship between the target components according to the identification of the target component, and to splice the target components according to the connection relationship and the three-dimensional parameters of the target components to generate the target two-dimensional image.
13. The device according to any one of claims 9 to 12, further comprising: include: A first acquisition module, used for acquiring sample information of a sample two-dimensional image; A training module, used for training a preset initial network model according to sample information of the sample two-dimensional image to generate a re-recognition network model; And, the re-recognition module is used to input the target two-dimensional image into the re-recognition network model to generate and output the recognition result.
14. The device according to any one of claims 9 to 12, in, The sample three-dimensional information includes: three-dimensional parameters of each sample component of the sample vehicle and identifications of each sample component.
15. The device according to claim 14, in, The three-dimensional parameters of each of the sample components are three-dimensional parameters corresponding to the pre-set calibration points of each of the sample components.
16. The device according to any one of claims 9 to 12, further comprising: include: The second determination module is used to determine the tracking and positioning information of the target vehicle according to the recognition result.
17. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to execute the method of any one of claims 1-8.
19. A method for model training, include: Collecting sample information of sample vehicles, wherein the sample information of the sample vehicles includes: sample three-dimensional information and sample quantity; constructing an initial three-dimensional model according to the sample three-dimensional information and the sample quantity, wherein the initial three-dimensional model is used to re-identify the target vehicle based on the image of the target vehicle; The constructing of an initial three-dimensional model according to the sample three-dimensional information and the sample quantity includes: According to the sample three-dimensional information and the sample quantity, average three-dimensional information is determined; according to the average three-dimensional information, a preset basic model framework is trained to generate the initial three-dimensional model.
20. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and device for identifying image
CN111582185A
Object detection method, device and equipment and storage medium
CN111753739A
Camera system and method for capturing the environment of a vehicle
DE102014206677A1
Method for recognizing a trailer
DE102018008996A1
Enhanced three-dimensional training data generation
US20190311487A1
