Dangerous goods vehicle identification method, electronic device and storage medium

By selecting the corresponding hazardous goods logo detection model according to the direction of the vehicle and conducting hazardous goods logo detection on the target vehicle, the problem of low recognition accuracy of hazardous goods vehicles in the prior art is solved, and the detection accuracy and recall rate are improved.

CN114092894BActive Publication Date: 2024-12-24ZHEJIANG DAHUA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111242923.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-25
Publication Date
2024-12-24
Estimated Expiration
2041-10-25

AI Technical Summary

Technical Problem

The existing methods for identifying dangerous goods vehicles have little accuracy in determining whether a vehicle is a dangerous goods vehicle.

Method used

By obtaining the pending image of the target vehicle, determining its vehicle direction, and selecting the corresponding hazardous goods logo detection model according to different vehicle directions to detect the image to determine whether the vehicle is a hazardous goods vehicle.

Benefits of technology

The detection accuracy and recall rate of hazardous goods marks are improved, thereby improving the accuracy of determining whether the vehicle is a hazardous goods vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114092894B_ABST
    Figure CN114092894B_ABST
Patent Text Reader

Abstract

The present application discloses a method for identifying a hazardous vehicle, an electronic device, and a computer-readable storage medium. The method comprises: obtaining an image to be processed of a target vehicle; judging the vehicle direction of the target vehicle according to the image to be processed; performing hazardous sign detection on the image to be processed using a hazardous sign detection model corresponding to the vehicle direction to obtain a detection result, wherein different hazardous sign detection models correspond to different vehicle directions; and determining whether the target vehicle is a hazardous vehicle based on the detection result. In the above manner, the accuracy of the determination result of whether the target vehicle is a hazardous vehicle can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method for identifying a dangerous goods vehicle, an electronic device, and a computer-readable storage medium. Background Art

[0002] From the perspective of whether they carry dangerous goods, vehicles on the road can be divided into vehicles carrying dangerous goods (hereinafter referred to as dangerous goods vehicles) and vehicles not carrying dangerous goods. With the acceleration of the process of smart cities, the control of vehicles on the road has become more and more stringent, especially the control of dangerous goods vehicles.

[0003] To achieve the control of dangerous goods vehicles, the prerequisite is to determine which vehicles on the road are dangerous goods vehicles. However, the current dangerous goods vehicle identification method does not accurately determine whether a vehicle is a dangerous goods vehicle. Summary of the invention

[0004] The present application provides a method for identifying a hazardous goods vehicle, an electronic device and a computer-readable storage medium, which can solve the problem that the current method for identifying a hazardous goods vehicle has low accuracy in determining whether a vehicle is a hazardous goods vehicle.

[0005] In order to solve the above technical problems, a technical solution adopted by the present application is to provide a method for identifying dangerous goods vehicles. The method includes: obtaining an image to be processed of a target vehicle; judging the vehicle direction of the target vehicle according to the image to be processed; performing dangerous goods sign detection on the image to be processed using a dangerous goods sign detection model corresponding to the vehicle direction to obtain a detection result, wherein different dangerous goods sign detection models correspond to different vehicle directions; and determining whether the target vehicle is a dangerous goods vehicle based on the detection result.

[0006] To solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, which includes a processor and a memory connected to the processor, wherein the memory stores program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.

[0007] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium storing program instructions, which can implement the above method when executed.

[0008] Through the above method, after obtaining the image to be processed, the present application determines the vehicle direction of the target vehicle in the image to be processed, and selects different dangerous goods sign detection models according to different vehicle directions to perform dangerous goods sign detection on the image to be processed to determine whether the target vehicle is a dangerous goods vehicle. Therefore, the same dangerous goods sign detection model does not need to be compatible with vehicle features under multiple vehicle directions, which can improve the detection accuracy and recall rate of dangerous goods signs, and further improve the accuracy of the determination result of whether the target vehicle is a dangerous goods vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 It is a schematic diagram of a diamond-shaped hazardous materials sign;

[0010] Figure 2 It is a schematic diagram of placing dangerous goods signs in the direction of the vehicle's front;

[0011] Figure 3 It is a schematic diagram of placing dangerous goods signs at the rear of the vehicle;

[0012] Figure 4 It is a flowchart of an embodiment of a method for identifying dangerous goods vehicles of the present application;

