Vehicle tracking method, Siamese network training method and device
Extracting vehicle features and calculating similarities through the Siamese network solves the problems of low vehicle tracking accuracy and efficiency in the existing technology, and achieves efficient vehicle tracking in low network conditions.
Patent Information
- Application Number
- CN201911007111.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-22
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-10-22
AI Technical Summary
The accuracy and efficiency of vehicle tracking based on image recognition in the existing technology are low, especially in environments with poor network conditions. The vehicle image capture accuracy is low and limited by the capture angle.
The Siamese network is used to extract vehicle features by inputting the vehicle image of the vehicle to be tracked and the image captured by the monitoring equipment, and calculate the feature similarity to determine the vehicle location. The pre-trained Siamese network is used to extract deep features with strong discriminating ability to improve vehicle tracking. accuracy.
It improves the accuracy and efficiency of vehicle tracking. Even when the captured image accuracy is low or the network status is poor, the vehicle can be accurately tracked, and the accuracy of vehicle feature extraction is enhanced.
Smart Images

Figure CN112699709B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle tracking, and in particular to a vehicle tracking method, a Siamese network training method and device, an electronic device, and a storage medium. Background Art
[0002] At present, the common technology for positioning and tracking vehicles is satellite positioning, which has high requirements for communication networks and cannot be applied in places with poor network conditions such as underground garages. With the development of image recognition technology and the spread of monitoring equipment in various places in life, it has become possible to track vehicles based on image recognition technology. However, since most vehicles are similar in model, the image capture accuracy of running vehicles is low, and they are also limited by the capture angle, the existing technology of tracking vehicles based on image recognition technology has low accuracy and efficiency. Summary of the invention
[0003] The present invention provides a vehicle tracking method with high accuracy and efficiency, a Siamese network training method and device, an electronic device, and a storage medium.
[0004] Specifically, the present invention is achieved through the following technical solutions:
[0005] In a first aspect, a vehicle tracking method is provided, the vehicle tracking method comprising:
[0006] Inputting a vehicle image of a vehicle to be tracked into a first branch of a Siamese network, and inputting a captured image captured by a monitoring device into a second branch of the Siamese network, so as to respectively extract captured vehicle features in the captured image and features of the vehicle to be tracked in the vehicle image, wherein the Siamese network is pre-trained using a vehicle image set including vehicle feature annotation information;
[0007] Calculating the similarity between the captured vehicle features and the features of the vehicle to be tracked;
[0008] The position of the vehicle to be tracked is determined according to the position information of the target monitoring device, and the similarity between the captured vehicle features in the captured image captured by the target monitoring device and the features of the vehicle to be tracked is greater than a threshold.
[0009] Optionally, inputting the captured image captured by the monitoring device into the second branch of the Siamese network includes:
[0010] The captured image including the vehicle image information is input into the second branch of the Siamese network.
[0011] Optionally, calculating the similarity between the captured vehicle feature and the to-be-tracked vehicle feature includes:
[0012] The Euclidean distance or cosine distance between the captured vehicle feature and the vehicle feature to be tracked is calculated.
[0013] Optionally, the vehicle tracking method further includes:
[0014] The positions of the corresponding target monitoring devices are connected in chronological order according to the capturing time of the captured images to draw the driving trajectory of the vehicle to be tracked.
[0015] Optionally, the vehicle characteristics to be tracked include at least one of the following characteristics:
[0016] Vehicle model, body color, body decoration, interior decoration, body texture, window type, license plate number.
[0017] In a second aspect, a Siamese network training method is provided, the training method comprising:
[0018] A plurality of groups of image pairs are obtained as training samples, each group of image pairs includes two vehicle images, and each vehicle image is annotated with a vehicle annotation feature;
[0019] For each set of image pairs, two vehicle images are input into the two branches of the Siamese network respectively;
[0020] Performing feature extraction on the input vehicle image through the Siamese network to obtain vehicle prediction features of the two vehicle images respectively;
[0021] Calculating a first similarity of vehicle prediction features of the two vehicle images and a second similarity of vehicle annotation features of the two vehicle images;
[0022] A difference between the first similarity and the second similarity is determined, and a network parameter of the Siamese network is adjusted based on the difference.
[0023] Optionally, the training samples include positive samples and negative samples;
[0024] The two vehicle images in the image pair used as positive samples are images of the same vehicle;
[0025] The two vehicle images in the image pair used as negative samples are images of different vehicles.
[0026] Optionally, the two vehicle images in the positive sample image pair are taken at different angles, and / or at different focal lengths, and / or under different light brightness.
[0027] In a third aspect, a vehicle tracking device is provided, the vehicle tracking device comprising:
[0028] An input module, used for inputting a vehicle image of a vehicle to be tracked into a first branch of a Siamese network, and inputting a captured image captured by a monitoring device into a second branch of the Siamese network, so as to respectively extract captured vehicle features in the captured image and features of the vehicle to be tracked in the vehicle image, wherein the Siamese network is pre-trained using a vehicle image set including vehicle feature annotation information;
[0029] A calculation module, used for calculating the similarity between the features of the captured vehicle and the features of the vehicle to be tracked;
[0030] The tracking module is used to determine the position of the vehicle to be tracked according to the position information of the target monitoring device, and the similarity between the captured vehicle features in the captured image captured by the target monitoring device and the features of the vehicle to be tracked is greater than a threshold.
[0031] In a fourth aspect, a Siamese network training device is provided, the training device comprising:
[0032] An acquisition module is used to acquire multiple groups of image pairs as training samples, each group of image pairs includes two vehicle images, and each vehicle image is annotated with a vehicle annotation feature;
[0033] An input module, for each group of image pairs, inputting two vehicle images into two branches of a Siamese network respectively, so as to extract features of the input vehicle images through the Siamese network, and obtain vehicle prediction features of the two vehicle images respectively;
[0034] A calculation module, used to calculate a first similarity of vehicle prediction features of two vehicle images and a second similarity of vehicle annotation features of two vehicle images;
[0035] An adjustment module is used to determine a difference between the first similarity and the second similarity, and adjust a network parameter of the Siamese network based on the difference.
[0036] In a fifth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described vehicle tracking methods when executing the computer program.
[0037] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned vehicle tracking methods are implemented.
[0038] In a seventh aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the training method of the Siamese network described in any one of the above items is implemented.
[0039] In an eighth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the Siamese network training method described in any one of the above items are implemented.
[0040] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:
[0041] The present invention uses a Siamese network to achieve vehicle tracking. Since the Siamese network can extract deep features with strong identification capabilities, even if only a partial image of the vehicle is captured, the vehicle features reflecting the characteristics of the entire vehicle can be extracted through the trained Siamese network, which can improve the accuracy of the similarity comparison between two images, and ultimately improve the accuracy of vehicle tracking.
[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0044] Figure 1 is a flow chart of a vehicle tracking method shown in an exemplary embodiment of the present invention;
[0045] Figure 2 is a flow chart of a vehicle tracking method shown in another exemplary embodiment of the present invention;
[0046] Figure 3 is used Figure 2 A schematic diagram of the driving trajectory of a vehicle to be tracked obtained by a vehicle tracking method;
[0047] Figure 4 is a flow chart of a Siamese network training method shown in an exemplary embodiment of the present invention;
[0048] Figure 5 is a module schematic diagram of a vehicle tracking device shown in an exemplary embodiment of the present invention;
[0049] Figure 6 is a module schematic diagram of a Siamese network training device shown in an exemplary embodiment of the present invention;
[0050] Figure 7 It is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0051] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0052] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0053] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0054] Figure 1 An exemplary embodiment of the present invention shows a vehicle tracking method, which includes the following steps:
[0055] Step 101: Input a vehicle image of a vehicle to be tracked into a first branch of a Siamese network, and input a captured image captured by a monitoring device into a second branch of the Siamese network, so as to respectively extract captured vehicle features in the captured image and features of the vehicle to be tracked in the vehicle image.
[0056] The Siamese network is pre-trained using a vehicle image set that includes vehicle feature annotation information. In this embodiment, the Siamese network is used to extract vehicle features in the image. The Siamese network can extract deep features with strong identification capabilities, and is particularly suitable for feature extraction of vehicle images of captured vehicles in motion. Even if only a partial image of the vehicle is captured, the trained Siamese network can extract vehicle features that reflect the characteristics of the entire vehicle with high accuracy.
[0057] The captured vehicle features and the features of the vehicle to be tracked may include but are not limited to at least one of the following features: vehicle model, body color, body decoration, interior decoration, body texture, window type, license plate number, etc. During network training, the user can set the vehicle feature dimensions and the number of dimensions that the Siamese network should extract. It is understandable that the more dimensions are set, the higher the accuracy when tracking the vehicle.
[0058] In the vehicle tracking process, it is necessary to extract vehicle features. Before inputting the captured images captured by the monitoring equipment into the Siamese network, it is possible to first determine whether there is vehicle image information in the captured images, exclude the captured images that do not include vehicle image information, and only input the captured images that include vehicle image information into the second branch of the Siamese network for vehicle feature tracking. This can improve efficiency and accuracy on the one hand.
[0059] Step 102: Calculate the similarity between the features of the captured vehicle and the features of the vehicle to be tracked.
[0060] In a specific embodiment, the similarity can be represented by Euclidean distance or cosine distance. If Euclidean distance is used, the similarity is calculated in step 102, that is, the Euclidean distance between the captured vehicle feature and the vehicle feature to be tracked is calculated, which can be but not limited to the following calculation formula:
[0061]
[0062] Where d represents the Euclidean distance; n represents the number of dimensions of vehicle features extracted by the Siamese network. i ,y i They represent the features of the captured vehicle and the features of the vehicle to be tracked respectively.
[0063] Step 103: Determine the position of the vehicle to be tracked according to the position information of the target monitoring device.
[0064] The target monitoring device is a monitoring device whose similarity between the captured vehicle features in the captured image and the features of the vehicle to be tracked is greater than a threshold.
[0065] The location information of the target monitoring device may include, for example, longitude and latitude coordinates. If the similarity between the captured vehicle features in the captured image captured by a monitoring device and the features of the vehicle to be tracked is greater than a threshold, it means that the vehicle to be tracked is near the monitoring device (target monitoring device), and the location of the vehicle to be tracked can be determined based on the location information of the monitoring device.
[0066] In this embodiment, a Siamese network is used to implement vehicle tracking. Since the Siamese network can extract deep features with strong identification capabilities, even if only a partial image of the vehicle is captured, the trained Siamese network can extract vehicle features that reflect the characteristics of the entire vehicle, thereby improving the accuracy of the similarity comparison between the two images and ultimately improving the accuracy of vehicle tracking.
[0067] Figure 2 Another exemplary embodiment of the present invention shows a vehicle tracking method, which includes the following steps:
[0068] Step 201: Input a vehicle image of a vehicle to be tracked into a first branch of a Siamese network, and input a captured image captured by a monitoring device into a second branch of the Siamese network, so as to respectively extract captured vehicle features in the captured image and features of the vehicle to be tracked in the vehicle image.
[0069] Step 202: Calculate the similarity between the features of the captured vehicle and the features of the vehicle to be tracked.
[0070] Step 203: Determine the position of the vehicle to be tracked according to the position information of the target monitoring device.
[0071] Among them, the specific implementation methods of steps 201 to 203 are the same as those of steps 101 to 103, which will not be repeated here.
[0072] 204. Connect the positions of the corresponding target monitoring devices according to the capturing time sequence of the captured images to draw a driving track of the vehicle to be tracked.
[0073] If the similarity between the captured vehicle features in the captured images captured by multiple monitoring devices at different time points and the features of the vehicle to be tracked is greater than the threshold, it means that the vehicle to be tracked has appeared near the multiple monitoring devices (target monitoring devices). The location of the corresponding target monitoring devices can be connected according to the sequence of the capture time of the captured images to draw the driving trajectory of the vehicle to be tracked. Figure 3 , if A to K monitoring devices are arranged on the streets of a certain area, and monitoring devices A, D, E, F, H, and I capture images with similarity greater than a threshold to the features of the vehicle to be tracked at time points 13:10, 13:15, 13:21, 13:25, 13:29, and 13:36 respectively, the positions of the monitoring devices are connected in order of time points, see Figure 3 The line marked by the arrow in the middle is the driving trajectory of the vehicle to be tracked.
[0074] Figure 4A Siamese network training method is shown in an exemplary embodiment of the present invention. The trained network is used to implement vehicle tracking. The training method includes the following steps:
[0075] Step 401: Acquire multiple groups of image pairs as training samples.
[0076] Each image pair includes two vehicle images, and each vehicle image is annotated with vehicle annotation features. Vehicle annotation features are generally manually annotated, and may include but are not limited to the following features: vehicle model, body color, body decoration, interior decoration, body texture, window type, license plate number, etc. According to the requirements for the accuracy of the Siamese network, users can annotate the vehicle feature dimensions and the number of dimensions in the vehicle image. It can be understood that the more the number of dimensions is set, the higher the accuracy of the network obtained after training when tracking vehicles.
[0077] It should be noted that during the network training process, the training samples need both positive samples and negative samples. The two vehicle images in the image pair as positive samples are images of the same vehicle, and the two vehicle images in the image pair as negative samples are images of different vehicles. It should be noted that the two vehicle images in the image pair of positive samples can be taken at different angles, and / or at different focal lengths, and / or under different light brightness, so that the Siamese network is more suitable for practical applications and has better robustness.
[0078] Step 402: For each set of image pairs, two vehicle images are input into two branches of the Siamese network respectively.
[0079] Step 403: extract features from the input vehicle image using a Siamese network to obtain vehicle prediction features of the two vehicle images respectively.
[0080] Step 404: Calculate a first similarity of the vehicle prediction features of the two vehicle images and a second similarity of the vehicle annotation features of the two vehicle images.
[0081] Step 405: Determine the difference between the first similarity and the second similarity, and adjust the network parameters of the Siamese network based on the difference.
[0082] Repeat steps 403 to 405 until the training stop condition is met, and the training is terminated. The trained Siamese network can be used for vehicle tracking. The training stop condition may be, for example, that the number of network training iterations reaches a threshold number, or that the difference between the first similarity and the second similarity is less than a difference threshold.
[0083] Corresponding to the aforementioned vehicle tracking method and Siamese network training method embodiments, the present invention also provides vehicle tracking devices and Siamese network training device embodiments.
[0084] Figure 5 A vehicle tracking device is shown in an exemplary embodiment of the present invention. The vehicle tracking device includes: an input module 51 , a calculation module 52 and a tracking module 53 .
[0085] The input module 51 is used to input the vehicle image of the vehicle to be tracked into the first branch of the Siamese network, and input the captured image captured by the monitoring equipment into the second branch of the Siamese network, so as to respectively extract the captured vehicle features in the captured image and the vehicle features to be tracked in the vehicle image, wherein the Siamese network is pre-trained using a vehicle image set including vehicle feature annotation information.
[0086] The calculation module 52 is used to calculate the similarity between the captured vehicle features and the features of the vehicle to be tracked.
[0087] The tracking module 53 is used to determine the position of the vehicle to be tracked according to the position information of the target monitoring device, and the similarity between the captured vehicle features in the captured image captured by the target monitoring device and the features of the vehicle to be tracked is greater than a threshold.
[0088] Optionally, when the captured image captured by the monitoring device is input into the second branch of the Siamese network, the input module 51 is specifically used to input the captured image including the vehicle image information into the second branch of the Siamese network.
[0089] Optionally, the calculation module 52 is specifically configured to calculate the Euclidean distance or the cosine distance between the captured vehicle feature and the vehicle feature to be tracked.
[0090] Optionally, the vehicle tracking device further comprises:
[0091] The drawing module is used to connect the positions of the corresponding target monitoring devices according to the capture time sequence of the captured images to draw the driving trajectory of the vehicle to be tracked.
[0092] Figure 6 A Siamese network training device is shown in an exemplary embodiment of the present invention. The training device includes: an acquisition module 61, an input module 62, a calculation module 63 and an adjustment module 64.
[0093] The acquisition module 61 is used to acquire multiple groups of image pairs as training samples, each group of image pairs includes two vehicle images, and each vehicle image is annotated with a vehicle annotation feature;
[0094] The input module 62 is used for inputting two vehicle images into two branches of the Siamese network for each group of image pairs, so as to extract features of the input vehicle images through the Siamese network and obtain vehicle prediction features of the two vehicle images respectively;
[0095] The calculation module 63 is used to calculate a first similarity of vehicle prediction features of the two vehicle images and a second similarity of vehicle annotation features of the two vehicle images;
[0096] The adjustment module 64 is used to determine the difference between the first similarity and the second similarity, and adjust the network parameters of the Siamese network based on the difference.
[0097] Figure 7 FIG. 1 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present invention, and shows a block diagram of an exemplary electronic device 70 suitable for implementing the embodiments of the present invention. Figure 7 The electronic device 70 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0098] like Figure 7 As shown, the electronic device 70 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 70 may include, but are not limited to: at least one processor 71, at least one memory 72, and a bus 73 connecting different system components (including the memory 72 and the processor 71).
[0099] The bus 73 includes a data bus, an address bus, and a control bus.
[0100] The memory 72 may include a volatile memory, such as a random access memory (RAM) 721 and / or a cache memory 722 , and may further include a read-only memory (ROM) 723 .
[0101] The memory 72 may also include a program tool 725 (or utility) having a set (at least one) of program modules 724, such program modules 724 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0102] The processor 71 is used to execute the method provided by any of the above embodiments by running the computer program stored in the memory 72.
[0103] The electronic device 70 may also communicate with one or more external devices 74 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 75. Furthermore, the model-generated electronic device 70 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 76. As shown, the network adapter 76 communicates with other modules of the model-generated electronic device 70 via a bus 73. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated electronic device 70, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0104] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0105] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented.
[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A Siamese network training method, characterized in that: The training method comprises: A plurality of groups of image pairs are obtained as training samples, each group of image pairs includes two vehicle images, and each vehicle image is annotated with a vehicle annotation feature; For each set of image pairs, two vehicle images are input into the two branches of the Siamese network respectively; Performing feature extraction on the input vehicle image through the Siamese network to obtain vehicle prediction features of the two vehicle images respectively; Calculating a first similarity of vehicle prediction features of the two vehicle images and a second similarity of vehicle annotation features of the two vehicle images; A difference between the first similarity and the second similarity is determined, and a network parameter of the Siamese network is adjusted based on the difference.
2. The Siamese network training method according to claim 1, characterized in that: The training samples include positive samples and negative samples; The two vehicle images in the image pair used as positive samples are images of the same vehicle; The two vehicle images in the image pair used as negative samples are images of different vehicles.
3. The Siamese network training method as claimed in claim 2, characterized in that: The two vehicle images in the positive sample image pair are taken at different angles, and / or at different focal lengths, and / or under different light brightness.
4. A vehicle tracking method, characterized in that: The vehicle tracking method comprises: Inputting a vehicle image of a vehicle to be tracked into a first branch of a Siamese network, and inputting a captured image captured by a monitoring device into a second branch of the Siamese network, so as to respectively extract captured vehicle features in the captured image and features of the vehicle to be tracked in the vehicle image, wherein the Siamese network is pre-trained using a vehicle image set including vehicle feature annotation information and is completed by the method described in any one of claims 1 to 3; Calculating the similarity between the captured vehicle features and the features of the vehicle to be tracked; The position of the vehicle to be tracked is determined according to the position information of the target monitoring device, and the similarity between the captured vehicle features in the captured image captured by the target monitoring device and the features of the vehicle to be tracked is greater than a threshold.
5. The vehicle tracking method according to claim 4, characterized in that: The second branch of inputting the captured images captured by the monitoring equipment into the Siamese network includes: The captured image including the vehicle image information is input into the second branch of the Siamese network.
6. The vehicle tracking method according to claim 4, characterized in that: Calculating the similarity between the captured vehicle feature and the to-be-tracked vehicle feature includes: The Euclidean distance or cosine distance between the captured vehicle feature and the vehicle feature to be tracked is calculated.
7. The vehicle tracking method according to claim 4, characterized in that: The vehicle tracking method further comprises: The positions of the corresponding target monitoring devices are connected in chronological order according to the capturing time of the captured images to draw the driving trajectory of the vehicle to be tracked.
8. The vehicle tracking method according to claim 4, characterized in that: The captured vehicle features and the to-be-tracked vehicle features both include at least one of the following features: Vehicle model, body color, body decoration, interior decoration, body texture, window type, license plate number.
9. A Siamese network training device, characterized in that: The training device comprises: An acquisition module is used to acquire multiple groups of image pairs as training samples, each group of image pairs includes two vehicle images, and each vehicle image is annotated with a vehicle annotation feature; An input module, for each group of image pairs, inputting two vehicle images into two branches of a Siamese network respectively, so as to extract features of the input vehicle images through the Siamese network, and obtain vehicle prediction features of the two vehicle images respectively; A calculation module, used to calculate a first similarity of vehicle prediction features of two vehicle images and a second similarity of vehicle annotation features of two vehicle images; An adjustment module is used to determine a difference between the first similarity and the second similarity, and adjust a network parameter of the Siamese network based on the difference.
10. A vehicle tracking device, characterized in that: The vehicle tracking device comprises: An input module, used for inputting a vehicle image of a vehicle to be tracked into a first branch of a Siamese network, and inputting a captured image captured by a monitoring device into a second branch of the Siamese network, so as to respectively extract captured vehicle features in the captured image and features of the vehicle to be tracked in the vehicle image, wherein the Siamese network is preliminarily trained using a vehicle image set including vehicle feature annotation information and by the method described in any one of claims 1 to 3; A calculation module, used for calculating the similarity between the features of the captured vehicle and the features of the vehicle to be tracked; The tracking module is used to determine the position of the vehicle to be tracked according to the position information of the target monitoring device, and the similarity between the captured vehicle features in the captured image captured by the target monitoring device and the features of the vehicle to be tracked is greater than a threshold.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the Siamese network training method according to any one of claims 1 to 3 is implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the Siamese network training method according to any one of claims 1 to 3 are implemented.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the vehicle tracking method according to any one of claims 4 to 8 is implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the vehicle tracking method according to any one of claims 4 to 8 are implemented.
