WO2023201723A1 - 目标检测模型的训练方法、目标检测方法及装置 - Google Patents
目标检测模型的训练方法、目标检测方法及装置 Download PDFInfo
- Publication number
- WO2023201723A1 WO2023201723A1 PCT/CN2022/088566 CN2022088566W WO2023201723A1 WO 2023201723 A1 WO2023201723 A1 WO 2023201723A1 CN 2022088566 W CN2022088566 W CN 2022088566W WO 2023201723 A1 WO2023201723 A1 WO 2023201723A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- camera
- training
- internal parameters
- parameters
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Definitions
- the present application relates to the field of computer vision technology, and in particular to a training method for a target detection model, a target detection method and a device.
- Target detection is a traditional task in the field of computer vision. Different from image recognition, target detection requires the position of the target object to be given in the form of a minimum bounding box (Bounding box). In 3D (three dimensional, three-dimensional) target detection, the 3D bounding box of the target object needs to be given. Taking the field of autonomous driving as an example, 3D target detection obtains the 3D coordinates of the target object, and then obtains a 3D frame based on the 3D coordinates. The 3D frame is then visualized on the image and aerial view as shown in Figure 1.
- 3D target detection obtains the 3D coordinates of the target object, and then obtains a 3D frame based on the 3D coordinates. The 3D frame is then visualized on the image and aerial view as shown in Figure 1.
- Some 3D target detection methods based on monocular cameras have been proposed in related technologies.
- This method uses a target detection model to process images collected by a monocular camera, and can obtain the 3D vertices of the target object, and then obtain the 3D frame.
- this method cannot perform data amplification through image-based geometric transformation, so the generalization ability of the model is poor.
- This application provides a training method for a target detection model, a target detection method and a device, which are used to improve the generalization ability of a 3D target detection model based on a monocular camera.
- this application provides a training method for a target detection model, including:
- the target detection model is trained N times, the first camera is any one of the at least one monocular camera, and the N is greater than 1 integer;
- the N times of training include at least one first training, and the first training includes the following steps:
- the three-dimensional position information is used as the annotated position information of the target object in the sample image
- parameters of the target detection model are adjusted.
- the internal parameters of the monocular camera are transformed into the internal parameters of another monocular camera (i.e., the extended internal parameters), and the image collected by the monocular camera is mapped to the image collected by the extended camera. , and then train the target detection model.
- the intrinsic parameters of the extended camera are used for the images of the extended camera, so that the intrinsic parameters of the camera are involved in image matching, so that the model can be applied to the extended camera and improve the generalization ability of the model.
- the same target detection model can be applied to cameras with different internal parameters.
- the N times of training include at least one second training, and the second training includes the following steps:
- parameters of the target detection model are adjusted.
- the target detection model is trained based on real cameras in the camera set, and the target detection model can be well applied to any camera in the camera set.
- the expanded internal parameters obtained by the transformation during each training of the S first trainings are Different, S is an integer less than or equal to N.
- the target detection model can use more samples for training, thereby further improving the generalization ability of the target detection model.
- the transformation of the internal parameters of the first camera to obtain the extended internal parameters used in the first training includes:
- Random perturbation is used to make the internal parameters of the first camera float up and down within a range to increase the amount of data and improve the robustness of the target detection model.
- the random perturbation of the internal parameters of the first camera includes:
- the sub-parameters in the intrinsic parameters of the first camera are replaced with extended sub-parameters of the sub-parameters.
- performing a geometric transformation on the image collected by the first camera according to the internal parameters of the first camera and the extended internal parameters to obtain the sample image used for the first training includes:
- the dedistorted image is processed based on the extended internal parameters to obtain the sample image.
- dedistortion can ensure that the image collected by the first camera is accurately mapped to the image space of the extended camera, thereby improving the accuracy of the model inference results.
- this application provides a target detection method, which is applied to the process of detecting a target object using a target detection model trained by the method described in any one of the first aspects.
- the method includes:
- Coordinate transformation is performed on the two-dimensional position information and the depth information according to the internal parameters of the monocular camera to obtain the three-dimensional position information of the target object in the coordinate system of the monocular camera.
- this application also provides a training device for a target detection model, including:
- An information acquisition module configured to acquire internal parameters of at least one monocular camera and images collected by the at least one monocular camera
- a training module configured to train the target detection model N times based on the internal parameters of the first camera and the images collected by the first camera, where the first camera is any one of the at least one monocular camera, and the N is an integer greater than 1;
- the N times of training include at least one first training, and the first training includes the following steps:
- the three-dimensional position information is used as the annotated position information of the target object in the sample image
- parameters of the target detection model are adjusted.
- the training module is also used to perform at least one second training in the N trainings, and the second training includes the following steps:
- parameters of the target detection model are adjusted.
- the expanded internal parameters obtained by the transformation during each training of the S first trainings are Different, S is an integer less than or equal to N.
- the training module is used to randomly perturb the internal parameters of the first camera to obtain extended internal parameters used in this training.
- the random perturbation of the internal parameters of the first camera is performed, and the training module is specifically used to:
- the sub-parameters in the intrinsic parameters of the first camera are replaced with extended sub-parameters of the sub-parameters.
- the training module is used to:
- the dedistorted image is processed based on the extended internal parameters to obtain the sample image.
- this application also provides a target detection device, which is applied to the process of detecting a target object using the target detection model obtained by the device according to any one of the third aspects.
- the device includes:
- the image acquisition module to be detected is used to acquire the image to be detected collected by the monocular camera and the internal parameters of the monocular camera;
- a two-dimensional information acquisition module used to detect the image to be detected and obtain the two-dimensional position information and depth information of the target object in the coordinate system of the image to be detected;
- a three-dimensional information determination module is configured to perform coordinate transformation on the two-dimensional position information and the depth information according to the internal parameters of the monocular camera to obtain the three-dimensional position information of the target object in the coordinate system of the monocular camera.
- this application provides a chip system, including: a memory for storing a computer program; a processor; when the processor calls and runs the computer program from the memory, the electronic device installed with the chip system executes the following steps: The method described in any one of the first aspect and the second aspect.
- the present application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the method described in any one of the first and second aspects.
- the present application provides a computer-readable storage medium including instructions that, when run on a computer, cause the computer to perform the method described in any one of the first aspect and the second aspect.
- this application also provides an electronic device, including:
- Memory used to store readable programs
- At least one processor configured to call and run the readable program from the memory, so that the communication device implements the method described in any one of the first aspect and the second aspect.
- Figure 1 is a schematic diagram of visualizing 3D boxes on images and aerial views
- Figure 2 is a schematic diagram of an application scenario provided by the embodiment of the present application.
- Figure 3 is a schematic diagram of another application scenario provided by the embodiment of the present application.
- Figure 4 is a schematic diagram of a monocular camera installed in an autonomous vehicle
- Figure 5 is a schematic flowchart of the training method of the target detection model provided by the embodiment of the present application.
- Figure 6 is another schematic flowchart of the training method of the target detection model provided by the embodiment of the present application.
- Figure 7 is a schematic flow chart of the target detection method provided by the embodiment of the present application.
- Figure 8 is a schematic diagram of the same target detection model used by multiple monocular cameras according to an embodiment of the present application.
- Figure 9 is a schematic structural diagram of a training device for a target detection model provided by an embodiment of the present application.
- Figure 10 is a schematic structural diagram of a target detection device provided by an embodiment of the present application.
- Figure 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- the target detection model when performing 3D target detection based on images collected by a monocular camera, the target detection model cannot use image-based geometric transformation, a commonly used data amplification method, for data amplification, and further cannot use data amplification.
- the model is trained in this way, resulting in poor generalization ability of the model. This is because the geometric transformation based on the image will affect the mapping relationship from 2D to 3D. This is explained below.
- Using the target detection model to obtain the 3D box includes the following steps:
- the image collected by the monocular camera is input into the target detection model.
- the target detection model can be a depth prediction model based on two-dimensional images. This model is used to infer the images collected by the monocular camera and detect the target object in the target detection model. 2D coordinates (u, v) in the image and predict the depth Z corresponding to the 2D coordinates. Usually, the model infers the 2D coordinates and depth of the center point of the 3D box in the image. It may also infer the 2D coordinates and depth of a few 3D box vertices in the image. The model can be used to infer the 2D coordinates and depth of the 3D box vertices.
- the imaging principle of the monocular camera is used to analyze the detection results of the target detection model to obtain the 3D coordinates of the target object in the camera coordinate system.
- Equation 1 it is used to describe the mapping relationship from 2D to 3D:
- (u, v) represents the 2D coordinates of the key point
- Z represents the depth of the key point
- K represents the intrinsic parameter of the monocular camera
- K can be obtained through camera calibration.
- fx, fy, cx and cy are all sub-parameters of the internal parameters
- K -1 is the inverse matrix of K
- (X, Y, Z) are the 3D coordinates of the pixel in the camera coordinate system of the monocular camera.
- the 3D coordinates of the target object can be obtained, and then the length, width, height and orientation angle of the target object can be inferred.
- the target detection model of a monocular camera is bound to specific internal parameters, and one model cannot be applied to multiple cameras with different internal parameters. That is, each monocular camera requires a target detection model, and a target detection model is only applicable to a monocular camera to which it is bound. Therefore, simple image-based data amplification of sample images is not suitable for the target detection model of monocular cameras, resulting in the generalization ability of the target detection model not being improved.
- embodiments of the present application provide a feasible data amplification method to train the target detection model and improve the generalization ability of the model.
- the internal camera parameter K of the monocular camera geometric transformation can be performed on the images collected by the monocular camera to achieve data amplification.
- the internal parameter K′ (hereinafter also referred to as the extended internal parameter) can be constructed, and the original image is projected into an image captured by an extended camera with the internal parameter K′ .
- K′ is different from K, only cx is different, then the above transformation is equivalent to performing a left and right translation operation on the original image; if only cy is different, it is equivalent to an up and down translation operation on the original image; if only fx is different, it is equivalent to performing a translation operation on the original image Perform a horizontal scaling operation; if only fy is different, it is equivalent to performing a vertical scaling operation on the original image.
- the correct 3D coordinates can be obtained by left-multiplying the inverse matrix K′ -1 of K′.
- the internal parameters of the monocular camera are transformed into the internal parameters of another monocular camera (that is, the extended internal parameters of the extended camera), and the images collected by the monocular camera are mapped
- an object detection model is then trained.
- the intrinsic parameters of the extended camera are used for the images of the extended camera, so that the intrinsic parameters of the camera are involved in image matching, so that the model can be applied to the extended camera and improve the generalization ability of the model.
- the same target detection model can be applied to cameras with different internal parameters.
- the target detection model can be trained on the server side or the terminal side. After training, the target detection model can be applied in the terminal.
- the terminal can be, for example, a car, a mobile phone, a robot, or other equipment equipped with a monocular camera.
- Figure 2 is a schematic diagram of an application scenario provided by an embodiment of the present application.
- the application scenario includes a car 101 and a target object 102.
- the car 101 collects images containing the target object through the monocular camera installed on the car 101, and the image can be input to the target detection model 103 in the car 101 to detect the 3D position of the target object 102.
- the target detection model 103 can also be applied in the server.
- the application scenario includes a car 101, a target object 102 and a server 104.
- the monocular camera of the car 101 collects an image containing the target object, and then the car 101 sends the image to the server 104.
- the server 104 uses its built-in target detection model 103 to infer the image to obtain the 3D position of the target object.
- each monocular camera needs to train a target detection model separately, and a total of 16 target detection models need to be trained.
- each target detection model can be trained for each type of camera, and ultimately a total of four target detection models need to be trained.
- Each target detection model is suitable for the same type of monocular camera, so the generalization ability of the target detection model is improved.
- FIG. 5 it is a schematic flow chart of the training method of the target detection model in the embodiment of the present application, including:
- Step 501 Obtain internal parameters of at least one monocular camera and images collected by at least one monocular camera.
- monocular cameras of the same camera type may constitute a camera set.
- the cameras of a camera ensemble are used to jointly train the same object detection model.
- it is not limited to the same camera type.
- different types of monocular cameras can also build a camera set for training the same target detection model.
- any monocular camera in the camera set can be used as the first camera to train the target detection model.
- Step 502 Train the target detection model N times based on the internal parameters of the first camera and the images collected by the first camera, where N is an integer greater than 1.
- the N times of training include at least one first training, and the first training includes the following steps:
- Step 5021 Transform the internal parameters of the first camera to obtain extended internal parameters used in the first training.
- the expanded internal parameters obtained by each transformation in the S times of first training are different, and S is less than or equal to N integer.
- the internal parameter K of the first camera is transformed to obtain K' 1 , K' 2 , K' 3 ...K' m , a total of m different extended internal parameters.
- any first camera assuming that it collects a total of p images and m extended internal parameters, it is equivalent to adding p*m sample images, thus increasing the sample images for training the target detection model, This further improves the generalization ability of the target detection model.
- the internal parameters of the first camera can be transformed in a variety of ways, for example, any sub-parameter in the internal parameters is translated with equal or unequal steps, such as the internal parameters of the first camera.
- it can also be adjusted according to the direction of expected change.
- K′ is different from K and only cx is different, it is equivalent to performing a left and right translation operation on the original image; if only cy is different, it is equivalent to performing an up and down translation operation on the original image; If only fx is different, it is equivalent to performing a horizontal scaling operation on the original image; if only fy is different, it is equivalent to performing a vertical scaling operation on the original image.
- the reasoning ability of the target detection model may be limited, causing the target detection model to fail to converge. Therefore, during implementation, try to ensure that the extended internal parameters are distributed around the internal parameters of the first camera. For example, the internal parameter distance from the first camera is within the threshold, so as to ensure that the accuracy of the inference results of the target detection model meets the expected requirements as much as possible, and to achieve it as soon as possible. Training convergence.
- the implementation of the extended internal parameters used in this training can be obtained by randomly perturbing the internal parameters of the first camera within a threshold. Randomly perturb the internal parameters of the first camera so that the internal parameters of the first camera float up and down within a range to increase the amount of data and improve the robustness of the target detection model.
- the embodiment of the present application adopts a data amplification method of variable internal parameters, so that the model can adapt to different internal parameters during training, so that it can adapt to multiple different internal parameters during use. Camera effects. Therefore, the generalization ability of the model can be improved, the same target detection model can be adapted to multiple cameras with different internal parameters, and one model can be used by multiple monocular cameras, which can reduce development costs.
- the embodiment of the present application uses the original value (i.e., sub-parameter) of the internal parameter K of the first camera as the center point, based on the preset standard deviation, using Normal distribution is used to generate random values to replace the original values in K.
- the extended internal parameter of the first camera Construct a normal distribution curve 1 for fx, and then obtain a point fx′ from the normal distribution curve 1 within a specified range centered on fx, then the extended internal parameter of
- the extended internal parameters are not limited to being different in one sub-parameter compared to the internal parameters of the first camera. There can be multiple different subparameters. For example, not only the normal distribution curve 1 of fx can be constructed, but also the normal distribution curve 2 of cx can be constructed.
- the extended sub-parameters of one or more of the sub-parameters can be selected to construct the extended internal parameters.
- the parameter differences between different extended internal parameters can be differences in the same sub-parameters or differences in different sub-parameters.
- the normal distribution curve 1 for fx multiple (maybe thousands) different fx′ can be obtained to obtain different extended internal parameters.
- fx′ is different, but also other sub-parameters such as cx′ are different, different extended internal parameters will be obtained.
- the cycle of model training can be as high as hundreds of thousands of times, each time using a different internal parameter K′, and this internal parameter K′ is either derived from the internal parameters of the real camera, or generated based on random perturbations of the internal parameters of the real camera.
- this internal parameter K′ is either derived from the internal parameters of the real camera, or generated based on random perturbations of the internal parameters of the real camera.
- the model uses a large amount of training samples for training, which can improve the generalization ability of the model.
- Step 5022 Perform geometric transformation on the image collected by the first camera according to the internal parameters and extended internal parameters of the first camera to obtain the sample image used for the first training, and use the three-dimensional position information of the target object in the image collected by the first camera as the target object. Annotation location information in sample images.
- Image geometric transformation also known as image space transformation, maps the coordinate position in one image to a new coordinate position in another image without changing the pixel value of the image.
- Geometric transformations of images can include translation, rotation, scaling, orthoparallel projection, etc.
- the geometric transformation of the image can be achieved through spatial transformation and interpolation algorithms.
- the key to geometric transformation is the transformation parameter in the mapping process, which can be one or more of translation components, scaling factors, rotation angles, etc.
- camera internal parameters do not need to be considered when performing geometric transformation on images collected by a camera.
- the extended internal parameters of the extended camera are used as transformation parameters to realize translation and zooming of images collected by the first camera. Wait for operations.
- cx is equivalent to performing a left and right translation operation on the original image.
- Image distortion is caused by deviations in lens manufacturing precision and assembly processes, which lead to distortion of the original image.
- Lens distortion is divided into two categories: radial distortion and tangential distortion.
- Radial distortion is caused by the inherent properties of the convex lens itself, which occurs because light rays bend more away from the center of the lens than closer to the center. Distortion is distributed along the radius of the lens, mainly including barrel distortion and pincushion distortion.
- Tangential distortion is caused by the fact that the lens itself is not parallel to the camera sensor plane (imaging plane). This situation is mostly caused by the installation deviation of the lens being pasted to the lens module.
- the image captured by the first camera is dedistorted based on the internal parameters of the first camera and the distortion coefficient of the first camera, and we obtain The dedistorted image is then processed based on the extended internal parameters to obtain a sample image.
- Step 5023 Use the target detection model to detect the sample image, and obtain the first two-dimensional position information and the first depth information of the target object in the sample image coordinate system.
- the first two-dimensional position information is, for example, the position coordinates of each key point of the target object in the sample image, such as the 2D coordinates (u, v) mentioned above.
- the first depth information is the depth for which the 2D coordinates (u, v) correspond, such as Z in formula (1).
- Step 5024 Perform coordinate transformation on the first two-dimensional position information and the first depth information according to the extended internal parameters to obtain the first three-dimensional position information of the target object in the camera coordinate system corresponding to the extended internal parameters.
- the first three-dimensional position information is the 3D coordinates of the key points of the target object calculated through formula (1).
- Step 5025 Adjust parameters of the target detection model based on the difference between the first three-dimensional position information and the annotated position information.
- each function has its own parameters, thus defining the functionality of the model.
- the purpose of training is to estimate and adjust the parameters of these functions based on the training data set, so that the model can learn the mapping from input images to expected results.
- the overall training process for extended internal parameters can be summarized as shown in Figure 6: After collecting the image, it is necessary to annotate the 3D coordinates of the key points of the obstacles in the image to obtain the annotated position of the target object.
- the annotated position It is saved in the annotation file, so the annotation file contains the real 3D coordinates (x, y, z) of the key points of the obstacle (that is, the annotation position of the target object).
- the annotation file contains the real 3D coordinates (x, y, z) of the key points of the obstacle (that is, the annotation position of the target object).
- step 601 the image A, internal parameter K and distortion coefficient D collected by the monocular camera are obtained.
- step 602 the internal parameter K is transformed into the internal parameter K'.
- step 603 image A is dedistorted using intrinsic parameter K and distortion coefficient D to obtain image A', and then in step 604, image A' is geometrically transformed using extended intrinsic parameter K' to obtain image B.
- step 602 and step 603 are not limited.
- step 605 image B is input to the target detection model, and the 2D coordinates of the key points of the obstacle and their depths ( up , v p , Z p ) are output.
- step 606 the predicted 3D coordinates are obtained by left-multiplying ( up , v p , Z p ) by the inverse matrix K′ -1 of the extended internal parameter K′.
- step 607 the difference between the predicted 3D coordinates and the real 3D coordinates (x, y, z) is determined, and parameters of the target detection model can be adjusted based on the difference.
- the training samples used in the same training batch belong to the same extended camera.
- Each training batch includes multiple training samples, and the total difference between the predicted 3D coordinates and the real 3D coordinates of all training samples in the same training batch is calculated to adjust the parameters of the target detection model.
- the aforementioned N times of training also include at least one second training.
- the second training will use the internal parameters of the first camera to train the target detection model, which can be implemented as:
- the parameters of the target detection model are adjusted.
- embodiments of the present application also provide a method for target detection using the above target detection model, as shown in Figure 7, including the following steps:
- Step 701 Obtain the image to be detected collected by the monocular camera and the internal parameters of the monocular camera.
- Step 702 Detect the image to be detected and obtain the two-dimensional position information and depth information of the target object in the coordinate system of the image to be detected.
- Step 703 Perform coordinate transformation on the two-dimensional position information and depth information according to the internal parameters of the monocular camera to obtain the three-dimensional position information of the target object in the monocular camera coordinate system.
- the camera set includes internal parameters C of multiple monocular cameras.
- Multiple extended internal parameters E can be expanded by using the internal parameters C of multiple monocular cameras.
- the internal parameter set F used in the training phase includes internal parameter C and internal parameter E.
- the complete 3D box information of the obstacle is inferred based on geometric relationships.
- the same camera type includes four monocular cameras, assuming that they are camera 1, camera 2, camera 3 and camera 4 in order. Then these four cameras share the same target detection model.
- the internal parameter K1 and distortion coefficient D1 of camera 1 are used to dedistort the collected images, and then the target detection model is input.
- the target detection model obtains the internal parameter K1 of camera 1 and uses the internal parameter K1.
- the inverse matrix of gets the 3D coordinates of the obstacle.
- the internal parameter K2 and distortion coefficient D2 of camera 2 are used to dedistort the image collected, and then input into the target detection model.
- the target detection model obtains the internal parameter K2 of camera 2, and uses the internal parameter K2
- the inverse matrix of gets the 3D coordinates of the obstacle.
- the processing methods of Camera 3 and Camera 4 are similar, so I won’t go into details here.
- this application releases a target detection model that is suitable for one or even multiple cameras. Due to the manufacturing process, even cameras of the same brand and model will have differences in their internal parameters. If you train a corresponding model for each camera, it will obviously be too expensive. After adopting the solution of this application, a model can be trained to make it suitable for a certain model or even several models of cameras.
- this application also provides a training device 900 for a target detection model.
- the training device 900 includes:
- Information acquisition module 901 used to acquire internal parameters of at least one monocular camera and images collected by the at least one monocular camera;
- the training module 902 is configured to train the target detection model N times according to the internal parameters of the first camera and the images collected by the first camera, where the first camera is any one of the at least one monocular camera, so N is an integer greater than 1;
- the N times of training include at least one first training, and the first training includes the following steps:
- the three-dimensional position information is used as the annotated position information of the target object in the sample image
- parameters of the target detection model are adjusted.
- the training module is also used to perform at least one second training in the N trainings, and the second training includes the following steps:
- parameters of the target detection model are adjusted.
- the expanded internal parameters obtained by the transformation during each training of the S first trainings are Different, S is an integer less than or equal to N.
- the training module is used to perform random perturbations on the internal parameters of the first camera to obtain expanded internal parameters used in the first training.
- the random perturbation of the internal parameters of the first camera is performed, and the training module is specifically used to:
- the sub-parameters in the intrinsic parameters of the first camera are replaced with extended sub-parameters of the sub-parameters.
- the training module is used to:
- the dedistorted image is processed based on the extended internal parameters to obtain the sample image.
- this application also provides a target detection device 1000, which is used in the process of detecting target objects using the target detection model obtained by the training device 900.
- the target detection device 1000 includes:
- the image to be detected acquisition module 1001 is used to acquire the image to be detected collected by a monocular camera and the internal parameters of the monocular camera;
- the two-dimensional information acquisition module 1002 is used to detect the image to be detected and obtain the two-dimensional position information and depth information of the target object in the coordinate system of the image to be detected;
- the three-dimensional information determination module 1003 is used to perform coordinate transformation on the two-dimensional position information and the depth information according to the internal parameters of the monocular camera to obtain the three-dimensional position information of the target object in the monocular camera coordinate system. .
- this application provides a chip system, including: a memory for storing a computer program; a processor; when the processor calls and runs the computer program from the memory, it causes the electronic device installed with the chip system to execute The training method or the target detection method of any of the target detection models described in this application.
- this application provides a computer program product containing instructions that, when run on a computer, causes the computer to execute any of the target detection model training methods or target detection methods described in this application.
- this application provides a computer-readable storage medium, including instructions.
- the instructions When the instructions are run on a computer, the computer executes any of the training methods or target detection methods of the target detection model described in this application. .
- inventions of the present application also provide an electronic device.
- the electronic device may have a structure as shown in Figure 11.
- the electronic device may be a computer device or a chip that can support the computer device to implement the above method. or system-on-a-chip.
- the electronic device 1100 shown in Figure 11 may include at least one processor 1101, which is configured to be coupled with a memory, read and execute instructions in the memory to implement the target detection model of the embodiment of the present application. The steps of a training method or an object detection method.
- the electronic device may also include a communication interface 1102 for supporting the electronic device to receive or send signaling or data.
- the communication interface 1102 in the electronic device can be used to interact with other electronic devices.
- the processor 1101 may be used to implement the electronic device to perform the steps in the method shown in any one of Figures 5-7.
- the electronic device may also include a memory 1103 in which computer instructions are stored.
- the memory 1103 may be coupled with the processor 1101 and/or the communication interface 1102 to support the processor 1001 in calling the computer instructions in the memory 1103 to implement Steps in the method shown in any one of Figures 5-7;
- the memory 1103 can also be used to store data involved in the method embodiments of the present application, for example, used to store data necessary to support the communication interface 1002 to implement interaction.
- Embodiments of the present application also provide a computer-readable storage medium.
- Computer instructions are stored on the computer-readable storage medium. When these computer instructions are called and executed by a computer, they can cause the computer to complete any one of the above method embodiments and method embodiments. methods involved in possible designs.
- the computer-readable storage medium is not limited. For example, it may be RAM (random-access memory), ROM (read-only memory), etc.
- the above embodiments it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
- software it may be implemented in whole or in part in the form of computer instructions.
- the computer instructions When the computer instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber) or wireless (such as infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data electronic device such as a server or data center integrated with one or more available media.
- the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), etc.
- the steps of the method or algorithm described in the embodiments of this application can be directly embedded in hardware, a software unit executed by a processor, or a combination of the two.
- the software unit may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, register, hard disk, removable disk, CD-ROM or any other form of storage medium in the art.
- the storage medium can be connected to the processor, so that the processor can read information from the storage medium and can store and write information to the storage medium.
- the storage medium can also be integrated into the processor.
- the processor and the storage medium can be installed in the ASIC, and the ASIC can be installed in the terminal device.
- the processor and the storage medium may also be provided in different components in the terminal device.
- These computer instructions may also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on the computer or other programmable device to produce computer-implemented processes, thereby causing the instructions to execute on the computer or other programmable device
- steps for implementing the functionality specified in a process or processes in a flow diagram and/or in a block or blocks in a block diagram are also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on the computer or other programmable device to produce computer-implemented processes, thereby causing the instructions to execute on the computer or other programmable device.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
Description
Claims (18)
- 一种目标检测模型的训练方法,其特征在于,包括:获取至少一个单目相机的内参以及所述至少一个单目相机采集的图像;根据第一相机的内参和所述第一相机采集的图像,对目标检测模型进行N次训练,所述第一相机为所述至少一个单目相机中的任意一个,所述N为大于1的整数;其中,所述N次训练中包括至少一次第一训练,所述第一训练包括以下步骤:对所述第一相机的内参进行变换,得到所述第一训练使用的扩展内参;根据所述第一相机的内参和所述扩展内参对所述第一相机采集的图像进行几何变换,得到所述第一训练使用的样本图像,将目标对象在所述第一相机采集的图像中的三维位置信息作为所述目标对象在所述样本图像中的标注位置信息;使用所述目标检测模型对所述样本图像进行检测,得到所述目标对象在所述样本图像坐标系下的第一二维位置信息和第一深度信息;根据所述扩展内参对所述第一二维位置信息和所述第一深度信息进行坐标变换,得到所述目标对象在所述扩展内参对应的相机坐标系下的第一三维位置信息;根据所述第一三维位置信息与所述标注位置信息的差异,对所述目标检测模型进行参数调整。
- 根据权利要求1所述的方法,其特征在于,所述N次训练中包括至少一次第二训练,所述第二训练包括以下步骤:使用所述目标检测模型对所述第一相机采集的图像进行检测,得到所述目标对象在所述第一相机采集的图像的图像坐标系下的第二二维位置信息和第二深度信息;根据所述第一相机的内参对所述第二二维位置信息和所述第二深度信息进行坐标变换,得到所述目标对象在所述第一相机坐标系下的第二三维位置信息;根据所述第二三维位置信息与所述标注位置信息的差异,对所述目标检测模型进行参数调整。
- 根据权利要求1或2所述的方法,其特征在于,若所述N次训练中的S次第一训练对所述第一相机的内参进行了变换,则所述S次第一训练中每次训练时变换得到的扩展内参均不同,S为小于或等于N的整数。
- 根据权利要求1-3中任一所述的方法,其特征在于,所述对所述第一相机的内参进行变换,得到所述第一训练使用的扩展内参,包括:对所述第一相机的内参进行随机扰动,得到所述第一训练使用的扩展内参。
- 根据权利要求4所述的方法,其特征在于,所述对所述第一相机的内参进行随机扰动,包括:针对所述第一相机的内参中的子参数,以所述子参数为中心构建正态分布曲线;在以所述子参数为中心的指定范围内、从所述正态分布曲线上获取一个点,将获取的点作为所述子参数的扩展子参数;用所述子参数的扩展子参数替换所述第一相机的内参中的所述子参数。
- 根据权利要求1-5中任一项所述的方法,其特征在于,所述根据所述第一相机的内参和所述扩展内参对所述第一相机采集的图像进行几何变换,得到所述第一训练使用的样本图像,包括:基于所述第一相机的内参和所述第一相机的畸变系数对所述第一相机采集的图像进行去畸变,得到去畸变后的图像;基于所述扩展内参对所述去畸变后的图像进行处理,得到所述样本图像。
- 一种目标检测方法,其特征在于,应用于如权利要求1-6中任一项所述的方法训练得到的目标检测模型对目标对象进行检测的过程,所述方法包括:获取单目相机采集的待检测图像以及所述单目相机的内参;对所述待检测图像进行检测,得到目标对象在所述待检测图像坐标系中的二维位置信息和深度信息;根据所述单目相机的内参对所述二维位置信息和所述深度信息进行坐标变换,得到所述目标对象在所述单目相机坐标系下的三维位置信息。
- 一种目标检测模型的训练装置,其特征在于,包括:信息获取模块,用于获取至少一个单目相机的内参以及所述至少一个单目相机采集的图像;训练模块,用于根据第一相机的内参和所述第一相机采集的图像,对目标检测模型进行N次训练,所述第一相机为所述至少一个单目相机中的任意一个,所述N为大于1的整数;其中,所述N次训练中包括至少一次第一训练,所述第一训练包括以下步骤:对所述第一相机的内参进行变换,得到所述第一训练使用的扩展内参;根据所述第一相机的内参和所述扩展内参对所述第一相机采集的图像进行几何变换,得到所述第一训练使用的样本图像,将目标对象在所述第一相机采集的图像中的三维位置信息作为所述目标对象在所述样本图像中的标注位置信息;使用所述目标检测模型对所述样本图像进行检测,得到所述目标对象在所述样本图像坐标系下的第一二维位置信息和第一深度信息;根据所述扩展内参对所述第一二维位置信息和所述第一深度信息进行坐标变换,得到所述目标对象在所述扩展内参对应的相机坐标系下的第一三维位置信息;根据所述第一三维位置信息与所述标注位置信息的差异,对所述目标检测模型进行参数调整。
- 根据权利要求8所述的装置,其特征在于,所述训练模块,还用于在所述N次训练中执行至少一次第二训练,所述第二训练包括以下步骤:使用所述目标检测模型对所述第一相机采集的图像进行检测,得到所述目标对象在所述第一相机采集的图像的图像坐标系下的第二二维位置信息和第二深度信息;根据所述第一相机的内参对所述第二二维位置信息和所述第二深度信息进行坐标变换,得到所述目标对象在所述第一相机坐标系下的第二三维位置信息;根据所述第二三维位置信息与所述标注位置信息的差异,对所述目标检测模型进行参数调整。
- 根据权利要求8或9所述的装置,其特征在于,若所述N次训练中的S次第一训练对所述第一相机的内参进行了变换,则所述S次第一训练中每次训练时变换得到的扩展内参均不同,S为小于或等于N的整数。
- 根据权利要求8-10中任一所述的装置,其特征在于,所述训练模块,用于对所述第一相机的内参进行随机扰动,得到所述第一训练使用的扩展内参。
- 根据权利要求11所述的装置,其特征在于,执行所述对所述第一相机的内参进行随机扰动,所述训练模块具体用于:针对所述第一相机的内参中的子参数,以所述子参数为中心构建正态分布曲线;在以所述子参数为中心的指定范围内、从所述正态分布曲线上获取一个点,将获取的点作为所述子参数的扩展子参数;用所述子参数的扩展子参数替换所述第一相机的内参中的所述子参数。
- 根据权利要求8-12中任一项所述的装置,其特征在于,所述训练模块用于:基于所述第一相机的内参和所述第一相机的畸变系数对所述第一相机采集的图像进行去畸变,得到去畸变后的图像;基于所述扩展内参对所述去畸变后的图像进行处理,得到所述样本图像。
- 一种目标检测装置,其特征在于,应用于如权利要求8-13中任一项所述的装置得到的目标检测模型对目标对象进行检测的过程,所述装置包括:待检测图像获取模块,用于获取单目相机采集的待检测图像以及所述单目相机的内参;二维信息获取模块,用于对所述待检测图像进行检测,得到目标对象在所述待检测图像坐标系中的二维位置信息和深度信息;三维信息确定模块,用于根据所述单目相机的内参对所述二维位置信息和所述深度信息进行坐标变换,得到所述目标对象在所述单目相机坐标系下的三维位置信息。
- 一种芯片系统,其特征在于,包括:存储器,用于存储计算机程序;处理器;当处理器从存储器中调用并运行计算机程序后,使得安装有该芯片系统的电子设备执行如权利要求1-7中任一项所述的方法。
- 一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得所述计算机执行如权利要求1-7中任一项所述的方法。
- 一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1-7中任一项所述的方法。
- 一种电子设备,其特征在于,包括:存储器,用于存储可读程序;至少一个处理器,用于从所述存储器中调用并运行所述可读程序,使得所述通信装置实现如权利要求1~7中任一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202280005788.8A CN117280385B (zh) | 2022-04-22 | 2022-04-22 | 目标检测模型的训练方法、目标检测方法及装置 |
| PCT/CN2022/088566 WO2023201723A1 (zh) | 2022-04-22 | 2022-04-22 | 目标检测模型的训练方法、目标检测方法及装置 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2022/088566 WO2023201723A1 (zh) | 2022-04-22 | 2022-04-22 | 目标检测模型的训练方法、目标检测方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023201723A1 true WO2023201723A1 (zh) | 2023-10-26 |
Family
ID=88418973
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/088566 Ceased WO2023201723A1 (zh) | 2022-04-22 | 2022-04-22 | 目标检测模型的训练方法、目标检测方法及装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN117280385B (zh) |
| WO (1) | WO2023201723A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118096690A (zh) * | 2024-02-27 | 2024-05-28 | 深圳市纬尔科技有限公司 | 一种漏苗检测和定位的方法、设备及存储介质 |
| CN118537406A (zh) * | 2024-05-31 | 2024-08-23 | 深圳市纬尔科技有限公司 | 一种农作物根茎顶芽侧枝区分方法、设备及存储介质 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014178969A (ja) * | 2013-03-15 | 2014-09-25 | Nec Solution Innovators Ltd | 情報処理装置及び判定方法 |
| CN112668460A (zh) * | 2020-12-25 | 2021-04-16 | 北京百度网讯科技有限公司 | 目标检测方法、电子设备、路侧设备和云控平台 |
| CN113128434A (zh) * | 2021-04-27 | 2021-07-16 | 南京大学 | 一种对单目rgb图像进行3d目标检测的方法 |
| CN113947768A (zh) * | 2021-10-15 | 2022-01-18 | 京东鲲鹏(江苏)科技有限公司 | 一种基于单目3d目标检测的数据增强方法和装置 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110310315A (zh) * | 2018-03-21 | 2019-10-08 | 北京猎户星空科技有限公司 | 网络模型训练方法、装置及物体位姿确定方法、装置 |
| CN110473262A (zh) * | 2019-08-22 | 2019-11-19 | 北京双髻鲨科技有限公司 | 多目相机的外参标定方法、装置、存储介质及电子设备 |
| CN111126269B (zh) * | 2019-12-24 | 2022-09-30 | 京东科技控股股份有限公司 | 三维目标检测方法、装置以及存储介质 |
| CN113992861B (zh) * | 2020-07-27 | 2023-07-21 | 虹软科技股份有限公司 | 一种图像处理方法及图像处理装置 |
| CN112883790A (zh) * | 2021-01-15 | 2021-06-01 | 惠州市德赛西威汽车电子股份有限公司 | 一种基于单目摄像头的3d物体检测方法 |
-
2022
- 2022-04-22 WO PCT/CN2022/088566 patent/WO2023201723A1/zh not_active Ceased
- 2022-04-22 CN CN202280005788.8A patent/CN117280385B/zh active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014178969A (ja) * | 2013-03-15 | 2014-09-25 | Nec Solution Innovators Ltd | 情報処理装置及び判定方法 |
| CN112668460A (zh) * | 2020-12-25 | 2021-04-16 | 北京百度网讯科技有限公司 | 目标检测方法、电子设备、路侧设备和云控平台 |
| CN113128434A (zh) * | 2021-04-27 | 2021-07-16 | 南京大学 | 一种对单目rgb图像进行3d目标检测的方法 |
| CN113947768A (zh) * | 2021-10-15 | 2022-01-18 | 京东鲲鹏(江苏)科技有限公司 | 一种基于单目3d目标检测的数据增强方法和装置 |
Non-Patent Citations (2)
| Title |
|---|
| HUANG GUO-SHING, YU-YONG TSENG: "Application of Stereo Vision 3D Target Recognition Using Camera Calibration Algorithm", PROCEEDINGS OF THE 2015 AASRI INTERNATIONAL CONFERENCE ON CIRCUITS AND SYSTEMS, 31 August 2015 (2015-08-31), pages 381 - 385, XP093102170 * |
| R. TSAI: "A versatile camera calibration technique for high-accuracy 3D machine vision metrology using off-the-shelf TV cameras and lenses", IEEE JOURNAL ON ROBOTICS AND AUTOMATION, IEEE, USA, vol. 3, no. 4, 1 August 1987 (1987-08-01), USA , pages 323 - 344, XP011217413, ISSN: 0882-4967, DOI: 10.1109/JRA.1987.1087109 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118096690A (zh) * | 2024-02-27 | 2024-05-28 | 深圳市纬尔科技有限公司 | 一种漏苗检测和定位的方法、设备及存储介质 |
| CN118537406A (zh) * | 2024-05-31 | 2024-08-23 | 深圳市纬尔科技有限公司 | 一种农作物根茎顶芽侧枝区分方法、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117280385A (zh) | 2023-12-22 |
| CN117280385B (zh) | 2026-01-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102126724B1 (ko) | 포인트 클라우드 데이터를 복구하기 위한 방법 및 장치 | |
| CN111797650B (zh) | 障碍物的识别方法、装置、计算机设备和存储介质 | |
| US8452081B2 (en) | Forming 3D models using multiple images | |
| CN110148179A (zh) | 一种训练用于估计图像视差图的神经网络模型方法、装置及介质 | |
| US20210144357A1 (en) | Method and apparatus with depth image generation | |
| CN109902637A (zh) | 车道线检测方法、装置、计算机设备和存储介质 | |
| US10853960B2 (en) | Stereo matching method and apparatus | |
| CN107230225A (zh) | 三维重建的方法和装置 | |
| WO2020215257A1 (zh) | 图像立体匹配的方法和辅助驾驶装置 | |
| WO2023201723A1 (zh) | 目标检测模型的训练方法、目标检测方法及装置 | |
| WO2022110862A1 (zh) | 地面导向箭头的构建方法及其装置、电子设备及存储介质 | |
| CN110231832B (zh) | 用于无人机的避障方法和避障装置 | |
| WO2022205663A1 (zh) | 神经网络训练、目标对象检测、行驶控制方法及装置 | |
| CN116563384A (zh) | 一种图像采集装置标定方法、设备及计算机设备 | |
| CN109520480A (zh) | 基于双目立体视觉的测距方法及测距系统 | |
| CN114937088A (zh) | 一种摄像设备标定方法、训练方法、图像处理方法及装置 | |
| CN114119748B (zh) | 一种车载环视相机的安装位姿确定方法和装置 | |
| CN108564604B (zh) | 基于平面约束和三角剖分的双目视觉立体匹配方法及装置 | |
| CN113436269A (zh) | 图像稠密立体匹配方法、装置和计算机设备 | |
| CN115830143A (zh) | 联合标定参数调整方法、装置、计算机设备和存储介质 | |
| CN120070210B (zh) | 多模态图像的融合方法、装置、计算机设备及存储介质 | |
| TWI571099B (zh) | 深度估測裝置及方法 | |
| JP2014175782A (ja) | カメラパラメータ推定装置及びカメラパラメータ推定方法並びにカメラパラメータ推定プログラム | |
| CN103617622A (zh) | 一种位姿估计的正交迭代优化算法 | |
| CN120125635A (zh) | 深度先验引导的多视图立体三维重建方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 17759278 Country of ref document: US |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202280005788.8 Country of ref document: CN |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22937959 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22937959 Country of ref document: EP Kind code of ref document: A1 |
|
| WWG | Wipo information: grant in national office |
Ref document number: 17759278 Country of ref document: US |