[0013] Figure 5 It is a structural schematic diagram of a dangerous goods sign detection model;

[0014] Figure 6 It is a flowchart of another embodiment of the method for identifying dangerous goods vehicles of the present application;

[0015] Figure 7 It is a flowchart of another embodiment of the method for identifying dangerous goods vehicles of the present application;

[0016] Figure 8 is a schematic diagram of the area to be detected in the image to be processed;

[0017] Fig. 9 It is a flowchart of another embodiment of the method for identifying dangerous goods vehicles of the present application;

[0018] Fig.10 is another schematic diagram of the image to be processed;

[0019] Fig.11 is another schematic diagram of the image to be processed;

[0020] Fig.12 is another schematic diagram of the image to be processed;

[0021] Fig.13 It is a flowchart of another embodiment of the method for identifying dangerous goods vehicles of the present application;

[0022] Fig.14It is a flowchart of another embodiment of the method for identifying dangerous goods vehicles of the present application;

[0023] Fig.15 It is a flowchart of another embodiment of the method for identifying dangerous goods vehicles of the present application;

[0024] Fig.16 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0025] Fig.17 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] The terms "first", "second", and "third" in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first", "second", and "third" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0028] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments without conflict.

[0029] Before introducing the method provided by this application, the dangerous goods signs involved are explained first:

[0030] The body of a hazardous goods vehicle is provided with a hazardous goods sign. The hazardous goods sign can be divided into two categories: one is the first hazardous goods sign, which indicates that the goods carried by the vehicle are hazardous goods, and the other is the second hazardous goods sign, which indicates the category of hazardous goods to which the goods carried by the vehicle belong.

[0031] Generally speaking, the shapes of the first dangerous goods sign include triangle and rectangle. The first dangerous goods sign of rectangle includes the character "dangerous goods", and the first dangerous goods sign of triangle includes the character "danger". The shapes of the second dangerous goods sign include rhombus and circle. The characters included in the second dangerous goods sign are the names of dangerous goods categories. Among them, the characters included in the second dangerous goods sign of rhombus are one of the names of the nine major categories of dangerous goods, and the characters included in the second dangerous goods sign of circle are one of "flammable", "corrupt", "explosive", "hot" and "toxic". Figure 1 This is a schematic diagram of the diamond-shaped second dangerous goods sign. Figure 1 As shown, the names of the nine major categories of dangerous goods include explosives, flammable items when wet, highly toxic substances, infectious substances, flammable gases, non-flammable gases, toxic gases, oxidizers, toxic substances, corrosive substances, flammable liquids, flammable solids, self-igniting items, organic peroxides, and hazardous substances.

[0032] Generally speaking, dangerous goods signs are placed at the front and rear of dangerous goods vehicles. In addition, the front of the dangerous goods vehicle is placed with the first dangerous goods sign (rectangle and triangle), and the rear of the dangerous goods vehicle is placed with the first dangerous goods sign (rectangle) and the second dangerous goods sign. Figure 2 This is a schematic diagram of placing dangerous goods signs in the direction of the vehicle's front. Figure 2 As shown, a triangular first dangerous goods sign a1 and a rectangular first dangerous goods sign a2 are placed in the front direction of the vehicle, a1 includes the characters "danger", a2 includes the characters "dangerous goods", and c represents the license plate. Figure 3 This is a schematic diagram of placing a dangerous goods sign at the rear of the vehicle. Figure 3 As shown, a rectangular first hazardous goods sign a2, a diamond second hazardous goods sign b1 and a circular second hazardous goods sign b2 are placed in the rear direction of the vehicle, a2 includes the characters "hazardous goods", b1 includes the characters "flammable liquids" and b2 includes the characters "hot", and c represents the license plate.

[0033] In other cases, the above-listed contents, such as the location, quantity, shape, and characters of the dangerous goods signs placed on the dangerous goods vehicles, can be changed according to actual needs. Therefore, the above-listed contents do not limit the present application. The following text of this application is explained in general terms.

[0034] Figure 4 1 is a flow chart of an embodiment of the method for identifying dangerous goods vehicles of the present application. It should be noted that if there are substantially the same results, this embodiment does not necessarily use Figure 4 The process sequence shown is limited. Figure 4 As shown, this embodiment may include:

[0035] S11: Obtain the image to be processed of the target vehicle.

