Truck detection method, device, electronic device and computer readable storage medium
By obtaining the 3D point cloud and using feature extraction and detection head networks, the truck's front and body detection frames are obtained, which solves the problem of inaccurate detection of the truck's front and body separation in the existing technology, and achieves accurate prediction and detection of the truck's driving direction. Improvements in road safety.
Patent Information
- Application Number
- CN202210516009.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-05-12
AI Technical Summary
In the existing technology, it is difficult to accurately obtain the separation situation of the truck's front and body by using the overall prediction frame, resulting in the inability to accurately obtain its driving direction, which poses safety risks.
By obtaining the 3D point cloud, extract the two-dimensional feature map based on the feature extraction network, use the detection head network to detect the 3D prediction frame and classification confidence, obtain the truck detection frame, the front detection frame and the body detection frame, and predict the front and The state of separation between the bodies.
It improves the accuracy of truck detection, can accurately predict the truck's turning status and driving trajectory, reduces the risk of collision between pedestrians and the front of the vehicle, and enhances road safety.
Smart Images

Figure CN114926651B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of target detection technology, and in particular, to a truck detection method, device, electronic device, and computer-readable storage medium. Background Art
[0002] With the development of computer technology and the widespread application of computer vision principles, the research on real-time tracking of targets using computer image processing technology is becoming more and more popular. Dynamic real-time tracking and positioning of targets has broad application value in intelligent transportation systems, intelligent monitoring systems, military target detection, and surgical instrument positioning in medical navigation surgery.
[0003] In intelligent transportation systems, especially for the currently popular autonomous driving technology, three-dimensional (3D) target detection has become an indispensable task and has received widespread attention from the industry and academia. However, in related technologies, vehicle target detection pays more attention to the detection accuracy of the target vehicle as a whole, and usually only outputs an overall prediction frame for the vehicle as a whole. However, for trucks, especially heavy trucks and other large vehicles, the front and body of the truck will be separated when turning, and the overall prediction frame cannot accurately obtain the separation of the front and body of the truck, so it is impossible to accurately know its driving direction, etc., which may cause safety hazards. Summary of the invention
[0004] In view of the above problems, the embodiments of the present application provide a truck detection method, device, electronic device and computer-readable storage medium to solve the safety hazard problem caused by the use of an overall prediction frame in the related technology, which cannot accurately obtain the separation of the front and body of the truck and cannot accurately know its driving direction.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a truck detection method, the method comprising:
[0007] Get the 3D point cloud of the task to be predicted;
[0008] Extracting a two-dimensional feature map of the 3D point cloud based on a feature extraction network;
[0009] Detecting a 3D prediction box and a corresponding classification confidence of the two-dimensional feature map based on a detection head network;
[0010] Based on the 3D prediction frame and the corresponding classification confidence, a whole vehicle detection frame of the truck class, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame are obtained; and based on the whole vehicle detection frame of the truck class, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame, a separation state between the front and body of the corresponding truck is predicted.
[0011] In one implementation, obtaining a 3D point cloud of the task to be predicted includes: obtaining a 3D point cloud of the task to be predicted detected by a laser radar.
[0012] In one embodiment, the feature extraction network is a network based on a single-stage detection SSD algorithm.
[0013] In one embodiment, after detecting the 3D prediction frame and the corresponding classification confidence of the two-dimensional feature map in the detection head network; and before obtaining the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class based on the 3D prediction frame and the corresponding classification confidence, it also includes:
[0014] Determine whether there is a repeated 3D prediction frame in the 3D prediction frame;
[0015] If there is no duplicate 3D prediction frame, the step of obtaining the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class based on the 3D prediction frame and the corresponding classification confidence is performed.
[0016] In one implementation, if there are repeated 3D prediction frames, the method further includes:
[0017] Use non-maximum suppression algorithm to remove duplicate 3D prediction boxes;
[0018] Based on the 3D prediction frame and the corresponding classification confidence, a whole vehicle detection frame, a front detection frame and a corresponding body detection frame of a truck are obtained, including:
[0019] Based on the eliminated 3D prediction frames and the corresponding classification confidences, the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class are obtained.
[0020] In one implementation, if the task to be predicted carries truck-type and non-truck-type objects, the step of obtaining a whole vehicle detection frame of a truck-type based on the 3D prediction frame and the corresponding classification confidence, a front detection frame and a body detection frame matching the whole vehicle detection frame, includes:
[0021] Based on the 3D prediction frame and the corresponding classification confidence, a whole vehicle detection frame of a truck, a front detection frame and a body detection frame matching the whole vehicle detection frame, and a whole vehicle detection frame, a front detection frame and a body detection frame of a non-truck class are respectively obtained;
[0022] Eliminate the non-truck vehicle head detection frame and the vehicle body detection frame to obtain a truck vehicle detection frame, a vehicle head detection frame and a vehicle body detection frame that match the vehicle detection frame, and a non-truck vehicle detection frame;
[0023] The method further includes: detecting the position status between the truck and the non-truck based on a whole vehicle detection frame of the truck type, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame, and a whole vehicle detection frame of the non-truck type.
[0024] In one embodiment, after obtaining a whole vehicle detection frame of a truck, a front detection frame and a body detection frame matching the whole vehicle detection frame, and an overall detection frame of a non-truck, the following further comprises:
[0025] A first annotation is performed on a whole vehicle detection frame of a truck type, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame; and a second annotation is performed on a whole vehicle detection frame of a non-truck type.
[0026] In a second aspect, an embodiment of the present application further provides a truck detection device, comprising:
[0027] An acquisition module, which is configured to acquire a 3D point cloud of a task to be predicted;
[0028] An extraction module, configured to extract a two-dimensional feature map of the 3D point cloud based on a feature extraction network;
[0029] A detection module, which is configured to detect a 3D prediction box and a corresponding classification confidence of the two-dimensional feature map based on a detection head network;
[0030] The acquisition module is further configured to acquire a whole vehicle detection frame of a truck class, a front detection frame and a body detection frame matching the whole vehicle detection frame based on the 3D prediction frame and the corresponding classification confidence; and
[0031] A prediction module is configured to predict the separation state between the front and body of the corresponding truck based on a whole vehicle detection frame of the truck class, a front detection frame and a body detection frame matching the whole vehicle detection frame.
[0032] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor and a memory;
[0033] The memory stores computer-executable instructions;
[0034] The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the truck detection method.
[0035] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement the truck detection method when executed by a processor.
[0036] According to the truck detection method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application, a whole vehicle detection frame of a truck, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame are obtained by utilizing a feature extraction network and a detection head network, and the separation state between the front vehicle and the body of the corresponding truck is predicted based on the whole vehicle detection frame of the truck, the front vehicle detection frame and the body detection frame matching the whole vehicle detection frame, so as to accurately know the driving direction of the truck, thereby achieving the technical effect of improving the accuracy of truck detection and ensuring road safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of a detection frame of a truck in the related art;
[0038] Figure 2a This is one of the detection frame schematic diagrams of a truck in an embodiment of the present application;
[0039] Figure 2b This is the second schematic diagram of the detection frame of the truck in the embodiment of the present application;
[0040] Figure 3 A possible scenario diagram of an embodiment of the present application;
[0041] Figure 4a One of the flowcharts of a truck detection method provided in an embodiment of the present application;
[0042] Figure 4b A second flowchart of a truck detection method provided in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of a feature detection network in an embodiment of the present application;
[0044] Figure 6 A schematic diagram of a flow chart of another truck detection method provided in an embodiment of the present application;
[0045] Figure 7 A flowchart of another truck detection method provided in an embodiment of the present application;
[0046] Figure 8 A schematic diagram of the structure of a truck detection device provided in an embodiment of the present application;
[0047] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In autonomous driving, 3D object detection is an essential task and has received extensive attention from the industry and academia. Related technologies have adopted a variety of solutions to improve the overall detection accuracy of target vehicles. For example, in a single-stage detector, VoxelNet technology is used to voxelize point clouds, and a voxel feature encoding layer is proposed to extract point features in each voxel and generate fixed-length features for batch training; PointPillar technology uses pseudo images to achieve 3D target detection, which divides the point cloud into multiple pillars instead of voxels for feature extraction, and then uses a 2D convolution detection structure for target detection; SECOND technology uses sparse convolution to replace traditional 3D convolution; TANet (Triple Attention Net, attention mechanism network applied to target detection technology) proposes a triple attention module embedded in voxel feature extraction and combines it with the proposed cascade refinement network; Recently, Point-GNN (Point-Graph Neural Network, graph neural network for 3D target detection in point clouds) proposed a graph neural network to extract point features and achieved good performance; 3DSSD (3D Single Shot MultiBox Detector (3D single-stage detection) proposed a fusion sampling strategy to achieve better classification performance by combining feature-based and point-based farthest point sampling; and SA-SSD (StructureAware-SSD) proposed an auxiliary network in parallel with the sparse convolutional network to regress the box center and semantic class of each point using interpolated voxel features. However, the above technologies for 3D object detection methods do not consider the content of separate detection of different parts of the same object.
[0049] For trucks, especially heavy trucks, there is a huge deviation between the front and the body when turning, such as Figure 1 As shown in the figure, if only one labeled real box (the dotted box in the figure) is used to represent the current turning truck, the following problems will arise: it is impossible to know that the front and body of the truck have been separated, which will accurately know the current driving direction and is not conducive to the prediction of the driving trajectory; it is unsafe, that is, the pedestrian may be very close to the front of the truck, but far away from the labeled real box, and at this time the pedestrian is likely to collide with the front of the truck; in addition, the network prediction is unstable, that is, multiple truck heads with different directions may be represented by the same labeled real box, causing ambiguity during training.
[0050] In view of this, the embodiments of the present application provide a truck detection method, device, electronic device and computer-readable storage medium, which further obtains a whole vehicle detection frame of a truck class, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame based on the 3D prediction frame and the corresponding classification confidence of the detected two-dimensional feature map, and predicts the separation state between the front vehicle and the body of the corresponding truck based on the whole vehicle detection frame of the truck class, the front vehicle detection frame and the body detection frame matching the whole vehicle detection frame, such as Figure 2a and Figure 2b As shown, there are two schematic diagrams of the front and body of the truck in an unseparated state and a separated state. Compared with the related art, when detecting a truck, by detecting its front and body, the separation state between the front and body of the truck can be effectively predicted, so as to further accurately predict the turning state of the truck, and facilitate the prediction of its driving trajectory. In addition, by detecting the separation state between the front and body of the truck, the position state between non-truck objects and the truck can be more accurately predicted. For example, when a pedestrian is at the front position of the truck, he is closer to the marked real frame, and it can be effectively predicted whether the pedestrian is about to collide with the front of the truck. In addition, for trucks with multiple different orientations, when the network prediction is unstable, since the front and body of the truck are different prediction frames, the ambiguity during training is effectively reduced.
[0051] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below in conjunction with the drawings in the embodiments of the present application. In the drawings, the same or similar reference numerals throughout represent the same or similar parts or parts with the same or similar functions. The described embodiments are part of the embodiments of the present application, not all of the embodiments. The embodiments described below with reference to the drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0052] Figure 3 A possible scenario diagram provided for an embodiment of the present application is as follows: Figure 3As shown, it includes a terminal device 310, a server 320 and a laser radar (not shown). In some embodiments, the terminal 310 is used to provide the server 320 with a trained target detection model, for example, the target detection model includes a backbone network and a detection head network, the laser radar is used to provide the server 320 with the collected 3D point cloud data information of the task area to be predicted, and the server 320 is used to predict the task to be predicted based on the data provided by the terminal 310 and the laser radar. Optionally, in the process of predicting the task to be predicted, the server 320 undertakes the main computing work and the terminal 310 undertakes the secondary computing work; or, the server 320 undertakes the secondary computing work and the terminal 310 undertakes the main computing work; or, the server 320 or the terminal 310 can respectively undertake the computing work separately.
[0053] Among them, the terminal device 310 may include but is not limited to computers, smart phones, tablet computers, e-book readers, Moving Picture experts group audio layer III (MP3) players, Moving Picture experts group audiolayer IV (MP4) players, portable computers, car computers, wearable devices, desktop computers, set-top boxes, smart TVs, etc.
[0054] Server 320 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0055] Optionally, the number of the above-mentioned terminals 310 or servers 320 can be more or less, and the embodiments of the present application do not limit this. In some embodiments, the above-mentioned terminals 310 and servers 320 can also serve as nodes in the blockchain system to synchronize the prediction results to other nodes of the blockchain to achieve wide application of the prediction results.
[0056] The above is a brief description of the scenario diagram of this application. Figure 3 The server 320 in the example is taken as an example to explain in detail the truck detection method provided in the embodiment of the present application.
[0057] Please refer to Figure 4a Figure 4b , Figure 4aOne of the flowchart diagrams of a truck detection method provided in an embodiment of the present application, the method includes steps S401-S405.
[0058] It can be understood that the truck in this embodiment generally refers to a vehicle whose body can be separated, wherein the body separation means that the front of the vehicle and the body are flexibly connected.
[0059] Step S401: Obtain the 3D point cloud of the task to be predicted.
[0060] The task to be predicted may be a task to be predicted in a certain area to be predicted, and the area to be predicted may include road scenes, trucks, flying trucks, pedestrians, etc., wherein the task to be predicted is a truck in the area.
[0061] Specifically, this embodiment uses a laser radar to detect the 3D point cloud of the task to be predicted, and obtains the 3D point cloud of the task to be predicted detected by the laser radar based on the communication interface between the two.
[0062] LiDAR is a radar system that emits laser beams to detect the position, speed and other characteristic quantities of a target. Its working principle is to emit a detection signal (laser beam) to the target, and then compare the received signal reflected from the target (target echo) with the transmitted signal. After appropriate processing, relevant information about the target can be obtained, such as target distance, direction, height, speed, attitude, and even shape parameters, so as to detect, track and identify targets such as aircraft and vehicles. The data obtained by scanning by the LiDAR is the LiDAR point cloud data, and the 3D point cloud data collected in this embodiment is obtained by the LiDAR.
[0063] Step S402: extracting a two-dimensional feature map of the 3D point cloud based on a feature extraction network.
[0064] In some embodiments, in combination Figure 5As shown, the 3D point cloud is first voxelized so that the voxelized point cloud data will be stored in memory in an orderly manner, which is beneficial to reduce random memory access and increase data operation efficiency. The voxelized 3D point cloud is sent to the feature extraction network (i.e., the backbone network) for feature extraction to obtain a two-dimensional feature map. Specifically, the feature extraction network can use a sparse convolutional network to extract features from sparse voxels. The sparse convolutional network can be composed of 4 modules, and the 4 modules are composed of a {2,2,3,3} sub-stream sparse convolutional layer and a sparse convolutional layer. The sparse convolutional layer is used as the last layer of each module to downsample the 3D feature map by 2 times. Finally, the sparse voxel features are superimposed on the z-axis (i.e., bird's-eye view projection) to obtain a two-dimensional (2D) feature map. Furthermore, the 2D feature map can be first input into a set of 2D convolutions, which has 5 convolution layers, and then a stride = 2 convolution is used to double its feature channels, and after the length and width are reduced by half, it is input into a set of 2D convolutions, which also contains 5 convolution layers. Finally, the feature maps obtained by the two sets of convolution layers are connected to output the final 2D feature map for the detection head network.
[0065] In one implementation, in order to improve detection efficiency, this embodiment adopts a (SingleShot MultiBox Detector, single-stage detection) SSD algorithm in a feature extraction network, and the feature extraction network is a network based on the single-stage detection SSD algorithm.
[0066] The SSD algorithm is a one-stage object detection algorithm. It does not require the region proposal stage and can directly generate the category probability and position coordinate value of the object. The final detection result can be obtained directly after a single detection. It has the characteristics of fast detection speed and high efficiency.
[0067] Step S403: Detect the 3D prediction box and the corresponding classification confidence of the two-dimensional feature map based on the detection head network.
[0068] It can be understood that the detection head network is a network that includes a detection head, which can be a neural network in a target detection algorithm. Specifically, the detection head in the neural network is used to predict the type and position (bounding boxes) of the target. After the 2D image is input into the detection head network, the detection head outputs the corresponding 3D prediction box and the corresponding classification confidence.
[0069] It can be understood that the classification confidence is the classification confidence level. Each 3D prediction box has its corresponding classification confidence. The higher the classification confidence, the more accurate the classification result. In this embodiment, the classification confidence can be used to classify the prediction boxes, and duplicate prediction boxes can be removed, and useless prediction boxes can be filtered out.
[0070] Step S404: based on the 3D prediction frame and the corresponding classification confidence, obtain a whole vehicle detection frame of the truck class, a front detection frame and a body detection frame that match the whole vehicle detection frame.
[0071] Step S405 , predicting the separation state between the front and body of the corresponding truck based on the whole vehicle detection frame of the truck class, the front detection frame and the body detection frame that match the whole vehicle detection frame.
[0072] Compared with the related art, this embodiment obtains a whole vehicle detection frame of a truck, a front vehicle detection frame and a body detection frame that match the whole vehicle detection frame, and predicts the separation state between the front and body of the corresponding truck based on the whole vehicle detection frame of the truck, the front vehicle detection frame and the body detection frame that match the whole vehicle detection frame. It can effectively predict the separation state between the front and body of the truck, so as to further accurately predict the turning state of the truck, facilitate the prediction of its driving trajectory, and effectively improve the road prediction safety.
[0073] Please refer to Figure 6 , Figure 6 A flow chart of another truck detection method provided in an embodiment of the present application. Based on the above embodiment, this embodiment takes into account that repeated 3D prediction frames may be output in the detection head. In order to improve the accuracy of the 3D prediction frames, this embodiment first removes the repeated 3D prediction frames, and then performs the steps of acquiring the head detection frame and the body detection frame. Specifically, after detecting the 3D prediction frame and the corresponding classification confidence of the two-dimensional feature map in the detection head network (step S403); and before acquiring the whole vehicle detection frame, the head detection frame and the corresponding body detection frame of the truck class based on the 3D prediction frame and the corresponding classification confidence (step S404), the following steps S601 and S602 are also included, and step S404 is further divided into step S404a.
[0074] Step S601, determine whether there are repeated 3D prediction boxes in the 3D prediction box. If there are no repeated 3D prediction boxes, execute step S204 to obtain the whole vehicle detection box, the front detection box and the corresponding body detection box of the truck class based on the 3D prediction box and the corresponding classification confidence. Otherwise, execute step S602.
[0075] Among them, repeated 3D prediction boxes, that is, multiple 3D prediction boxes for the same object, for example, a truck includes multiple vehicle prediction boxes.
[0076] Step S602: using a non-maximum suppression algorithm to remove duplicate 3D prediction frames;
[0077] Based on the 3D prediction frame and the corresponding classification confidence, a whole vehicle detection frame, a front detection frame and a corresponding body detection frame of the truck class are obtained (step S404), which specifically includes the following steps S404a:
[0078] Step S404a, obtaining the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class based on the eliminated 3D prediction frame and the corresponding classification confidence.
[0079] In this embodiment, non-maximum suppression (NMS) suppresses prediction boxes with low scores, involving two indicators, intersection over union (IOU), that is, the ratio of the overlapping area of two boxes to the area of the union of the two boxes, and the prediction box score. If multiple prediction boxes predict the same object, if the IOU value of the two boxes is greater than a threshold (generally 0.5 and 0.7), the NMS algorithm will discard the prediction box with a low score.
[0080] It is worth noting that since the network will eventually generate duplicate prediction frames, non-maximum suppression is a commonly used method to remove duplicate frames. However, this embodiment takes into account that the body and front frame of the truck are additional attributes of the truck's entire vehicle frame. If non-maximum suppression is directly applied, it may cause the problem that the final front and body frames cannot match, that is, the front or body frame corresponding to the same truck entire vehicle frame may be filtered out. In order to solve this problem, this embodiment only applies non-maximum suppression to the truck's entire vehicle frame, and then decodes the corresponding front and body frames from the network for the remaining truck entire vehicle frames. In other words, the 3D prediction frame of the truck in this embodiment is equivalent to the entire vehicle frame.
[0081] Please refer to Figure 7 , Figure 7 A flow chart of another truck detection method provided in an embodiment of the present application. On the basis of the above embodiment, this embodiment takes into account that the task to be detected includes truck and non-truck objects. In order to improve the detection accuracy of truck and non-truck objects, this embodiment first obtains the front detection frame and body detection frame of truck and non-truck objects, and then removes the front frame and body frame of non-truck objects. Specifically, if the task to be predicted carries truck and non-truck objects, the whole vehicle detection frame of the truck, the front detection frame and the body detection frame matching the whole vehicle detection frame are obtained based on the 3D prediction frame and the corresponding classification confidence (step S404), including steps S701 and S702, and this embodiment also includes step S703.
[0082] Step S701, based on the 3D prediction frame and the corresponding classification confidence, respectively obtain the whole vehicle detection frame of the truck class, the front detection frame and the body detection frame matching the whole vehicle detection frame, and the whole vehicle detection frame, the front detection frame and the body detection frame of the non-truck class.
[0083] Step S702: remove the non-truck vehicle head detection frame and the vehicle body detection frame to obtain the truck vehicle detection frame, the vehicle head detection frame and the vehicle body detection frame matching the vehicle detection frame, and the non-truck vehicle detection frame.
[0084] Specifically, non-truck objects may include cars, bicycles, etc., and in some embodiments, may also include pedestrians. When performing target detection, the overall prediction frame of the pedestrian is obtained to achieve target detection between pedestrians and trucks.
[0085] Step S703: Detect the position status between the truck and the non-truck based on the whole vehicle detection frame of the truck type, the front detection frame and the body detection frame matching the whole vehicle detection frame, and the whole vehicle detection frame of the non-truck type.
[0086] Compared with the related art, the detection between trucks and non-trucks is usually marked with one detection frame, and the detection of the position, distance, and status between the front of the truck and the non-truck is ambiguous. This embodiment adopts a body-separated detection frame recognition method when detecting trucks, which can more accurately locate the position status, direction, etc. between trucks and non-trucks.
[0087] Furthermore, in order to facilitate the recognition of truck and non-truck objects, the present embodiment labels truck and non-truck objects separately. Specifically, after obtaining the whole vehicle detection frame of the truck, the head detection frame and the body detection frame matching the whole vehicle detection frame, and the whole detection frame of the non-truck (step S702), the following steps are further included:
[0088] A first annotation is performed on a whole vehicle detection frame of a truck type, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame; and a second annotation is performed on a whole vehicle detection frame of a non-truck type.
[0089] In this embodiment, the first label and the second label can be labeled with different colors. For example, the detection boxes for trucks are all marked with red boxes, and the detection boxes for non-trucks are all marked with green boxes. In some embodiments, other methods can also be used to adaptively set the first label and the second label, which is not particularly limited in this embodiment.
[0090] Please refer to Figure 8 , Figure 8The schematic diagram of the structure of a truck detection device provided in an embodiment of the present application, the truck detection device comprises an acquisition module 81, an extraction module 82, a detection module 83 and a prediction module 84, wherein:
[0091] An acquisition module 81, which is configured to acquire a 3D point cloud of a task to be predicted;
[0092] An extraction module 82, which is configured to extract a two-dimensional feature map of the 3D point cloud based on a feature extraction network;
[0093] A detection module 83, which is configured to detect a 3D prediction box and a corresponding classification confidence of the two-dimensional feature map based on a detection head network;
[0094] The acquisition module 81 is further configured to acquire a whole vehicle detection frame of a truck class, a front detection frame and a body detection frame matching the whole vehicle detection frame based on the 3D prediction frame and the corresponding classification confidence; and
[0095] The prediction module 84 is configured to predict the separation state between the front and body of the corresponding truck based on the whole vehicle detection frame of the truck class, the front detection frame and the body detection frame matching the whole vehicle detection frame.
[0096] In one implementation, the acquisition module 81 is specifically configured to acquire a 3D point cloud of the task to be predicted detected by a laser radar.
[0097] In one embodiment, the feature extraction network is a network based on a single-stage detection SSD algorithm.
[0098] In one embodiment, the device further comprises:
[0099] A judging module, configured to judge whether there is a repeated 3D prediction frame in the 3D prediction frame;
[0100] The execution module is configured to execute the acquisition module 81 to acquire the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class based on the 3D prediction frame and the corresponding classification confidence when there is no repeated 3D prediction frame.
[0101] In one embodiment, a first elimination module is configured to eliminate duplicate 3D prediction frames using a non-maximum suppression algorithm when duplicate 3D prediction frames exist;
[0102] The acquisition module 81 is specifically configured to acquire a whole vehicle detection frame, a front detection frame and a corresponding body detection frame of a truck class based on the eliminated 3D prediction frame and the corresponding classification confidence.
[0103] In one embodiment, if the task to be predicted carries truck-type and non-truck-type objects, the acquisition module 81 includes:
[0104] an acquisition unit, configured to respectively acquire a whole vehicle detection frame of a truck class, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame, and a whole vehicle detection frame of a non-truck class, a front vehicle detection frame and a body detection frame of a non-truck class based on the 3D prediction frame and the corresponding classification confidence;
[0105] The elimination unit is configured to eliminate the non-truck vehicle head detection frame and the vehicle body detection frame to obtain the truck vehicle detection frame, the vehicle head detection frame and the vehicle body detection frame matching the vehicle detection frame, and the non-truck vehicle detection frame.
[0106] In one embodiment, the device further comprises:
[0107] A first labeling module is configured to perform a first labeling on a whole vehicle detection frame of a truck, a front detection frame and a body detection frame matching the whole vehicle detection frame; and
[0108] The second labeling module is configured to perform a second labeling on the non-truck vehicle detection frame.
[0109] The present application also provides an electronic device, such as Fig. 9 As shown, it includes: a processor 91 and a memory 92;
[0110] The memory 92 stores computer-executable instructions;
[0111] The processor 91 executes the computer-executable instructions stored in the memory 92 , so that the electronic device executes the truck detection method.
[0112] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the truck detection method.
[0113] The embodiment of the present application provides a method that a person of ordinary skill in the art can understand that all or some of the steps, systems, and functional modules / units in the device disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).
[0114] As is well known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0115] Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0116] In the description of the embodiments of the present application, the term "and / or" merely indicates an association relationship that describes associated objects, indicating that three relationships may exist. For example, A and / or B may indicate the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" indicates any combination of at least two of any one or more of a plurality of. For example, at least one of A, B, and C may indicate any one or more elements selected from a set that includes A, B, and C.
[0117] In the description of the embodiments of the present application, the terms "upper", "lower", "front", "back", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as a limitation on the present application. In addition, the term "plurality" means two or more, unless otherwise precisely and specifically specified.
[0118] In the description of the embodiment of the present application, the terms "first", "second", "third", "fourth", etc. (if present) are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A truck detection method, characterized in that: include: Get the 3D point cloud of the task to be predicted; Extracting a two-dimensional feature map of the 3D point cloud based on a feature extraction network; Detecting a 3D prediction box and a corresponding classification confidence of the two-dimensional feature map based on a detection head network; If the task to be predicted carries truck and non-truck objects, obtain the whole vehicle detection frame of the truck, the front vehicle detection frame and the body detection frame matching the whole vehicle detection frame, and the whole vehicle detection frame of the non-truck, the front vehicle detection frame and the body detection frame of the non-truck respectively based on the 3D prediction frame and the corresponding classification confidence; remove the front vehicle detection frame and the body detection frame of the non-truck to obtain the whole vehicle detection frame of the truck, the front vehicle detection frame and the body detection frame matching the whole vehicle detection frame, and the whole vehicle detection frame of the non-truck; detect the position state between the truck and the non-truck based on the whole vehicle detection frame of the truck, the front vehicle detection frame and the body detection frame matching the whole vehicle detection frame, and the whole vehicle detection frame of the non-truck; And, based on the whole vehicle detection frame of the truck class, the front detection frame and the body detection frame matching the whole vehicle detection frame, the separation state between the front and the body of the corresponding truck is predicted.
2. The method according to claim 1, characterized in that Acquiring a 3D point cloud of the task to be predicted, including: acquiring a 3D point cloud of the task to be predicted detected by a laser radar.
3. The method according to claim 1, characterized in that The feature extraction network is a network based on the single-stage detection SSD algorithm.
4. The method according to claim 1, characterized in that: After detecting the 3D prediction frame and the corresponding classification confidence of the two-dimensional feature map in the detection head network; and before obtaining the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class based on the 3D prediction frame and the corresponding classification confidence, it also includes: Determine whether there is a repeated 3D prediction frame in the 3D prediction frame; If there is no duplicate 3D prediction frame, the step of obtaining the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class based on the 3D prediction frame and the corresponding classification confidence is performed.
5. The method according to claim 4, characterized in that If there are repeated 3D prediction boxes, it also includes: Use non-maximum suppression algorithm to remove duplicate 3D prediction boxes; Based on the 3D prediction frame and the corresponding classification confidence, a whole vehicle detection frame, a front detection frame and a corresponding body detection frame of a truck are obtained, including: Based on the eliminated 3D prediction frames and the corresponding classification confidences, the whole vehicle detection frame, the front detection frame and the corresponding body detection frame of the truck class are obtained.
6. The method according to claim 1, characterized in that After obtaining the whole vehicle detection frame of the truck class, the front detection frame and the body detection frame matching the whole vehicle detection frame, and the whole detection frame of the non-truck class, it also includes: A first annotation is performed on a whole vehicle detection frame of a truck type, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame; and a second annotation is performed on a whole vehicle detection frame of a non-truck type.
7. A truck detection device, characterized in that: include: An acquisition module, which is configured to acquire a 3D point cloud of a task to be predicted; An extraction module, configured to extract a two-dimensional feature map of the 3D point cloud based on a feature extraction network; A detection module, which is configured to detect a 3D prediction box and a corresponding classification confidence of the two-dimensional feature map based on a detection head network; The acquisition module is further configured to respectively acquire a whole vehicle detection frame of a truck, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame, and a whole vehicle detection frame of a non-truck, a front vehicle detection frame and a body detection frame of a non-truck class based on the 3D prediction frame and the corresponding classification confidence when the task to be predicted carries truck and non-truck objects; remove the front vehicle detection frame and the body detection frame of the non-truck class to obtain a whole vehicle detection frame of a truck, a front vehicle detection frame and a body detection frame matching the whole vehicle detection frame, and a whole vehicle detection frame of a non-truck class; and, A prediction module is configured to predict the separation state between the front and body of the corresponding truck based on a whole vehicle detection frame of the truck class, a front detection frame and a body detection frame matching the whole vehicle detection frame.
8. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device executes the truck detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the truck detection method according to any one of claims 1 to 6.
