Truck ownership recognition method based on second-order target detection and semantic recognition
Through the second-order target detection and semantic recognition technology, combined with PP-yolo and SEED network, the truck body label is identified, which solves the problem of inaccurate truck identification and reliance on manual monitoring in the existing technology, and realizes the detection in extreme environments. Accurate and efficient identification.
Patent Information
- Application Number
- CN202210469746.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-04-28
AI Technical Summary
In the existing technology, truck vehicle identification mainly relies on license plate recognition, which has problems of untimely and inaccurate identification. Especially in extreme environments, manual monitoring is difficult and is limited by camera angles, resulting in a high misjudgment rate.
Using a method based on second-order target detection and semantic recognition, the truck body pictures are collected through the network camera, and the PP-yolo target detection model and SEED text recognition neural network are used to independently determine the truck's ownership, and identify the vehicle's ownership based on the labeling type to reduce confusion. Reliance on manual monitoring.
It achieves accurate identification of the truck's ownership under unmanned monitoring conditions, reduces the misjudgment rate, adapts to different camera angles and extreme environments, and improves identification efficiency and accuracy.
Smart Images

Figure CN114973123B
Abstract
Description
Technical Field
[0001] The present invention relates to vehicle identification technology, and in particular to a truck attribution identification method based on second-order target detection and semantic recognition. Background Art
[0002] Artificial intelligence has brought about tremendous changes in the field of road traffic. Technologies such as vehicle type recognition, license plate detection, and road sign recognition based on neural networks have been widely used, and advanced technologies such as driverless driving are gradually entering people's lives. The prevalence of neural network models has greatly reduced manual labor while reducing the misjudgment rate, avoiding the threat of premature death to people in extreme environments.
[0003] With the popularization of unmanned equipment, promoting the deployment and application of artificial intelligence technology in special fields has become an important issue. In the past, the ownership of trucks required long-term manual monitoring, especially at night and in extreme weather conditions, which made manual monitoring difficult. Long-term continuous manual monitoring is prone to misjudgment due to factors such as fatigue.
[0004] At present, vehicle ownership identification is mostly based on license plate recognition technology. However, vehicle ownership identification based on license plate recognition results requires that the license plate number to be identified has been stored in the data of the unit. In addition, due to the limitation of the camera shooting angle, the license plate number may not be captured, which will cause problems such as untimely and inaccurate identification. Summary of the invention
[0005] Purpose of the invention: The purpose of the present invention is to solve the deficiencies in the prior art and to provide a method for identifying truck ownership based on second-order target detection and semantic recognition. The present invention integrates second-order target monitoring and text recognition technology to autonomously determine the ownership of a truck based on the type of label on the side of the truck body.
[0006] Technical solution: A truck attribution recognition method based on second-order target detection and semantic recognition of the present invention is characterized by comprising the following steps:
[0007] Step 1: Deploy network cameras at vehicle entrances and exits, truck parking areas, etc., and ensure that the network cameras are facing both sides of the truck. Each network camera is connected to the neural network inference server of the monitoring center through a network module. The neural network inference server pushes the inference results (including the current camera image, the vehicle location, vehicle ownership information, etc.) to the network monitor;
[0008] The network module described here includes a physical network composed of network cables, switches, routers, etc., which are transmitted through a local area network; the neural network inference server adopts a parallel computing server, which is equipped with an NVIDIA computing card, an AI processor, etc.;
[0009] Step 2: Collect images of both sides of the truck body through a network camera, manually screen and mark the position and type of the body label, crop the label image according to the label position, mark the main content of the label, and create training and test sets according to a certain ratio (for example, 5:1);
[0010] Here, we manually filter out the pictures where the vehicle body is not facing the camera or the car sticker is not clear. The process includes: filter out the pictures containing the sticker from the truck body pictures by naked eye; use the labelme open source tool for manual labeling. The operation method is: right click -> create a rectangle -> draw a rectangle from the upper left corner of the car sticker position to the lower right corner -> enter the car sticker category -> click OK to complete the labeling. The labelme tool will automatically save the label position and type according to the coordinates and size of the rectangle and the entered label;
[0011] Step 3: Use the dataset with the labeled body locations to train the second-order PP-yolo object detection model; use the images cropped according to the label locations and the content annotations to train the text recognition neural network SEED;
[0012] Step 4: First-order target detection uses the public PP-yolo object recognition model to determine the location of the truck. Second-order target detection uses the self-trained second-order PP-yolo target detection model to detect the label location and type within the truck location, and uses the trained text recognition neural network SEED to recognize the content of the vehicle logo.
[0013] Combine the vehicle logo type output by PP-yolo and the text recognition content of SEED in a certain proportion to determine the vehicle body label type and then determine the vehicle ownership;
[0014] The truck location and vehicle ownership determined by the first-order target detection are expressed in the real-time video and pushed to the network monitor for display.
[0015] The present invention only needs to detect the stickers on the truck body, and can not only identify the stickers of the unit, but also make corresponding ownership judgments for vehicles of other units with stickers. In addition, the stickers on the body are generally large in size, so they are less restricted by the camera shooting angle.
[0016] Furthermore, the BackBone backbone network in the PP-yolo target detection model adopts ResNet-50_vd (adding a mean pooling layer to the shortcut branch in the downsampling module of ResNet50); Detection Neck adopts a feature pyramid structure to achieve feature fusion; Detection Head uses 3x3 convolution and finally uses 1x1 convolution to adjust the number of channels;
[0017] The training process of the second-order PP-yolo target detection model is:
[0018] Step 1: Manually mark the location and category of the truck in the picture using LabelMe and convert it into an XML label file;
[0019] Step ②: Input the truck images processed in step ① into the untrained initial PP-yolo network in batches, and use manual labels to calculate the loss function shown in formula (1);
[0020] L=L cross +λL box +βL object (1)
[0021] Where L cross Represents the cross entropy loss, which is used to calculate the cross entropy between the output category and the actual category, L box Represents the regression loss, which is used to calculate the L1 distance between the network output target position and the actual position, L object Represents the confidence loss, which is used to determine whether there is an object in the current bounding box. Both λ and β are hyperparameters.
[0022] Step ③: Repeat steps ① and ② until the loss function is less than the preset value.
[0023] The present invention uses the open source PP-yolo for first-order target detection to realize the detection of the truck position, and no retraining is required. Only the second-order PP-yolo target detection used for the second recognition (recognizing the vehicle position) needs to be trained.
[0024] Furthermore, the structure of the character recognition neural network SEED in step 3 includes an encoder, a semantic module, a decoder and a pre-trained language model; the encoder includes CNN ( Figure 5 ResNet45) backbone and RNN ( Figure 5 The BiLSTM in the decoder extracts visual features through the encoder; the semantic module predicts semantic information from the extracted visual features; the pre-trained language model supervises the semantic information predicted by the semantic module; the decoder includes RNN( Figure 5 Att-GRU in , which is an attention mechanism for generating recognition results.
[0025] The training process of the above text neural network SEED is:
[0026] Step ①: Design the loss function and add supervision to both the semantic module and the decoder module, as shown in formula (2);
[0027] L=L rec +γL sem (2)
[0028] Among them, L rec is the standard cross entropy loss of the predicted probability relative to the true label, L sem is the word embedding loss of predicting semantic information relative to the transcription label; γ is a hyperparameter of the balance loss (can be temporarily set to 1), L sem The loss is calculated using a simple cosine function, as shown in formula (3);
[0029] Among them, S represents the predicted semantic information, and em is the word embedding output of the real semantics;
[0030] L sem =1-cos(S,em) (3)
[0031] Step ②, crop the image obtained by the second-order PP-yolo target detection to obtain the car sticker position image, and manually annotate the text content of the image;
[0032] Step 3: Initialize the decoder using the word embedding vector output by the pre-trained language model;
[0033] Step ④: Input the car sticker location image into the SEED network, use the manually annotated car sticker text content as the label for supervised training, and use formula (2) to perform end-to-end supervised training (i.e., only the input of the given network and the correct label are required for training);
[0034] Step ⑤: Repeat steps ②, ③ and ④ until the loss function is less than the preset value.
[0035] Beneficial effects: The present invention arranges high-definition video acquisition equipment at vehicle entrances and exits, parking areas and other locations in fixed places, collects pictures of trucks, manually marks the positions of body labels and identifying issues, and uses them to train the second-stage target detection model and semantic recognition model, respectively. The location of the truck is determined in the first-order target detection stage, and the position and type of the body label are determined in the second-order target detection stage. The final determination of the body label type is completed in combination with the text recognition results. The ownership of the vehicle is determined based on the label type, and the result of whether it is a vehicle of this unit is given. The overall process is completed by the collaboration of the acquisition end, the network module and the inference end, which can realize unmanned monitoring and effectively reduce the dependence on manual labor. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a schematic diagram of the hardware structure deployment in the present invention;
[0037] Figure 2 This is a schematic diagram of the preparatory stage of the early deployment of the present invention;
[0038] Figure 3 It is a schematic diagram of the overall process of the present invention;
[0039] Figure 4 It is a schematic diagram of the PP-yolo network structure in the present invention;
[0040] Figure 5 This is a schematic diagram of the structure of the Chinese character recognition neural network SEED of the present invention;
[0041] Figure 6 This is a schematic diagram of an application of an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The technical solution of the present invention is described in detail below, but the protection scope of the present invention is not limited to the embodiments.
[0043] like Figures 1 to 3 As shown, the truck attribution recognition method based on second-order target detection and semantic recognition in this embodiment includes the following steps:
[0044] Step 1: Deploy network cameras at vehicle entrances and exits, truck parking areas, etc., and ensure that the network cameras are facing both sides of the truck. Each network camera is connected to the neural network inference server of the monitoring center through a network module. The neural network inference server pushes the inference results (including training results and test results, etc.) to the network monitor;
[0045] The network module described here includes a physical network composed of network cables, switches, routers, etc., which are transmitted through a local area network; the neural network inference server adopts a parallel computing server, which is equipped with an NVIDIA computing card, an AI processor, etc.;
[0046] Step 2: Collect images of both sides of the truck body through a network camera, manually screen and mark the position and type of the body label, crop the label image according to the label position, mark the main content of the label, and create training and test sets according to a certain ratio (for example, 5:1);
[0047] Here, we manually filter out the pictures where the vehicle body is not facing the camera or the car sticker is not clear. The process includes: filter out the pictures containing the sticker from the truck body pictures by naked eye; use the labelme open source tool for manual labeling. The operation method is: right click -> create a rectangle -> draw a rectangle from the upper left corner of the car sticker position to the lower right corner -> enter the car sticker category -> click OK to complete the labeling. The labelme tool will automatically save the label position and type according to the coordinates and size of the rectangle and the entered label;
[0048] Step 3: Use the dataset with the labeled body locations to train the second-order PP-yolo object detection model; use the images cropped according to the label locations and the content annotations to train the text recognition neural network SEED;
[0049] Step 4: Figure 4 As shown, the first-order target detection uses the public PP-yolo object recognition model to determine the location of the truck. The second-order target detection uses the self-trained second-order PP-yolo target detection model to detect the label location and type within the truck location, and uses the trained text recognition neural network SEED to recognize the content of the vehicle logo.
[0050] Combine the vehicle logo type output by PP-yolo and the text recognition content of SEED in a certain proportion to determine the vehicle body label type and then determine the vehicle ownership;
[0051] The truck location and vehicle ownership determined by the first-order target detection are expressed in the real-time video and pushed to the network monitor for display.
[0052] like Figure 4 As shown, the BackBone backbone network in the PP-yolo target detection model of this embodiment adopts ResNet-50_vd (adding a mean pooling layer to the shortcut branch in the downsampling module of ResNet50); DetectionNeck adopts a feature pyramid structure to achieve feature fusion; Detection Head uses 3x3 convolution and finally uses 1x1 convolution to adjust the number of channels;
[0053] The training process of the second-order PP-yolo target detection model is:
[0054] Step 1: Manually mark the location and category of the truck in the picture using LabelMe and convert it into an XML label file;
[0055] Step ②: Input the truck images processed in step ① into the untrained initialized YOLO network in batches, and use manual labels to calculate the loss function shown in formula (1);
[0056] L=L cross +λL box +βL object (1)
[0057] Where L cross Represents the cross entropy loss, which is used to calculate the cross entropy between the output category and the actual category, L box Represents the regression loss, which is used to calculate the L1 distance between the network output target position and the actual position, L object Represents the confidence loss, which is used to determine whether there is an object in the current bounding box. Both λ and β are hyperparameters and need to be adjusted according to the actual situation.
[0058] Step ③: Repeat steps ① and ② until the loss function is less than the preset value.
[0059] like Figure 5 As shown, this embodiment uses the open source PP-yolo to perform first-order target detection to detect the location of the truck, without the need for retraining, that is, only the second-order PP-yolo target detection used for the second recognition (recognition of the location of the vehicle) needs to be trained. The structure of the text recognition neural network SEED includes an encoder, a semantic module, a decoder and a pre-trained language model; the encoder includes CNN ( Figure 5 ResNet45) backbone and RNN ( Figure 5 The BiLSTM in the image processing unit is used to extract visual features; the semantic module is used to predict semantic information from visual features; the pre-trained language model is used to supervise the semantic information predicted by the semantic module; the decoder includes RNN( Figure 5 Att-GRU in , which is an attention mechanism for generating recognition results.
[0060] The training process of the above text neural network SEED is:
[0061] Step ①: Design the loss function and add supervision to both the semantic module and the decoder module, as shown in formula (2);
[0062] L=L rec +γL sem (2)
[0063] Among them, L rec is the standard cross entropy loss of the predicted probability relative to the true label, L sem is the word embedding loss of predicting semantic information relative to the transcription label; γ is a hyperparameter of the balance loss (we temporarily set it to 1), L sem The loss is calculated using a simple cosine function, as shown in formula (3);
[0064] Among them, S represents the predicted semantic information, and em is the word embedding output of the real semantics;
[0065] L sem =1-cos(S,em) (3)
[0066] Step ②, crop the image obtained by the second-order PP-yolo target detection to obtain the car sticker position image, and manually annotate the text content of the image;
[0067] Step 3: Initialize the decoder using the word embedding vector output by the pre-trained language model;
[0068] Step ④: Input the car sticker location image into the SEED network, use the manually annotated car sticker text content as the label for supervised training, and use formula (2) to perform end-to-end supervised training (i.e., training can be performed with only the input of the given network and the correct label);
[0069] Step ⑤: Repeat steps ②, ③ and ④ until the loss function is less than the preset value.
[0070] like Figure 6 As shown, the overall process of the present invention is:
[0071] Step 1: Detect where the truck is (first time using PP-yolo), that is, the first-order target detects the location of the truck and performs processing such as cropping;
[0072] Step 2: Detect the location of the sticker and the type of sticker from the location of the truck (using pp-yolo for the second time), that is, first-order target detection, and perform cropping again;
[0073] Step 3: Identify the text content on the sticker, i.e. use the trained text neural network SEED for semantic recognition;
[0074] Step ④ determines the ownership of the truck by combining the car sticker type in ② and the text content in ③.
Claims
1. A truck ownership identification method based on second-order target detection and semantic recognition, characterized in that: The following steps are involved: Step 1: Deploy network cameras at the vehicle entrances and exits and truck parking areas, and ensure that the network cameras face both sides of the trucks. Each network camera is connected to the neural network inference server of the monitoring center through a network module, and the neural network inference server pushes the inference results to the network monitor; Step 2: Collect images of both sides of the truck body through a network camera, manually screen and mark the position and type of the body label, crop the label image according to the label position, mark the main content of the label, and create training and test sets according to a certain ratio; Step 3: Use the dataset with the labeled body locations to train the second-order PP-yolo object detection model; use the images cropped according to the label locations and the content annotations to train the text recognition neural network SEED; Step 4: First-order target detection uses the public PP-yolo object recognition model to determine the location of the truck. Second-order target detection uses the self-trained second-order PP-yolo target detection model to detect the label location and type within the truck location, and uses the trained text recognition neural network SEED to recognize the content of the vehicle logo. Combine the vehicle logo type output by PP-yolo and the text recognition content of SEED in a certain proportion to determine the vehicle body label type and then determine the vehicle ownership; The truck location and vehicle ownership determined by the first-order target detection are expressed on the real-time video and pushed to the network monitor for display.
2. The truck attribution identification method based on second-order target detection and semantic recognition according to claim 1 is characterized in that: The BackBone network in the PP-yolo target detection model adopts ResNet-50_vd, and the shortcut branch in the downsampling module of ResNet50 is added with a mean pooling layer; the Detection Neck adopts a feature pyramid structure to achieve feature fusion; the Detection Head uses 3x3 convolution, and finally uses 1x1 convolution to adjust the number of channels; The training process of the second-order PP-yolo target detection model is: Step 1: Manually mark the location and category of the truck in the picture using LabelMe and convert it into an XML label file; Step ②: Input the truck images processed in step ① into the untrained initial PP-yolo network in batches, and use manual labels to calculate the loss function shown in formula (1); L=L cross +λL box +βL object (1) Among them, L cross Represents the cross entropy loss, which is used to calculate the cross entropy between the output category and the actual category, L box Represents the regression loss, which is used to calculate the L1 distance between the network output target position and the actual position, L object Represents the confidence loss, which is used to determine whether there is a target in the current bounding box. Both λ and β are hyperparameters; Step ③: Repeat steps ① and ② until the loss function is less than the preset value.
3. The truck attribution identification method based on second-order target detection and semantic recognition according to claim 1 is characterized in that: The structure of the character recognition neural network SEED in step 3 includes an encoder, a semantic module, a decoder and a pre-trained language model; The encoder includes a CNN backbone and an RNN, and the encoder extracts visual features; The semantic module predicts semantic information from the extracted visual features; the pre-trained language model supervises the semantic information predicted by the semantic module; and the decoder includes an attention mechanism for RNN to generate recognition results.
4. The truck attribution identification method based on second-order target detection and semantic recognition according to claim 3 is characterized in that: The training process of the text recognition neural network SEED is as follows: Step ①: Design the loss function and add supervision to both the semantic module and the decoder module, as shown in formula (2); L=L rec +γL sem (2) Among them, L rec is the standard cross entropy loss of the predicted probability relative to the true label, L sem is the word embedding loss of predicting semantic information relative to the transcription label; γ is the hyperparameter of the balance loss, L sem The loss is calculated using a simple cosine function, as shown in formula (3); Among them, S represents the predicted semantic information, and em is the word embedding output of the real semantics; L sem =1-cos(S,em) (3) Step ②, crop the image obtained by the second-order PP-yolo target detection to obtain the car sticker position image, and manually annotate the text content of the image; Step 3: Initialize the decoder using the word embedding vector output by the pre-trained language model; Step ④: Input the car sticker location image into the SEED network, use the manually annotated car sticker text content as the label for supervised training, and use formula (2) for end-to-end supervised training; Step ⑤: Repeat steps ②, ③ and ④ until the loss function is less than the preset value.