[0036] A camera can be used to acquire a scene image of a target vehicle; a vehicle detection model can be used to detect the scene image to obtain the vehicle position in the scene image; the area corresponding to the vehicle position in the scene image can be cut out as an image to be processed, or the area corresponding to the vehicle position in the scene image can be marked, and the marked scene image can be used as the image to be processed, and subsequent processing is performed based on the marked area.

[0037] The vehicle detection model may be a YOLO series, SSD, etc. Generally speaking, the dangerous goods signs are set at the front and rear of the dangerous goods vehicle, so the scene image is obtained by using a camera from the front direction or rear direction of the target vehicle.

[0038] S12: Determine the vehicle direction of the target vehicle according to the image to be processed.

[0039] The vehicle direction includes the front direction and the rear direction. If the scene image is acquired from the perspective of the front direction, the vehicle direction of the target vehicle is the front direction. If the scene image is acquired from the perspective of the rear direction, the vehicle direction of the target vehicle is the rear direction.

[0040] The viewing angle (monitoring viewing angle) of the camera to obtain the scene image may be known or unknown. For example, in the electric police scene, the known monitoring viewing angle of the camera is the viewing angle in the direction of the rear of the vehicle; in the checkpoint scene, the known monitoring viewing angle of the camera is the viewing angle in the direction of the front of the vehicle. In the known case, a mapping table between the camera identification information and the vehicle direction is pre-stored.

[0041] Therefore, in the case of unknown, the trained vehicle direction classification model can be used to classify the image to be processed to determine the vehicle direction of the target vehicle. The vehicle direction classification model can be Alexnet, Vggnet, Resnet, etc. In the case of known, the vehicle direction corresponding to the camera identification information can be found in the mapping table as the vehicle direction of the target vehicle.

[0042] S13: Performing dangerous goods sign detection on the image to be processed using a dangerous goods sign detection model corresponding to the vehicle direction to obtain a detection result.

[0043] Different vehicle directions correspond to different hazardous goods sign detection models.

[0044] The hazardous goods sign detection model corresponding to the front direction of the vehicle can be obtained by training using training samples containing images of the front direction of the vehicle, and the hazardous goods sign detection model corresponding to the rear direction of the vehicle can be obtained by training using training samples containing images of the rear direction of the vehicle.

[0045] As an embodiment, a hazardous goods sign detection model may be used to extract a feature map of a single scale of the image to be processed, and the hazardous goods sign detection model may be used to obtain a detection result based on the feature map of a single scale.

[0046] Considering that some hazardous goods signs (such as triangular and rectangular second hazardous goods signs) are small in size and account for a small proportion of the image to be processed, they are not easy to be detected. Therefore, in order to improve the detection accuracy of hazardous goods signs, as another embodiment, a hazardous goods sign detection model can be used to extract several feature maps of different sizes of the image to be processed; the hazardous goods sign detection model is used to fuse several feature maps of different sizes to obtain a fused feature map; and the hazardous goods sign detection model is used to obtain the detection result based on the fused feature map. In this way, the hazardous goods sign detection model can be VGG, ResNet, etc.

[0047] Combination Figure 5 For example, Figure 5 This is a schematic diagram of the structure of the dangerous goods sign detection model. The image to be processed is sent to the dangerous goods sign detection model, and the dangerous goods sign detection model performs the following processing:

[0048] 1) Four feature maps FC1, FC2, FC3 and FC4 of gradually decreasing sizes are extracted in sequence, where the feature map of the latter size is extracted based on the feature map of the previous size.

[0049] 2) After using the pooling layer (Unpool) to enlarge FC4 by 2 times, it is concatenated (concat) with FC3, and the concatenation result is processed using the convolution layer (Conv) with convolution kernels of 1×1 and 3×3 in sequence to obtain the feature map C1.

[0050] 3) Use similar steps to obtain C2 and C3, and use the convolution layer to process C3 to obtain a fused feature map.

[0051] 4) Use the detection layer to process the fused feature map to obtain the detection result.

[0052] S14: Determine whether the target vehicle is a dangerous goods vehicle based on the detection result.

[0053] It is understandable that the vehicle characteristics vary greatly under different vehicle direction perspectives. If the same hazardous goods sign detection model is used for different vehicle directions, the detection accuracy and recall rate will decrease due to the need to be compatible with the vehicle characteristics under different vehicle direction perspectives.

