Three-dimensional point cloud target identification method and system based on Yolov5 target detection model
By using the Yolov5 model in three-dimensional point cloud target recognition, the two-dimensional object detection box is mapped to the three-dimensional space and processed the three-dimensional point cloud data, the Complex-YOLO model's slow inference speed and three-dimensional information loss is solved, and more efficient and accurate three-dimensional point cloud target recognition is achieved.
Patent Information
- Application Number
- CN202411812364.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-11
AI Technical Summary
The existing three-dimensional point cloud target recognition method based on the improved Complex-YOLO model has a slow inference speed due to the complex model structure; at the same time, part of the three-dimensional information may be lost during the conversion of the three-dimensional point cloud data into a two-dimensional top view, affecting the accuracy of target recognition.
The three-dimensional point cloud target recognition method based on the Yolov5 object detection model is adopted. By mapping the two-dimensional object detection frame and its internal pixel points to the three-dimensional space, the three-dimensional point cloud data in the three-dimensional object detection frame is processed, reducing the computational complexity and retaining the three-dimensional information.
The model's inference speed and the accuracy of three-dimensional point cloud target recognition are improved, and the loss of three-dimensional information due to data conversion is avoided.
Smart Images

Figure CN119600278A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional point cloud recognition, and in particular to a three-dimensional point cloud target recognition method and system based on a Yolov5 target detection model. Background Art
[0002] A patent discloses a method for three-dimensional point cloud target recognition. The core process of this method includes four main steps: first, obtain three-dimensional point cloud data; second, convert the obtained three-dimensional point cloud data into a two-dimensional top view; then, construct an improved Complex-YOLO model, which is optimized on the basis of the original Complex-YOLO model. By introducing a multi-scale feature fusion network, the effective fusion of feature quantities under different-sized receptive fields is achieved, thereby significantly improving the model's detection ability for targets of various sizes and ensuring high detection accuracy; finally, the converted two-dimensional top view is recognized using this improved Complex-YOLO model, and the information of the three-dimensional point cloud target can be accurately and quickly extracted. However, the improved Complex-YOLO model may lead to a high computational complexity of the model due to the addition of complex structures such as a multi-scale feature fusion network, which means that while pursuing high-precision detection, the model's reasoning speed may be affected to a certain extent, manifested as a relatively slow response speed. In addition, in the process of converting three-dimensional point cloud data into a two-dimensional top view, although the data processing is simplified, it may cause partial loss of three-dimensional information, which may have a certain impact on the accuracy of subsequent target recognition. Summary of the invention
[0003] In view of the above defects, the present invention proposes a three-dimensional point cloud target recognition method and system based on the Yolov5 target detection model, aiming to solve the problems in the existing three-dimensional point cloud target recognition method based on the improved Complex-YOLO model, that is, the model reasoning speed is slow due to the complex structure of the improved Complex-YOLO model; and that the three-dimensional point cloud data may lose part of the three-dimensional information in the process of converting the two-dimensional top view, thereby affecting the accuracy of subsequent target recognition.
[0004] To achieve this object, the present invention adopts the following technical solutions:
[0005] A three-dimensional point cloud target recognition method based on the Yolov5 target detection model includes the following steps:
[0006] Step S1: collecting several target images;
[0007] Step S2: Build Yolov5 target detection model;
[0008] Step S3: training the Yolov5 target detection model using a number of target images to obtain a trained Yolov5 target detection model;
[0009] Step S4: Acquire the target image to be detected at different shooting angles;
[0010] Step S5: input the target images to be detected at different shooting angles into the trained Yolov5 target detection model for detection, and output a number of two-dimensional target detection frames;
[0011] Step S6: mapping a plurality of two-dimensional object detection frames and corresponding internal pixel points to three-dimensional space respectively, so as to obtain a plurality of three-dimensional object detection frames and corresponding internal three-dimensional point cloud data;
[0012] Step S7: screening a number of three-dimensional object detection frames to obtain screened three-dimensional object detection frames;
[0013] Step S8: calculating the average value of the filtered 3D target detection frame to obtain the final 3D target detection frame, and using a fusion algorithm to fuse the 3D point cloud data inside the filtered 3D target detection frame to obtain fused 3D point cloud data;
[0014] Step S9: using a region-based growing algorithm to segment the fused three-dimensional point cloud data within the final three-dimensional target detection frame to identify the structure of the three-dimensional point cloud target.
[0015] Preferably, in step S6, the following sub-steps are specifically included: mapping the center point of the two-dimensional object detection frame to the three-dimensional space to obtain the center point of the three-dimensional object detection frame, specifically including the following sub-steps:
[0016] Use camera calibration technology to obtain the internal parameters of the monocular camera. The internal parameters of the monocular camera include the focal length f of the monocular camera in the x-axis direction. x , the focal length f of the monocular camera in the y-axis direction y And the coordinates of the principal point (c x , c y );
[0017] Let the two-dimensional target detection frame be [Bx_min, By_min, Bx_max, By_max], and calculate the center point coordinates P1(u_center, v_center) of the two-dimensional target detection frame. The calculation formula of the center point coordinates P1(u_center, v_center) of the two-dimensional target detection frame is as follows:
[0018]
[0019] Get the depth value d_center corresponding to the center point of the two-dimensional target detection box;
[0020] According to the internal parameters of the monocular camera, the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame and the depth value d_center corresponding to the center point of the two-dimensional target detection frame, the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame are calculated. The calculation formula of the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame is as follows:
[0021]
[0022] Z_center=d_center.
[0023] Preferably, in step S7, the following sub-steps are specifically included:
[0024] Step S71: obtaining the center point coordinates of several three-dimensional object detection frames and setting a distance threshold;
[0025] Step S72: Calculate the distance between the center points of each pair of 3D object detection frames, and determine whether the distance between the center points of each pair of 3D object detection frames is less than or equal to the distance threshold. If so, retain the 3D object detection frame with the highest confidence. If not, retain both 3D object detection frames.
[0026] Step S73: traverse the center points of all three-dimensional object detection frames, and execute step S72 to obtain the filtered three-dimensional object detection frame.
[0027] Another aspect of the present application provides a three-dimensional point cloud target recognition system based on the Yolov5 target detection model, the system comprising:
[0028] An acquisition module, used for acquiring a number of target images;
[0029] Building module for building Yolov5 target detection model;
[0030] A model training module is used to train the Yolov5 target detection model using a number of target images to obtain a trained Yolov5 target detection model;
[0031] An acquisition module is used to acquire images of the target to be detected at different shooting angles;
[0032] The detection module is used to input the target images to be detected at different shooting angles into the trained Yolov5 target detection model for detection, and output several two-dimensional target detection frames;
[0033] A mapping module is used to map a plurality of two-dimensional target detection frames and corresponding internal pixel points to three-dimensional space respectively, so as to obtain a plurality of three-dimensional target detection frames and corresponding internal three-dimensional point cloud data;
[0034] A screening module, used for screening a number of three-dimensional object detection frames to obtain screened three-dimensional object detection frames;
[0035] A calculation module, used to calculate the average value of the filtered three-dimensional object detection frame to obtain the final three-dimensional object detection frame;
[0036] A fusion module is used to fuse the three-dimensional point cloud data corresponding to the filtered three-dimensional target detection frame using a fusion algorithm to obtain fused three-dimensional point cloud data;
[0037] The point cloud segmentation module is used to segment the fused 3D point cloud data within the final 3D target detection frame using a region-based growing algorithm to identify the structure of the 3D point cloud target.
[0038] Preferably, the mapping module comprises:
[0039] The center point mapping submodule is used to map the center point of the two-dimensional object detection frame to the three-dimensional space to obtain the center point of the three-dimensional object detection frame. The center point mapping submodule includes:
[0040] The first acquisition subunit is used to obtain the internal parameters of the monocular camera using the camera calibration technology. The internal parameters of the monocular camera include the focal length f of the monocular camera in the x-axis direction. x , the focal length f of the monocular camera in the y-axis direction y And the coordinates of the principal point (c x , c y );
[0041] The first calculation subunit is used to set the two-dimensional target detection frame to [Bx_min, By_min, Bx_max, By_max], and calculate the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame, wherein the calculation formula of the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame is as follows:
[0042]
[0043] The second acquisition subunit is used to obtain a depth value d_center corresponding to the center point of the two-dimensional object detection frame;
[0044] The second calculation subunit is used to calculate the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame according to the internal parameters of the monocular camera, the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame and the depth value d_center corresponding to the center point of the two-dimensional target detection frame, wherein the calculation formula of the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame is as follows:
[0045]
[0046] Z_center=d_center.
[0047] Preferably, the screening module comprises:
[0048] The acquisition submodule is used to obtain the center point coordinates of several three-dimensional target detection frames;
[0049] Setting submodule, used to set distance threshold;
[0050] A calculation submodule, used to calculate the distance between the center points of each pair of three-dimensional object detection boxes;
[0051] A judgment submodule is used to judge whether the distance between the center points of each pair of 3D object detection frames is less than or equal to a distance threshold. If so, the 3D object detection frame with the highest confidence is retained; if not, both 3D object detection frames are retained.
[0052] The traversal and execution submodule is used to traverse the center points of all three-dimensional object detection frames and execute the judgment submodule to obtain the filtered three-dimensional object detection frame.
[0053] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0054] In this solution, the Yolov5 target detection model is used to detect the two-dimensional image. Compared with the traditional method of using the improved Complex-YOLO model to detect the two-dimensional image, the Yolov5 target detection model adopts a lightweight model design, which reduces the number of layers and parameters of the model, further reduces the complexity of the model calculation, and further improves the reasoning speed. In addition, this solution does not convert the three-dimensional point cloud corresponding to the target image to be detected into a two-dimensional image and input it into the model for detection. Instead, the target image to be detected is input into the model for detection, and the detected two-dimensional target detection frame and the pixels inside it are mapped into the three-dimensional space, and the three-dimensional point cloud in the mapped three-dimensional target detection frame is processed, which can effectively retain the three-dimensional information of the three-dimensional point cloud target, thereby improving the accuracy of subsequent three-dimensional point cloud target recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flowchart of the steps of a 3D point cloud target recognition method based on the Yolov5 target detection model; DETAILED DESCRIPTION
[0056] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0057] A three-dimensional point cloud target recognition method based on the Yolov5 target detection model includes the following steps:
[0058] Step S1: collecting several target images;
[0059] Step S2: Build Yolov5 target detection model;
[0060] Step S3: training the Yolov5 target detection model using a number of target images to obtain a trained Yolov5 target detection model;
[0061] Step S4: Acquire the target image to be detected at different shooting angles;
[0062] Step S5: input the target images to be detected at different shooting angles into the trained Yolov5 target detection model for detection, and output a number of two-dimensional target detection frames;
[0063] Step S6: mapping a plurality of two-dimensional object detection frames and corresponding internal pixel points to three-dimensional space respectively, so as to obtain a plurality of three-dimensional object detection frames and corresponding internal three-dimensional point cloud data;
[0064] Step S7: screening a number of three-dimensional object detection frames to obtain screened three-dimensional object detection frames;
[0065] Step S8: calculating the average value of the filtered 3D target detection frame to obtain the final 3D target detection frame, and using a fusion algorithm to fuse the 3D point cloud data inside the filtered 3D target detection frame to obtain fused 3D point cloud data;
[0066] Step S9: using a region-based growing algorithm to segment the fused three-dimensional point cloud data within the final three-dimensional target detection frame to identify the structure of the three-dimensional point cloud target.
[0067] This scheme is a 3D point cloud target recognition method based on Yolov5 target detection model, such as Figure 1As shown, the first step is to collect several target images. In this embodiment, several target images are obtained by a camera with a monocular structure, which is conducive to the subsequent training of the Yolov5 target detection model. The second step is to build the Yolov5 target detection model. In this embodiment, the Yolov5 target detection model is an existing target detection model. The real-time and accuracy of the Yolov5 target detection model make it an ideal image recognition tool. Therefore, by building the Yolov5 target detection model, it is conducive to using it to process subsequent target detection tasks. The third step is to train the Yolov5 target detection model using several target images to obtain the trained Yolov5 target detection model. In this embodiment, by training the Yolov5 target detection model, it is conducive to improving the accuracy of target detection in subsequent images. The fourth step is to obtain the target image to be detected under different shooting angles. In this embodiment, the camera with a monocular structure can obtain the target image to be detected. Since the final recognition target result is the structure of a three-dimensional point cloud, the three-dimensional point cloud data corresponding to the target image to be detected can be observed from different perspectives. The fifth step is to input the target images to be detected under different shooting angles into the trained Yolov5 target detection model for detection, and output several two-dimensional target detection frames. In this embodiment, the trained Yolov5 target detection model quickly and accurately detects the two-dimensional target detection frame in the target image to be detected, which is beneficial to the subsequent mapping task. The sixth step is to map several two-dimensional target detection frames and the corresponding internal pixels to three-dimensional space respectively to obtain several three-dimensional target detection frames and the corresponding internal three-dimensional point cloud data. In this embodiment, by mapping the two-dimensional target detection frame and the internal pixels to three-dimensional space, the connection between the two-dimensional image and the three-dimensional point cloud is established, thereby realizing more accurate recognition of the target in the three-dimensional space. In addition, by obtaining the three-dimensional target detection frame and the three-dimensional point cloud data inside it, the three-dimensional point cloud data to be processed is limited to the three-dimensional target detection frame, rather than processing the three-dimensional point cloud data corresponding to the entire target image, which can effectively reduce the calculation amount of subsequent three-dimensional point cloud processing. The seventh step is to screen several three-dimensional target detection frames to obtain screened three-dimensional target detection frames. In this embodiment, since the three-dimensional target detection frames calculated from different perspectives may overlap or be close, thereby generating redundant three-dimensional target detection frames, screening several three-dimensional target detection frames and removing redundant three-dimensional target detection frames is conducive to ensuring the accuracy of subsequent three-dimensional point cloud target detection. The eighth step is to calculate the average value of the screened three-dimensional target detection frames to obtain the final three-dimensional target detection frame, and to fuse the three-dimensional point cloud data corresponding to the screened three-dimensional target detection frame through a fusion algorithm to obtain the fused three-dimensional point cloud data. Specifically, by calculating the average value of the screened three-dimensional target detection frame, a more stable and accurate three-dimensional target detection frame can be obtained, which is conducive to the subsequent point cloud segmentation.In this embodiment, the fusion algorithm is an iterative closest point ICP algorithm. The fusion algorithm is used to fuse the three-dimensional point cloud data corresponding to the internal part of the screened three-dimensional target detection frame, which is conducive to ensuring the integrity and accuracy of the three-dimensional point cloud data. The tenth step is to use a region-based growth algorithm to segment the fused three-dimensional point cloud data in the final three-dimensional target detection frame to identify the structure of the three-dimensional point cloud target. In this embodiment, the region-based growth algorithm defines seed points and gradually expands the region according to the similarity of the points, such as normal vectors, curvature, etc., so as to accurately segment the three-dimensional structure of the target object. The region-based growth algorithm has a lower computational complexity and can complete the segmentation task of large-scale three-dimensional point clouds in a shorter time.
[0068] In this solution, the Yolov5 target detection model is used to detect the two-dimensional image. Compared with the traditional method of using the improved Complex-YOLO model to detect the two-dimensional image, the Yolov5 target detection model adopts a lightweight model design, which reduces the number of layers and parameters of the model, further reduces the complexity of the model calculation, and further improves the reasoning speed. In addition, this solution does not convert the three-dimensional point cloud corresponding to the target image to be detected into a two-dimensional image and input it into the model for detection. Instead, the target image to be detected is input into the model for detection, and the detected two-dimensional target detection frame and the pixels inside it are mapped into the three-dimensional space, and the three-dimensional point cloud in the mapped three-dimensional target detection frame is processed, which can effectively retain the three-dimensional information of the three-dimensional point cloud target, thereby improving the accuracy of subsequent three-dimensional point cloud target recognition.
[0069] Preferably, in step S6, the following sub-steps are specifically included: mapping the center point of the two-dimensional object detection frame to the three-dimensional space to obtain the center point of the three-dimensional object detection frame, specifically including the following sub-steps:
[0070] Use camera calibration technology to obtain the internal parameters of the monocular camera. The internal parameters of the monocular camera include the focal length f of the monocular camera in the x-axis direction. x , the focal length f of the monocular camera in the y-axis direction y And the coordinates of the principal point (c x , c y );
[0071] Let the two-dimensional target detection frame be [Bx_min, By_min, Bx_max, By_max], and calculate the center point coordinates P1(u_center, v_center) of the two-dimensional target detection frame. The calculation formula of the center point coordinates P1(u_center, v_center) of the two-dimensional target detection frame is as follows:
[0072]
[0073] Get the depth value d_center corresponding to the center point of the two-dimensional target detection box;
[0074] According to the internal parameters of the monocular camera, the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame and the depth value d_center corresponding to the center point of the two-dimensional target detection frame, the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame are calculated. The calculation formula of the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame is as follows:
[0075]
[0076] Z_center=d_center.
[0077] In this embodiment, by mapping the center point of the two-dimensional object detection frame to the three-dimensional space, richer center point position information can be obtained.
[0078] Preferably, in step S7, the following sub-steps are specifically included:
[0079] Step S71: obtaining the center point coordinates of several three-dimensional object detection frames and setting a distance threshold;
[0080] Step S72: Calculate the distance between the center points of each pair of 3D object detection frames, and determine whether the distance between the center points of each pair of 3D object detection frames is less than or equal to the distance threshold. If so, retain the 3D object detection frame with the highest confidence. If not, retain both 3D object detection frames.
[0081] Step S73: traverse the center points of all three-dimensional object detection frames, and execute step S72 to obtain the filtered three-dimensional object detection frame.
[0082] In this embodiment, the distance threshold is 0.5. When the distance between the center points of a pair of 3D object detection frames is less than or equal to 0.5, it means that the pair of 3D object detection frames are overlapping or close, and the 3D object detection frame with the highest confidence is retained, which is conducive to reducing redundant 3D object detection frames.
[0083] Another aspect of the present application provides a three-dimensional point cloud target recognition system based on the Yolov5 target detection model, the system comprising:
[0084] An acquisition module, used for acquiring a number of target images;
[0085] Building module for building Yolov5 target detection model;
[0086] A model training module is used to train the Yolov5 target detection model using a number of target images to obtain a trained Yolov5 target detection model;
[0087] An acquisition module is used to acquire images of the target to be detected at different shooting angles;
[0088] The detection module is used to input the target images to be detected at different shooting angles into the trained Yolov5 target detection model for detection, and output several two-dimensional target detection frames;
[0089] A mapping module is used to map a plurality of two-dimensional target detection frames and corresponding internal pixel points to three-dimensional space respectively, so as to obtain a plurality of three-dimensional target detection frames and corresponding internal three-dimensional point cloud data;
[0090] A screening module, used for screening a number of three-dimensional object detection frames to obtain screened three-dimensional object detection frames;
[0091] A calculation module, used to calculate the average value of the filtered three-dimensional object detection frame to obtain the final three-dimensional object detection frame;
[0092] A fusion module is used to fuse the three-dimensional point cloud data corresponding to the filtered three-dimensional target detection frame using a fusion algorithm to obtain fused three-dimensional point cloud data;
[0093] The point cloud segmentation module is used to segment the fused 3D point cloud data within the final 3D target detection frame using a region-based growing algorithm to identify the structure of the 3D point cloud target.
[0094] The present invention is a 3D point cloud target recognition system based on Yolov5 target detection model. Through the cooperation of acquisition module, construction module, model training module, acquisition module, detection module, mapping module, screening module, calculation module, fusion module and point cloud segmentation module, the recognition of 3D point cloud targets in 3D space is realized. In the present invention, the Yolov5 target detection model is used to detect 2D images. Compared with the traditional method of using the improved Complex-YOLO model to detect 2D images, the Yolov5 target detection model adopts a lightweight model design, which reduces the number of layers and parameters of the model, further reduces the complexity of model calculation, and further improves the reasoning speed. In addition, the present invention does not convert the 3D point cloud corresponding to the target image to be detected into a 2D image and input it into the model for detection. Instead, the target image to be detected is input into the model for detection, and the detected 2D target detection frame and the pixels inside it are mapped into 3D space, and the 3D point cloud in the mapped 3D target detection frame is processed, which can effectively retain the 3D information of the 3D point cloud target, thereby improving the accuracy of subsequent 3D point cloud target recognition.
[0095] Preferably, the mapping module includes:
[0096] The center point mapping submodule is used to map the center point of the two-dimensional object detection frame to the three-dimensional space to obtain the center point of the three-dimensional object detection frame. The center point mapping submodule includes:
[0097] The first acquisition subunit is used to obtain the internal parameters of the monocular camera using the camera calibration technology. The internal parameters of the monocular camera include the focal length f of the monocular camera in the x-axis direction. x , the focal length f of the monocular camera in the y-axis direction y And the coordinates of the principal point (c x , c y );
[0098] The first calculation subunit is used to set the two-dimensional target detection frame to [Bx_min, By_min, Bx_max, By_max], and calculate the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame, wherein the calculation formula of the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame is as follows:
[0099]
[0100] The second acquisition subunit is used to obtain a depth value d_center corresponding to the center point of the two-dimensional object detection frame;
[0101] The second calculation subunit is used to calculate the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame according to the internal parameters of the monocular camera, the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame and the depth value d_center corresponding to the center point of the two-dimensional target detection frame, wherein the calculation formula of the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame is as follows:
[0102]
[0103] Z_center=d_center.
[0104] In this embodiment, by setting a center point mapping submodule composed of a first acquisition subunit, a first calculation subunit, a second acquisition subunit and a second calculation subunit, more abundant target position information can be acquired.
[0105] Preferably, the screening module includes: an acquisition submodule for acquiring the coordinates of the center points of several three-dimensional target detection frames; a setting submodule for setting a distance threshold; a calculation submodule for calculating the distance between the center points of each pair of three-dimensional target detection frames; a judgment submodule for judging whether the distance between the center points of each pair of three-dimensional target detection frames is less than or equal to the distance threshold, if so, retaining the three-dimensional target detection frame with the highest confidence, if not, retaining two three-dimensional target detection frames; a traversal and execution submodule for traversing the center points of all three-dimensional target detection frames, and executing the judgment submodule to obtain the screened three-dimensional target detection frame. In this embodiment, by setting the acquisition submodule, the setting submodule, the calculation submodule, the judgment submodule, and the traversal and execution submodule, it is helpful to reduce redundant three-dimensional target detection frames.
[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0107] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A three-dimensional point cloud target recognition method based on the Yolov5 target detection model, characterized in that: The following steps are involved: Step S1: collecting several target images; Step S2: Build Yolov5 target detection model; Step S3: training the Yolov5 target detection model using a number of target images to obtain a trained Yolov5 target detection model; Step S4: Acquire the target image to be detected at different shooting angles; Step S5: input the target images to be detected at different shooting angles into the trained Yolov5 target detection model for detection, and output a number of two-dimensional target detection frames; Step S6: mapping a plurality of two-dimensional object detection frames and corresponding internal pixel points to three-dimensional space respectively, so as to obtain a plurality of three-dimensional object detection frames and corresponding internal three-dimensional point cloud data; Step S7: screening a number of three-dimensional object detection frames to obtain screened three-dimensional object detection frames; Step S8: calculating the average value of the filtered 3D target detection frame to obtain the final 3D target detection frame, and using a fusion algorithm to fuse the 3D point cloud data inside the filtered 3D target detection frame to obtain fused 3D point cloud data; Step S9: using a region-based growing algorithm to segment the fused three-dimensional point cloud data within the final three-dimensional target detection frame to identify the structure of the three-dimensional point cloud target.
2. The three-dimensional point cloud target recognition method based on the Yolov5 target detection model according to claim 1, characterized in that: In step S6, the following sub-steps are specifically included: mapping the center point of the two-dimensional object detection frame to the three-dimensional space to obtain the center point of the three-dimensional object detection frame, which specifically includes the following sub-steps: Use camera calibration technology to obtain the internal parameters of the monocular camera. The internal parameters of the monocular camera include the focal length f of the monocular camera in the x-axis direction. x , the focal length f of the monocular camera in the y-axis direction y And the coordinates of the principal point (c x , c y ); Let the two-dimensional target detection frame be [Bx_min, By_min, Bx_max, By_max], and calculate the center point coordinates P1(u_center, v_center) of the two-dimensional target detection frame. The calculation formula of the center point coordinates P1(u_center, v_center) of the two-dimensional target detection frame is as follows: Get the depth value d_center corresponding to the center point of the two-dimensional target detection box; According to the internal parameters of the monocular camera, the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame and the depth value d_center corresponding to the center point of the two-dimensional target detection frame, the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame are calculated. The calculation formula of the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame is as follows: Z_center=d_center.
3. A method based on Yolo according to claim 2 v 5. A three-dimensional point cloud target recognition method based on a target detection model, characterized in that: In step S7, the following sub-steps are specifically included: Step S71: obtaining the center point coordinates of several three-dimensional object detection frames and setting a distance threshold; Step S72: Calculate the distance between the center points of each pair of 3D object detection frames, and determine whether the distance between the center points of each pair of 3D object detection frames is less than or equal to the distance threshold. If so, retain the 3D object detection frame with the highest confidence. If not, retain both 3D object detection frames. Step S73: traverse the center points of all three-dimensional object detection frames, and execute step S72 to obtain the filtered three-dimensional object detection frame.
4. A three-dimensional point cloud target recognition system based on Yolov5 target detection model, using the three-dimensional point cloud target recognition method based on Yolov5 target detection model as claimed in any one of claims 1 to 3, characterized in that: The system comprises: An acquisition module, used for acquiring a number of target images; Building module for building Yolov5 target detection model; A model training module is used to train the Yolov5 target detection model using a number of target images to obtain a trained Yolov5 target detection model; An acquisition module is used to acquire images of the target to be detected at different shooting angles; The detection module is used to input the target images to be detected at different shooting angles into the trained Yolov5 target detection model for detection, and output several two-dimensional target detection frames; A mapping module is used to map a plurality of two-dimensional target detection frames and corresponding internal pixel points to three-dimensional space respectively, so as to obtain a plurality of three-dimensional target detection frames and corresponding internal three-dimensional point cloud data; A screening module, used for screening a number of three-dimensional object detection frames to obtain screened three-dimensional object detection frames; A calculation module, used to calculate the average value of the filtered three-dimensional object detection frame to obtain the final three-dimensional object detection frame; A fusion module is used to fuse the three-dimensional point cloud data corresponding to the filtered three-dimensional target detection frame using a fusion algorithm to obtain fused three-dimensional point cloud data; The point cloud segmentation module is used to segment the fused 3D point cloud data within the final 3D target detection frame using a region-based growing algorithm to identify the structure of the 3D point cloud target.
5. A method based on Yolo according to claim 4 v 5. A three-dimensional point cloud target recognition system based on a target detection model, characterized by: The mapping module comprises: The center point mapping submodule is used to map the center point of the two-dimensional object detection frame to the three-dimensional space to obtain the center point of the three-dimensional object detection frame. The center point mapping submodule includes: The first acquisition subunit is used to obtain the internal parameters of the monocular camera using the camera calibration technology. The internal parameters of the monocular camera include the focal length f of the monocular camera in the x-axis direction. x , the focal length f of the monocular camera in the y-axis direction v And the coordinates of the principal point (c x , c y ); The first calculation subunit is used to set the two-dimensional target detection frame to [Bx_min, By_min, Bx_max, By_max], and calculate the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame, wherein the calculation formula of the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame is as follows: The second acquisition subunit is used to obtain a depth value d_center corresponding to the center point of the two-dimensional object detection frame; The second calculation subunit is used to calculate the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame according to the internal parameters of the monocular camera, the center point coordinates P1 (u_center, v_center) of the two-dimensional target detection frame and the depth value d_center corresponding to the center point of the two-dimensional target detection frame, wherein the calculation formula of the center point coordinates P2 (X_center, Y_center, Z_center) of the three-dimensional target detection frame is as follows: Z_center=d_center.
6. The three-dimensional point cloud target recognition system based on the Yolov5 target detection model according to claim 5, characterized in that: The screening module comprises: The acquisition submodule is used to obtain the center point coordinates of several three-dimensional target detection frames; Setting submodule, used to set distance threshold; A calculation submodule, used to calculate the distance between the center points of each pair of three-dimensional object detection boxes; A judgment submodule is used to judge whether the distance between the center points of each pair of 3D object detection frames is less than or equal to a distance threshold. If so, the 3D object detection frame with the highest confidence is retained; if not, both 3D object detection frames are retained. The traversal and execution submodule is used to traverse the center points of all three-dimensional object detection frames and execute the judgment submodule to obtain the filtered three-dimensional object detection frame.