[0054] Through the implementation of this embodiment, after obtaining the image to be processed, the application determines the vehicle direction of the target vehicle in the image to be processed, and selects different dangerous goods sign detection models according to different vehicle directions to perform dangerous goods sign detection on the image to be processed to determine whether the target vehicle is a dangerous goods vehicle. Therefore, the same dangerous goods sign detection model does not need to be compatible with vehicle features under multiple vehicle directions, which can improve the detection accuracy and recall rate of dangerous goods signs, and further improve the accuracy of the determination result of whether the target vehicle is a dangerous goods vehicle.

[0055] Figure 6 FIG. 1 is a flow chart of another embodiment of the method for identifying dangerous goods vehicles of the present application. It should be noted that if there is substantially the same result, this embodiment is not used. Figure 6 In this embodiment, S21 is a further extension of S13, and S22 is a further extension of S14. Figure 6 As shown, this embodiment may include:

[0056] S21: Detect the hazardous goods sign on the image to be processed using the hazardous goods sign detection model to obtain the hazardous goods sign on the target vehicle and its first confidence level.

[0057] In the detection result of the dangerous goods sign, the dangerous goods sign includes the first dangerous goods sign and / or the second dangerous goods sign. The information of the dangerous goods sign may include the position of the dangerous goods sign and may also include the category of the dangerous goods sign. The position of the dangerous goods sign is expressed as a detection frame.

[0058] As an embodiment, no matter the vehicle direction of the target vehicle is the front direction or the rear direction, the detection object of the hazardous goods sign is the image to be processed itself.

[0059] As another embodiment, if the vehicle direction of the target vehicle is the rear direction, the detection object is the image to be processed itself. Considering that the image to be processed obtained from the perspective of the front direction includes the window area, and the hazardous goods sign is placed outside the window area, the items placed in the window area may interfere with the detection. Therefore, if the vehicle direction of the target vehicle is the front direction, the area to be detected in the image to be processed can be determined based on the window, and the area to be detected can be used as the detection object of the hazardous goods sign. However, if the window area is not detected due to the accuracy of the window detection, the image to be processed itself is still used as the detection object of the hazardous goods sign.

[0060] S22: Based on the first confidence level, determine whether the target vehicle is a dangerous goods vehicle.

[0061] The number of dangerous goods signs detected may be one or more. Whether the target vehicle is a dangerous goods vehicle can be determined based only on the first confidence level. If there is only one dangerous goods sign, determine whether the first confidence level is greater than the confidence threshold. If the first confidence level is greater than the threshold, determine that the target vehicle is a dangerous goods vehicle, otherwise determine that the target vehicle is not a dangerous goods vehicle. If there are multiple dangerous goods signs, calculate the average of the first confidence levels of the multiple dangerous goods signs (the first average confidence level, the calculation method is referred to in the following embodiments); determine whether the first average confidence level is greater than the confidence threshold. If it is greater than, determine that the target vehicle is a dangerous goods vehicle, otherwise determine that the target vehicle is not a dangerous goods vehicle.

[0062] Alternatively, it is possible to determine whether the target vehicle is a dangerous goods vehicle based on the first confidence level and the second confidence level (for related descriptions, refer to the following embodiments). This method is described in the following embodiments.

[0063] Figure 7 FIG. 1 is a flow chart of another embodiment of the method for identifying dangerous goods vehicles of the present application. It should be noted that if there are substantially the same results, this embodiment is not used. Figure 7 The process sequence shown is limited. This embodiment is a further extension of S21. The vehicle direction of the target vehicle is the vehicle head direction, and the detection object of the dangerous goods sign is the area to be detected. Figure 7 As shown, this embodiment may include:

[0064] S31: Determine the vehicle window area in the image to be processed.

[0065] The vehicle window detection model can be used to perform vehicle window detection on the image to be processed to obtain the vehicle window area in the image to be processed.

[0066] S32: Determine the area to be inspected where the dangerous goods sign is placed according to the vehicle window area.

[0067] The area to be detected may be located in an upper area of ​​the vehicle window area and / or a lower area of ​​the vehicle window area as the area to be detected.

[0068] Alternatively, considering that objects are generally placed in the lower half of the vehicle window area, the area to be detected may be located in the lower area of ​​the vehicle window area and / or the area above the center line of the vehicle window area.

[0069] Figure 8 is a schematic diagram of the area to be detected in the image to be processed. Wherein d represents the window area, and e represents the center line of the window area. The area above the center line in the image to be processed is the area to be detected 1, and the area below the window area in the image to be processed is the area to be detected 2.

[0070] S33: Performing dangerous goods sign detection on the area to be detected using a dangerous goods sign detection model.

[0071] Continue to combine Figure 8 For illustration, if the rectangular second hazardous goods sign is placed in the to-be-detected area 2, then the hazardous goods sign detection is performed on the to-be-detected area 2. If the triangular second hazardous goods sign is placed in the to-be-detected area 1, then the hazardous goods sign detection is performed on the to-be-detected area 1.

[0072] Through the implementation of this embodiment, not only can false detections caused by objects in the vehicle window area be eliminated, but also the proportion of hazardous goods signs in the area to be detected can be increased, which is beneficial to improving the recall rate of hazardous goods signs in the detection results.

[0073] Fig. 9 FIG. 1 is a flow chart of another embodiment of the method for identifying dangerous goods vehicles of the present application. It should be noted that if there are substantially the same results, this embodiment is not used. Fig. 9 The process sequence shown is limited. This embodiment is a further extension of the above embodiment, S41-S42 are steps that can be included after S21, and S43-S45 are further extensions of S22. Fig. 9 As shown, this embodiment may include:

[0074] S41: Determine whether the dangerous goods sign includes a rectangular first dangerous goods sign.

[0075] If it is not included, it means that the first dangerous goods mark of the rectangle is missed, and S42-S43 are executed; if it is not included, it means that the first dangerous goods mark of the rectangle is not missed, and S45 is executed.

[0076] S42: Perform character recognition on the rectangular first hazardous goods sign to obtain a character recognition result.

[0077] The first dangerous goods sign indicates that the target vehicle is a dangerous goods vehicle.

[0078] It is understandable that the rectangular first hazardous material sign is generally placed near the license plate. Figure 10-12 In the image to be processed shown, the rectangular first dangerous goods sign a2 is placed near the license plate c. Moreover, the rectangular first dangerous goods sign is highly similar to the license plate in terms of color, shape, size, etc., so the rectangular first dangerous goods sign is easily misdetected. Therefore, in order to improve the accuracy of the detection result of the dangerous goods sign, this embodiment can determine whether the rectangular first dangerous goods sign is misdetected based on the characters contained in the rectangular first dangerous goods sign.

[0079] The rectangular first dangerous goods sign can be recognized by a character recognition model to obtain a character recognition result. The character recognition model can be a CRNN, a transformer, a seq2seq, a traditional image processing model, etc. The character recognition result is the characters included in the rectangular first dangerous goods sign.

[0080] S43: Determine whether the rectangular first hazardous goods sign is misdetected based on the character recognition result.

[0081] If the character recognition result includes characters such as "danger", "dangerous goods", etc., it means that the rectangular first dangerous goods sign is not misdetected; otherwise, it means that the rectangular first dangerous goods sign is misdetected.

[0082] If it is misdetected, execute S44; otherwise, execute S45.

[0083] S44: Determine whether the target vehicle is a dangerous goods vehicle based on the first confidence level of the dangerous goods signs that are not misdetected.

[0084] S45: Determine whether the target vehicle is a dangerous goods vehicle based on the first confidence levels of all dangerous goods signs.

[0085] Wherein, in the case where the rectangular first hazardous goods sign is not included, this step is to determine whether the target vehicle is a hazardous goods vehicle based only on the first confidence of all hazardous goods signs. In the case where the rectangular first hazardous goods sign is included and the rectangular first hazardous goods sign is not misdetected, it is possible to determine whether the target vehicle is a hazardous goods vehicle based only on the first confidence of all hazardous goods signs. It is also possible to determine whether the target vehicle is a hazardous goods vehicle based on the first confidence of all hazardous goods signs and the second confidence of the rectangular first hazardous goods sign.

[0086] In addition, in order to avoid the rectangular first hazardous goods sign being misdetected because it is close to the license plate, during the training phase, some similar training samples can be generated by manual, PS, GAN, etc. to train the hazardous goods sign model to reduce the possibility of the first hazardous goods sign being misdetected.

[0087] On the basis that the dangerous goods sign includes a rectangular first dangerous goods sign and the rectangular first dangerous goods sign is not misdetected, if it is determined whether the target vehicle is a dangerous goods vehicle based on the first confidence level and the second confidence level, the above embodiment can be further expanded as follows: Fig.13 FIG. 1 is a flow chart of another embodiment of the method for identifying dangerous goods vehicles of the present application. It should be noted that if there is substantially the same result, this embodiment is not used. Fig.13 In this embodiment, S51 is a step that can be included before S45, and S52-S55 are further expansions of S45. Fig.13 As shown, this embodiment may include:

[0088] S51: Obtain a second confidence level of each character in the character recognition result.

[0089] S52: Calculate a first average confidence based on the first confidences of all dangerous goods signs, and calculate a second average confidence based on the second confidences of all characters of the rectangular first dangerous goods sign.

[0090] The first average confidence can be calculated as follows:

[0091]

[0092] Among them, P 1 represents the first average confidence, n represents the number of dangerous goods signs detected, and p i Indicates the first confidence level of the i-th detected hazardous material sign.

[0093] The second average confidence can be calculated as follows:

[0094]

[0095] Among them, R 1 represents the second average confidence, m represents the number of characters in the character recognition result, r j Indicates the second confidence of the j-th character detected.

[0096] S53: Calculate a weighted result of the first average confidence and the second average confidence.

[0097] The weighted result can be expressed as:

[0098] T=W 1 P 1 +W 2 R 1 ;

[0099] Among them, T represents the weighted result, w 1 and w 2 Represent the weight of the first average confidence and the weight of the second average confidence respectively.

[0100] S54: Determine whether the weighted result is greater than a confidence threshold.

[0101] Set the confidence threshold to T 1 , we can determine whether T>T 1 .

[0102] If the weighted result is greater than the confidence threshold, execute S55; otherwise, execute S56.

[0103] S55: Determine that the target vehicle is a dangerous goods vehicle.

[0104] S56: Determine that the target vehicle is not a dangerous goods vehicle.

[0105] In addition, when it is determined that the target vehicle is a dangerous goods vehicle, the above embodiment can be further expanded as follows:

[0106] Fig.14 FIG. 1 is a flow chart of another embodiment of the method for identifying dangerous goods vehicles of the present application. It should be noted that if there are substantially the same results, this embodiment is not used. Fig.14 The process sequence shown is limited. In this embodiment, the target vehicle direction is the rear direction of the vehicle. Fig.14 As shown, this embodiment may include:

[0107] S61: Determine whether the dangerous goods sign includes a second dangerous goods sign.

[0108] The second dangerous goods mark indicates the category of dangerous goods to which the cargo loaded on the target vehicle belongs.

[0109] If the second dangerous goods sign is included, S62 is executed; if the second dangerous goods sign is not included, the current dangerous goods vehicle identification is terminated.

[0110] S62: Classify the second dangerous goods sign to obtain the dangerous goods category to which the cargo loaded on the target vehicle belongs.

[0111] The model for classifying the second dangerous goods sign can be Alexnet, Vggnet, Resnet, etc.

[0112] Different hazardous goods sign classification models may be selected based on the shape of the second hazardous goods sign. For example, if the shape of the second hazardous goods sign includes a diamond-shaped second hazardous goods sign, the diamond-shaped second hazardous goods sign is sent to the diamond-shaped hazardous goods sign classification model to obtain the hazardous goods category to which it belongs.

[0113] If the second hazardous goods sign includes a circular second hazardous goods sign, the circular second hazardous goods sign is sent to the circular hazardous goods sign classification model to obtain the hazardous goods category to which it belongs.

[0114] After executing this step, the dangerous goods vehicle identification is completed.

[0115] Through the implementation of this embodiment, the dangerous goods category to which the goods loaded on the target vehicle belong can be determined when the second dangerous goods mark is included, which facilitates the management and control of relevant departments.

[0116] In addition, considering that the types of vehicles that can carry dangerous goods (hereinafter referred to as suspected dangerous goods vehicles in this application) are known. For example, suspected dangerous goods vehicles include tankers, trucks, etc. Therefore, in order to further improve the accuracy of dangerous goods sign detection, it is also possible to determine whether the target vehicle is a suspected dangerous goods vehicle before S13, and only execute S13 when it is determined that the target vehicle is a suspected dangerous goods vehicle.

[0117] Among them, the vehicle type classification model can be used to identify the image to be processed to determine the vehicle type of the target vehicle, and determine whether the target vehicle is a suspected dangerous goods vehicle based on the vehicle type. Among them, the vehicle type classification models corresponding to different vehicle directions can be the same or different. Since the vehicle characteristics of the front and rear of the vehicle are very different, the determination result is more accurate in different situations. In different situations, the above embodiment can be further expanded to obtain the following embodiments:

[0118] Fig.15 FIG. 1 is a flow chart of another embodiment of the method for identifying dangerous goods vehicles of the present application. It should be noted that if there is substantially the same result, this embodiment is not used. Fig.15 The process sequence shown is limited. This embodiment is a further extension of the above embodiment, S71-S72 are steps that can be included before S13, and S73 is a further extension of S13. Fig.15 As shown, this embodiment may include:

[0119] S71: Using the vehicle type classification model corresponding to the vehicle direction to identify the image to be processed, and obtain the vehicle type of the target vehicle.

[0120] Different vehicle directions correspond to different vehicle type classification models.

[0121] The target vehicle direction includes the front direction and the rear direction. The vehicle type classification model corresponding to the front direction is obtained by training with training samples including the front image, and the vehicle type classification model corresponding to the rear direction is obtained by training with training samples including the rear image.

[0122] Vehicle types may include tank trucks, trucks, cars, buses, non-motor vehicles, etc. The vehicle type classification model may be Alexnet, Vggnet, Resnet, etc. It is understandable that the detection accuracy will be improved due to the use of different vehicle type classification models under different vehicle directions without the need to be compatible with vehicle features under different vehicle perspectives.

[0123] S72: Determine whether the target vehicle is a suspected dangerous goods vehicle based on the vehicle type.

[0124] For example, if the vehicle type is a tanker truck or a truck, the target vehicle is a suspected dangerous goods vehicle; if the vehicle type is a car, a bus, or a non-motor vehicle, the target vehicle is not a suspected dangerous goods vehicle.

[0125] S73: Using the dangerous goods sign detection model, perform dangerous goods sign detection on the image to be processed that is determined to be a suspected dangerous goods vehicle.

[0126] Fig.16 Schematic diagram of the structure of an embodiment of the electronic device of the present application. Fig.16 As shown, the electronic device includes a processor 21 and a memory 22 coupled to the processor 21 .

[0127] The memory 22 stores program instructions for implementing the method of any of the above embodiments; the processor 21 is used to execute the program instructions stored in the memory 22 to implement the steps of the above method embodiments. The processor 21 may also be referred to as a CPU (Central Processing Unit). The processor 21 may be an integrated circuit chip with signal processing capabilities. The processor 21 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0128] Fig.17 Schematic diagram of the structure of an embodiment of a computer-readable storage medium of the present application. Fig.17 As shown, the computer-readable storage medium 30 of the embodiment of the present application stores program instructions 31, and the program instructions 31 are executed to implement the method provided in the above embodiment of the present application. Among them, the program instructions 31 can form a program file and be stored in the above computer-readable storage medium 30 in the form of a software product, so that a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) executes all or part of the steps of each implementation method of the present application. The aforementioned computer-readable storage medium 30 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, and a tablet.

[0129] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0130] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. The above is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present application.

Claims

1. A method for identifying dangerous goods vehicles, characterized in that: include: Acquire the image to be processed of the target vehicle; Determining the vehicle direction of the target vehicle according to the image to be processed; Performing dangerous goods sign detection on the image to be processed using a dangerous goods sign detection model corresponding to the vehicle direction to obtain a detection result, wherein different dangerous goods sign detection models correspond to different vehicle directions; Determining whether the target vehicle is a dangerous goods vehicle based on the detection result; Wherein, the detecting of the image to be processed by using the dangerous goods sign detection model corresponding to the vehicle direction to obtain the detection result includes: Using the hazardous goods sign detection model to perform hazardous goods sign detection on the image to be processed, and obtaining the hazardous goods sign contained on the target vehicle and its first confidence level; The method further includes: if the hazardous goods sign includes a rectangular first hazardous goods sign, performing character recognition on the rectangular first hazardous goods sign to obtain a character recognition result, wherein the first hazardous goods sign indicates that the target vehicle is a hazardous goods vehicle; and determining whether the rectangular first hazardous goods sign is misdetected based on the character recognition result; Determining whether the target vehicle is a dangerous goods vehicle based on the detection result includes: If it is misdetected, determining whether the target vehicle is a hazardous goods vehicle based on the first confidence level of the hazardous goods sign that is not misdetected; If there is no false detection, whether the target vehicle is a dangerous goods vehicle is determined based on the first confidence levels of all the dangerous goods signs.

2. The method according to claim 1, characterized in that The vehicle direction includes the front direction and the rear direction. The hazardous goods sign detection model corresponding to the front direction is obtained by training using training samples containing front images, and the hazardous goods sign detection model corresponding to the rear direction is obtained by training using training samples containing rear images.

3. The method according to claim 1, characterized in that The target vehicle direction is the vehicle head direction, and the detecting of the image to be processed by using the hazardous goods sign detection model includes: Determine a vehicle window area in the image to be processed; Determine the area to be detected where the dangerous goods sign is placed according to the vehicle window area; The hazardous goods sign detection model is used to perform hazardous goods sign detection on the area to be detected.

4. The method according to claim 3, characterized in that: The area to be detected is located in an area below the vehicle window area and / or an area above a center line of the vehicle window area.

5. The method according to claim 1, characterized in that The method further comprises: If the character recognition result indicates that the rectangular first hazardous goods sign is not misdetected, obtaining a second confidence level for each character in the character recognition result; The step of determining whether the target vehicle is a dangerous goods vehicle based on the first confidence levels of all the dangerous goods signs comprises: Calculating a first average confidence based on the first confidences of all the dangerous goods signs, and calculating a second average confidence based on the second confidences of all the characters of the rectangular first dangerous goods sign; Calculating a weighted result of the first average confidence and the second average confidence; If the weighted result is greater than the confidence threshold, the target vehicle is determined to be a dangerous goods vehicle.

6. The method according to claim 1, characterized in that The target vehicle direction is the rear direction of the vehicle, and the method further comprises: If the target vehicle is a hazardous goods vehicle, determining whether the hazardous goods sign of the target vehicle includes a second hazardous goods sign, the second hazardous goods sign indicating the category of hazardous goods to which the cargo loaded on the target vehicle belongs; If the second dangerous goods sign is included, the second dangerous goods sign is classified to obtain the dangerous goods category to which the goods loaded on the target vehicle belong.

7. The method according to claim 1, characterized in that The step of performing hazardous goods sign detection on the image to be processed by using the hazardous goods sign detection model corresponding to the vehicle direction to obtain a detection result includes: Extracting a plurality of feature maps of different sizes of the image to be processed by using the dangerous goods sign detection model; Using the dangerous goods sign detection model to fuse the feature maps of different sizes, to obtain a fused feature map; The detection result is obtained based on the fusion feature map using the dangerous goods sign detection model.

8. The method according to claim 1, characterized in that Before performing hazardous goods sign detection on the image to be processed using the hazardous goods sign detection model corresponding to the vehicle direction, the method further includes: Using the vehicle type classification model corresponding to the vehicle direction to identify the image to be processed, to obtain the vehicle type of the target vehicle, wherein different vehicle directions correspond to different vehicle type classification models; Determining whether the target vehicle is a suspected dangerous goods vehicle according to the vehicle type; The performing dangerous goods sign detection on the image to be processed by using the dangerous goods sign detection model corresponding to the vehicle direction comprises: The hazardous goods sign detection model is used to perform hazardous goods sign detection on the image to be processed that is determined to be the suspected hazardous goods vehicle.

9. The method according to claim 8, characterized in that The target vehicle direction includes the front direction and the rear direction. The vehicle type classification model corresponding to the front direction is obtained by training using training samples containing front images, and the vehicle type classification model corresponding to the rear direction is obtained by training using training samples containing rear images.

10. An electronic device, characterized in that: The invention comprises a processor and a memory connected to the processor, wherein: The memory stores program instructions; The processor is configured to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that: The storage medium stores program instructions, and when the program instructions are executed, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Identification and pre-warning method of hazardous article conveying vehicle appearing in front of coach bus

    CN104732245A

  • Image processing method, device and equipment

    CN109977937A

  • Vehicle certification verification method and device, computer equipment and storage medium

    CN111144358A

  • Dangerous goods vehicle detection and identification method based on deep learning

    CN111860690A

  • Method and system for detecting defects and hazardous conditions in passing rail vehicles

    EP1600351A1