Bird-eye view target detection method and device based on spherical coordinate system, and storage medium
By projecting the first plane image to the spherical coordinate system and not using the internal and external parameters of the camera of the acquisition device during target detection, the problem of the BEV model being sensitive to internal and external parameters is solved, and the generalization ability and adaptability of target detection are improved, achieving for accurate target detection across different devices.
Patent Information
- Application Number
- CN202410674417.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the target detection algorithm of the BEV model is very sensitive to the internal and external parameters of the camera of the acquisition device, resulting in low generalization ability and difficulty in adapting between different devices, and it is difficult to achieve consistent internal and external parameters of the camera during training and deployment. This results in poor target detection results.
By projecting the first plane image to the spherical coordinate system, a spherical image is obtained, and the camera internal and external parameters of the acquisition device are not used during target detection. The BEV model is used for target detection, which improves the generalization ability of the image and reduces the internal and external parameters of the camera. Dependence on ginseng.
The target detection generalization ability of the BEV model is improved, so that images collected by devices with different camera internal and external parameters can accurately detect targets from a bird's-eye view, reducing development and adaptation costs and simplifying the model training process.
Smart Images

Figure CN118628994A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a method, device and storage medium for detecting a target from a bird's-eye view based on a spherical coordinate system. Background Art
[0002] Bird's Eye View (BEV) is a perspective of viewing an object or scene from above, just like a bird looking down at the ground from the air. In the field of autonomous driving, data obtained by sensors (such as LiDAR and cameras) can be converted into a bird's eye view so that vehicles or roadside equipment can better perform tasks such as target detection and path planning. Summary of the invention
[0003] The present disclosure provides a bird's-eye view target detection method, device and storage medium based on a spherical coordinate system to solve or alleviate one or more technical problems in the prior art.
[0004] On the one hand, the present disclosure provides a bird's-eye view target detection method based on a spherical coordinate system, comprising:
[0005] Based on the camera internal and external parameters of the acquisition device, project the first plane image into a spherical coordinate system to obtain a spherical image, wherein the first plane image is acquired by the acquisition device;
[0006] converting the spherical image into a second planar image;
[0007] The BEV model is used to perform target detection on the second plane image to obtain a target detection result of the first plane image from a bird's-eye view.
[0008] On the other hand, the present disclosure provides a bird's-eye view target detection device based on a spherical coordinate system, comprising:
[0009] A projection module, configured to project a first plane image to a spherical coordinate system based on camera internal and external parameters of an acquisition device to obtain a spherical image, wherein the first plane image is acquired by the acquisition device;
[0010] A conversion module, used for converting the spherical image into a second plane image;
[0011] The target detection module is used to perform target detection on the second plane image by using the BEV model to obtain the target detection result of the first plane image from a bird's-eye view.
[0012] In another aspect, the present disclosure provides an electronic device, comprising:
[0013] At least one processor. And
[0014] A memory in communication with the at least one processor.
[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any embodiment of the present disclosure.
[0016] On the other hand, the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any embodiment of the present disclosure.
[0017] On the other hand, the present disclosure provides a computer program product, including a computer program, which implements the method according to any embodiment of the present disclosure when executed by a processor.
[0018] According to the solution disclosed in the present invention, the target detection process of the BEV model for images can be made unaffected by the camera internal and external parameters of the acquisition device, thereby improving the generalization ability of the BEV model for target detection on images.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments provided according to the present disclosure and should not be regarded as limiting the scope of the present disclosure.
[0021] Figure 1 It is a flowchart of a target detection method based on a spherical coordinate system from a bird's-eye view according to an embodiment of the present disclosure.
[0022] Figure 2 It is a schematic diagram of the application of the bird's-eye view target detection method based on the spherical coordinate system according to an embodiment of the present disclosure.
[0023] Figure 3 It is a schematic diagram of the application of the bird's-eye view target detection method based on the spherical coordinate system according to an embodiment of the present disclosure.
[0024] Figure 4 It is a schematic diagram of the application of the bird's-eye view target detection method based on the spherical coordinate system according to an embodiment of the present disclosure.
[0025] Figure 5 4 is a schematic diagram of a bird's-eye view target detection device based on a spherical coordinate system according to an embodiment of the present disclosure.
[0026] Figure 6 It is a block diagram of an electronic device used to implement the bird's-eye view target detection method based on a spherical coordinate system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] The present disclosure will be further described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0028] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0029] like Figure 1 As shown, the embodiment of the present disclosure provides a bird's-eye view target detection method based on a spherical coordinate system, including:
[0030] Step S101: Based on the camera internal and external parameters of the acquisition device, a first plane image is projected into a spherical coordinate system to obtain a spherical image, wherein the first plane image is acquired by the acquisition device.
[0031] Step S102: converting the spherical image into a second planar image.
[0032] Step S103: Use the BEV model to perform target detection on the second plane image to obtain the target detection result of the first plane image from a bird's-eye view.
[0033] According to the embodiments of the present disclosure, it should be noted that:
[0034] The technical solution of the embodiment of the present disclosure can be applied to vehicles and roadside equipment. Figure 2 As shown, when the technical solution of the embodiment of the present disclosure is applied to vehicle A, the acquisition device may be a camera or sensor mounted on the vehicle, and the camera or sensor on vehicle A may be used to collect environmental information (first plane image) around vehicle A, and then the built-in controller, processor or connected cloud server of vehicle A executes steps S101 to S103 of the embodiment of the present disclosure. Figure 3As shown, when the technical solution of the embodiment of the present disclosure is applied to the roadside device B, the collection device can be a camera or sensor of the roadside device B. The environmental information of the road (first plane image) can be collected through the camera or sensor of the roadside device B, and then the built-in controller, processor or connected cloud server of the roadside device B executes steps S101 to S103 of the embodiment of the present disclosure.
[0035] The camera intrinsic and extrinsic parameters of the acquisition device can be understood as the camera intrinsic and extrinsic parameters of the acquisition device itself for acquiring the first plane image.
[0036] When the first plane image is projected into the spherical coordinate system, it is necessary to ensure that the focus of the acquisition device coincides with the center of the spherical coordinate system (the origin of the coordinate system).
[0037] The second plane image can be understood as a plane image obtained by flattening the curved surface image (spherical image).
[0038] The BEV model can adopt any model in the prior art, and can realize converting a plane image into a bird's-eye view (or fusing multiple plane images into a bird's-eye view), and performing target detection from the perspective of the bird's-eye view.
[0039] When the BEV model of the embodiment of the present disclosure performs target detection, it is not necessary to input the camera intrinsic and extrinsic parameters of the acquisition device that acquires the first plane image. In this case, the function of calculating the camera intrinsic and extrinsic parameters in the BEV model can be turned off. Alternatively, it is only necessary to input a camera intrinsic and extrinsic parameter constant (fixed value), which has no association with the acquisition device that acquires the first plane image and can be any pre-set value.
[0040] In the prior art, the target detection algorithm using the BEV model is a core algorithm in the field of autonomous driving. The BEV model in the algorithm uses camera internal and external parameters to convert images and BEV views to each other. This conversion will cause the BEV model to be strongly correlated with the camera internal and external parameters used for training, resulting in low generalization ability of the BEV model. That is, if the camera internal and external parameter training data used to train the BEV model is inconsistent with the camera internal and external parameters of the acquisition device in actual application, the BEV model cannot perform target detection well, or even cannot be used. In order to solve the above problems, one solution in the industry is to ensure that the camera internal and external parameters used as training data are consistent with the camera internal and external parameters of the acquisition device actually deployed and applied. However, this solution is difficult to implement in actual engineering deployment, and it is difficult to ensure that the camera internal and external parameters of the deployed acquisition device and the acquisition device used to train the BEV model are consistent. Another solution in the industry is to use a large number of different camera internal and external parameters as training data when training the BEV model. Although this solution can solve the generalization problem of the BEV model to a certain extent, it requires a lot of manpower, material resources and time for model training, which is difficult to implement under limited resources.
[0041] In view of the above problems, the technical solution of the embodiment of the present disclosure can effectively solve them. Specifically, the camera internal and external parameters of the acquisition device are only used when projecting to the spherical coordinate system to obtain a spherical image, and are not used when using the BEV model for target detection. Therefore, the wooden plaque detection process of the BEV model for the second plane image can be unaffected by the camera internal and external parameters of the acquisition device, solving the problem that the camera internal and external parameters of the acquisition device are strongly correlated with the BEV model, making the BEV model no longer sensitive to the camera internal and external parameters, and improving the generalization ability of the target detection algorithm based on the BEV model. That is, in practical applications, the first plane image acquired by the acquisition device with different camera internal and external parameters is first projected to the same spherical coordinate system, which is equivalent to normalizing the different camera internal and external parameters. No matter what kind of camera internal and external parameters, the first plane image acquired by the acquisition device is input into BEV and has nothing to do with the camera internal and external parameters, so that even if the BEV model does not use the same camera internal and external parameters as training data during training, it can accurately obtain the target detection result of the first plane image acquired by the acquisition device under the bird's-eye view. In particular, in the scenario where images collected by multiple acquisition devices are fused to generate BEV views and target detection is performed, even if the camera internal and external parameters of the multiple acquisition devices are different, and the camera internal and external parameter training data used in BEV model training is different, it will not affect the target detection process of the BEV model. The technical solution of the disclosed embodiment can be applied to the camera perception module of an autonomous vehicle, reducing the problem of increased difficulty in adapting the perception algorithm caused by different camera internal and external parameters of different models, and can effectively save the development time and adaptation cost of the target detection algorithm based on the BEV model.
[0042] In one implementation, the bird's-eye view target detection method based on a spherical coordinate system of an embodiment of the present disclosure includes steps S101 to S103, wherein step S101: based on the camera internal and external parameters of the acquisition device, projecting the first plane image to the spherical coordinate system to obtain a spherical image includes:
[0043] Step S1011: Determine the pixel coordinates of each pixel point of the first plane image according to the camera intrinsic parameters and camera extrinsic parameters of the acquisition device.
[0044] Step S1012: Determine the longitude and latitude of each pixel point according to the camera intrinsic parameters, camera extrinsic parameters and the pixel coordinates of each pixel point.
[0045] Step S1013: projecting the first plane image to a spherical coordinate system according to the longitude and latitude of each pixel point to obtain a spherical image.
[0046] According to the embodiments of the present disclosure, it should be noted that:
[0047] Step S1012 may be calculated using any conversion relationship between a rectangular coordinate system and a spherical coordinate system in the prior art, which is not specifically limited herein.
[0048] According to the technology of the embodiments of the present disclosure, the first plane images collected by the acquisition devices with different camera internal and external parameters are first projected into the same spherical coordinate system, which is equivalent to normalizing the different camera internal and external parameters. No matter what kind of camera internal and external parameters the first plane images collected by the acquisition device are input into BEV, it has nothing to do with the camera internal and external parameters, so that even if the BEV model does not use the same camera internal and external parameters as training data during training, it can accurately obtain the target detection results of the first plane image collected by the acquisition device under the bird's-eye view. In particular, in the scenario where images collected by multiple acquisition devices are fused to generate BEV views and perform target detection, even if the camera internal and external parameters of multiple acquisition devices are different, and are different from the camera internal and external parameter training data used when training the BEV model, it will not affect the target detection process of the BEV model.
[0049] In one implementation, the bird's-eye view target detection method based on the spherical coordinate system of the embodiment of the present disclosure includes steps S101 to S103, and steps S1011 to S1013, wherein step S1011: determining the pixel coordinates of each pixel point of the first plane image according to the camera intrinsic parameters and camera extrinsic parameters of the acquisition device, includes:
[0050] Determine the roll angle of the acquisition device according to the camera extrinsic parameters of the acquisition device.
[0051] According to the camera internal parameters of the acquisition device, the horizontal pixel deviation u0 and the vertical pixel deviation v0 of the acquisition device are determined.
[0052] The pixel coordinates of each pixel point of the first plane image are determined according to the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0.
[0053] According to the embodiments of the present disclosure, it should be noted that:
[0054] According to the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0, the pixel coordinates of each pixel point of the first plane image are determined, which can be understood as: when the acquisition device has one or more of the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0, it is necessary to calculate the actual pixel coordinate value based on the theoretical pixel coordinate value of the pixel point of the first plane image to ensure the accuracy of the spherical image obtained by projecting the first plane image onto the spherical coordinate system. Among them, there are the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0, which can be understood as the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0 are usually 0 or a threshold value. When a change occurs, it is considered that there is a roll angle, a lateral pixel deviation u0 and a longitudinal pixel deviation v0.
[0055] According to the technology of the embodiments of the present disclosure, the actual pixel coordinate value of each pixel point of the accurate first plane image can be obtained based on the camera intrinsic parameters and camera extrinsic parameters of the acquisition device.
[0056] In one example, when the acquisition device has a roll angle, a lateral pixel deviation u0, and a longitudinal pixel deviation v0 at the same time, that is, the theoretical pixel coordinate value needs to be translated and rotated, so the actual lateral pixel coordinates and longitudinal pixel coordinates of the pixel point of the first plane image need to be calculated. Specifically: according to the theoretical lateral pixel coordinates of the pixel point, the theoretical longitudinal pixel coordinates, the roll angle, and the lateral pixel deviation u0, the actual lateral pixel coordinates are determined. And, according to the theoretical lateral pixel coordinates of the pixel point, the theoretical longitudinal pixel coordinates, the roll angle, and the longitudinal pixel deviation v0, the actual longitudinal pixel coordinates are determined. This process can be expressed by the following formula:
[0057] rotx=imx*cos(srx)–imy*sin(srx)+u0;
[0058] roty=imx*sin(srx)+imy*cos(srx)+v0;
[0059] Among them, rotx represents the actual horizontal pixel coordinate of the pixel point, roty represents the actual vertical pixel coordinate of the pixel point, imx represents the theoretical horizontal pixel coordinate of the pixel point, imy represents the theoretical vertical pixel coordinate of the pixel point, srx represents the roll angle of the camera extrinsic parameter, u0 represents the horizontal pixel deviation of the camera intrinsic parameter, and v0 represents the vertical pixel deviation of the camera intrinsic parameter.
[0060] In one example, when the acquisition device only has a roll angle, that is, the theoretical pixel coordinate value needs to be rotated, the actual horizontal pixel coordinate and the vertical pixel coordinate of the pixel point of the first plane image need to be calculated, specifically: according to the theoretical horizontal pixel coordinate of the pixel point, the theoretical vertical pixel coordinate and the roll angle, the actual horizontal pixel coordinate is determined. And, according to the theoretical horizontal pixel coordinate of the pixel point, the theoretical vertical pixel coordinate and the roll angle, the actual vertical pixel coordinate is determined.
[0061] The process can be expressed by the following formula:
[0062] rotx=imx*cos(srx)–imy*sin(srx);
[0063] roty=imx*sin(srx)+imy*cos(srx);
[0064] Among them, rotx represents the actual horizontal pixel coordinate of the pixel point, roty represents the actual vertical pixel coordinate of the pixel point, imx represents the theoretical horizontal pixel coordinate of the pixel point, imy represents the theoretical vertical pixel coordinate of the pixel point, and srx represents the roll angle of the camera extrinsic parameter.
[0065] In one example, when the acquisition device only has a horizontal pixel deviation u0 and a vertical pixel deviation v0, that is, the theoretical pixel coordinate value needs to be translated, so the actual horizontal pixel coordinates and vertical pixel coordinates of the pixel point of the first plane image need to be calculated. Specifically: according to the theoretical horizontal pixel coordinates of the pixel point and the horizontal pixel deviation u0, the actual horizontal pixel coordinates are determined. And, according to the theoretical vertical pixel coordinates of the pixel point and the vertical pixel deviation v0, the actual vertical pixel coordinates are determined. This process can be expressed by the following formula:
[0066] rotx=imx+u0;
[0067] roty=imy+v0;
[0068] Among them, rotx represents the actual horizontal pixel coordinate of the pixel point, roty represents the actual vertical pixel coordinate of the pixel point, imx represents the theoretical horizontal pixel coordinate of the pixel point, imy represents the theoretical vertical pixel coordinate of the pixel point, u0 represents the horizontal pixel deviation of the camera intrinsic parameter, and v0 represents the vertical pixel deviation of the camera intrinsic parameter.
[0069] In one implementation, the bird's-eye view target detection method based on the spherical coordinate system of the embodiment of the present disclosure includes steps S101 to S103, and steps S1011 to S1013, wherein step S1012: determining the longitude and latitude of each pixel point according to the camera intrinsic parameters, the camera extrinsic parameters and the pixel coordinates of each pixel point, includes:
[0070] The latitude of each pixel is determined according to the pitch angle in the camera extrinsic parameters, the first focal length fy in the camera intrinsic parameters, and the longitudinal pixel coordinates of each pixel.
[0071] The longitude of each pixel is determined according to the latitude, pitch angle, yaw angle in the camera extrinsic parameters, second focal length fx in the camera intrinsic parameters and the lateral pixel coordinates of each pixel.
[0072] According to the embodiments of the present disclosure, it should be noted that:
[0073] According to the pitch angle in the camera extrinsic parameters, the first focal length fy in the camera intrinsic parameters and the longitudinal pixel coordinates of each pixel, the latitude of each pixel is determined, which can be expressed by the following formula:
[0074] imy=fy*tan(theta-sry);
[0075] Among them, imy represents the theoretical longitudinal pixel coordinate of the pixel point, fy represents the first focal length in the camera intrinsic parameter, sry represents the pitch angle of the camera extrinsic parameter, and theta represents the dimension of the pixel point.
[0076] According to the latitude, pitch angle, yaw angle in the camera extrinsic parameters, second focal length fx in the camera intrinsic parameters and the horizontal pixel coordinates of each pixel, the longitude of each pixel is determined, which can be expressed by the following formula:
[0077] imx=fx / cos(theta-sry)*cos(theta)*tan(phi-srz);
[0078] Among them, imx represents the theoretical horizontal pixel coordinate of the pixel point, fx represents the second focal length in the camera intrinsic parameter, theta represents the dimension of the pixel point, sry represents the pitch angle of the camera extrinsic parameter, srz represents the yaw angle of the camera extrinsic parameter, and phi represents the longitude of the pixel point.
[0079] According to the technology of the embodiments of the present disclosure, the longitude and latitude of each pixel point in the first plane image can be accurately calculated by utilizing the camera internal and external parameters of the acquisition device and the theoretical horizontal and vertical pixel coordinates of each pixel point in the first plane image, so as to project the first plane image into a spherical coordinate system to obtain a spherical image.
[0080] In one implementation, the bird's-eye view target detection method based on a spherical coordinate system of the embodiment of the present disclosure includes steps S101 to S103, wherein step S102: converting a spherical image into a second plane image includes:
[0081] According to the boundary line of the preset projection plane, a first angle range of the preset projection plane along the longitude direction and a second angle range along the latitude direction are determined.
[0082] According to the grids divided in the preset projection plane, a third angle range of the boundary line of each grid along the meridian direction and a fourth angle range along the latitude direction are determined.
[0083] According to the first angle range, the second angle range, the third angle range, the fourth angle range and the longitude and latitude of each pixel point of the spherical image, the spherical image is projected onto a preset projection plane to obtain a second plane image.
[0084] According to the embodiments of the present disclosure, it should be noted that:
[0085] The preset projection plane includes boundary lines around it, and the preset projection plane is divided into a plurality of grids. The preset projection plane can define the coordinate system of the preset projection plane by longitude and latitude, and the boundary of each grid in the preset projection plane can define the angle range by longitude and latitude. Therefore, based on the longitude and latitude of each pixel point in the spherical image, each pixel point of the spherical image can be projected into the preset projection plane, thereby obtaining a second plane image.
[0086] According to the technology of the embodiment of the present disclosure, by presetting the projection plane, it is possible to convert the spherical image into a second plane image.
[0087] In one embodiment, the bird's-eye view target detection method based on the spherical coordinate system of the embodiment of the present disclosure includes steps S101 to S103, wherein step S103: using the BEV model to perform target detection on the second plane image to obtain the target detection result of the first plane image under the bird's-eye view, including:
[0088] Only the second plane image is input into the BEV model, so that the BEV model performs target detection on the second plane image only based on the image features of the second plane image, thereby obtaining the target detection result of the first plane image under the bird's-eye view.
[0089] According to the embodiments of the present disclosure, it should be noted that:
[0090] When the BEV model of the embodiment of the present disclosure performs target detection, it is not necessary to input the camera intrinsic and extrinsic parameters of the acquisition device that acquires the first plane image. In this case, the function of calculating the camera intrinsic and extrinsic parameters in the BEV model can be turned off.
[0091] According to the technology of the embodiments of the present disclosure, the camera internal and external parameters of the acquisition device are only used when projecting to the spherical coordinate system to obtain a spherical image, and are not used when using the BEV model for target detection. Therefore, the wooden plaque detection process of the BEV model for the second plane image is not affected by the camera internal and external parameters of the acquisition device, which solves the problem of strong correlation between the camera internal and external parameters of the acquisition device and the BEV model, making the BEV model no longer sensitive to the camera internal and external parameters, thereby improving the generalization ability of the target detection algorithm based on the BEV model.
[0092] In one embodiment, the bird's-eye view target detection method based on the spherical coordinate system of the embodiment of the present disclosure includes steps S101 to S103, wherein step S103: using the BEV model to perform target detection on the second plane image to obtain the target detection result of the first plane image under the bird's-eye view, including:
[0093] The second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant are input into the BEV model, so that the BEV model performs target detection on the second plane image based on the image features of the second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant, and obtains the target detection result of the first plane image from a bird's-eye view, wherein the camera intrinsic parameter constant and the camera extrinsic parameter constant are not associated with the acquisition device.
[0094] According to the embodiments of the present disclosure, it should be noted that:
[0095] It is only necessary to input a camera internal and external parameter constant (fixed value), which has no association with the acquisition device for acquiring the first plane image and can be any preset value.
[0096] According to the technology of the embodiments of the present disclosure, the camera internal and external parameters of the acquisition device are only used when projecting to the spherical coordinate system to obtain a spherical image, and are not used when using the BEV model for target detection. Therefore, the wooden plaque detection process of the BEV model for the second plane image is not affected by the camera internal and external parameters of the acquisition device, which solves the problem of strong correlation between the camera internal and external parameters of the acquisition device and the BEV model, making the BEV model no longer sensitive to the camera internal and external parameters, thereby improving the generalization ability of the target detection algorithm based on the BEV model.
[0097] In an application example, Figure 4 As shown, the first plane image captured by the acquisition device is first projected to a spherical coordinate system to obtain a spherical image, and then the second plane image is projected to a preset projection plane 300 to obtain a second plane image, and finally the second plane image is input into the BEV model for target detection.
[0098] Among them, 100 represents a cross-sectional view obtained by cutting the spherical coordinate system along the meridian, 200 represents a cross-sectional view obtained by cutting the spherical coordinate system along the latitude, and 300 represents a preset projection plane. The boundary line of the first plane image along the horizontal direction is represented by a dotted line, and the boundary line along the longitudinal direction is represented by a thick solid line. Accordingly, the straight line (thick solid line) indicated by the first plane image in the cross-sectional view 100 is the boundary line of the first plane image along the longitudinal direction, and the straight line in the form of a dotted line indicated by the first plane image in the cross-sectional view 200 is the boundary line of the first plane image along the horizontal direction. Accordingly, the boundary line of the spherical image in the preset projection plane 300 along the horizontal direction is represented by a dotted line, and the boundary line along the longitudinal direction is represented by a thick solid line. Accordingly, the arc line (thick solid line) in the cross-sectional view 100 is the spherical image obtained by projecting the first plane image onto the spherical coordinate system, and the arc line (dotted line) in the cross-sectional view 200 is the spherical image obtained by projecting the first plane image onto the spherical coordinate system.
[0099] For ease of understanding, Figure 4 As shown, the spherical coordinate system is cut along the meridian, and its cross section forms a circle 100. The straight line (thick solid line) is the cross section of the first plane image cut longitudinally. Take any radius line (such as a thin dotted line), and the intersection of the radius line and the straight line (thick solid line) is the longitudinal pixel coordinate of the pixel point (based on the pixel coordinate system), denoted as imy. The intersection with the sphere is the latitude value theta of the pixel point along the meridian direction of the spherical coordinate that needs to be required (that is, the angle b in the figure). Angle c is the angle between the acquisition device and the horizontal plane, denoted by the pitch angle of the acquisition device, f is the focal length of the acquisition device, and the focal length in the y-axis direction divided by the actual distance represented by each pixel is denoted as fy.
[0100] For ease of understanding, Figure 4 As shown, the spherical coordinate system is cut along any latitude, and its cross section forms a circle 200. At this time, the equivalent focal length f'=f / cos(theta-sry)*cos(theta). Among them, the straight line in the form of a dotted line is the cross section of the first plane image cut horizontally. At this time, e in the figure is the equivalent focal length f', and the angle d is the angle between the acquisition device and the east direction, recorded as srz (yaw angle). The intersection of the radius line and the straight line in the form of a dotted line is the horizontal pixel coordinate of the pixel point (based on the pixel coordinate system), recorded as imx. The angle a in the figure is the longitude value phi of the pixel point along the latitude direction of the spherical coordinate required, and the focal length in the x-axis direction divided by the actual distance represented by each pixel is recorded as fx.
[0101] like Figure 5 As shown, the embodiment of the present disclosure provides a bird's-eye view target detection device based on a spherical coordinate system, comprising:
[0102] The projection module 510 is used to project the first plane image to a spherical coordinate system based on the camera internal and external parameters of the acquisition device to obtain a spherical image, wherein the first plane image is acquired by the acquisition device.
[0103] The conversion module 520 is used to convert the spherical image into a second plane image.
[0104] The target detection module 530 is used to perform target detection on the second plane image using the BEV model to obtain the target detection result of the first plane image in a bird's-eye view.
[0105] In one embodiment, the projection module 510 includes:
[0106] The first determination submodule is used to determine the pixel coordinates of each pixel point of the first plane image according to the camera intrinsic parameters and camera extrinsic parameters of the acquisition device.
[0107] The second determination submodule is used to determine the longitude and latitude of each pixel point according to the camera intrinsic parameters, the camera extrinsic parameters and the pixel coordinates of each pixel point.
[0108] The projection submodule is used to project the first plane image to a spherical coordinate system according to the longitude and latitude of each pixel point to obtain a spherical image.
[0109] In the prior art, the target detection algorithm using the BEV model is a core algorithm in the field of autonomous driving. The BEV model in the algorithm uses camera internal and external parameters to convert images and BEV views to each other. This conversion will cause the BEV model to be strongly correlated with the camera internal and external parameters used for training, resulting in low generalization ability of the BEV model. That is, if the camera internal and external parameter training data used to train the BEV model is inconsistent with the camera internal and external parameters of the acquisition device in actual application, the BEV model cannot perform target detection well, or even cannot be used. In order to solve the above problems, one solution in the industry is to ensure that the camera internal and external parameters used as training data are consistent with the camera internal and external parameters of the acquisition device actually deployed and applied. However, this solution is difficult to implement in actual engineering deployment, and it is difficult to ensure that the camera internal and external parameters of the deployed acquisition device and the acquisition device used to train the BEV model are consistent. Another solution in the industry is to use a large number of different camera internal and external parameters as training data when training the BEV model. Although this solution can solve the generalization problem of the BEV model to a certain extent, it requires a lot of manpower, material resources and time for model training, which is difficult to implement under limited resources.
[0110] In view of the above problems, the technical solution of the embodiment of the present disclosure can effectively solve them. Specifically, the camera internal and external parameters of the acquisition device are only used when projecting to the spherical coordinate system to obtain a spherical image, and are not used when using the BEV model for target detection. Therefore, the wooden plaque detection process of the BEV model for the second plane image can be unaffected by the camera internal and external parameters of the acquisition device, solving the problem that the camera internal and external parameters of the acquisition device are strongly correlated with the BEV model, making the BEV model no longer sensitive to the camera internal and external parameters, and improving the generalization ability of the target detection algorithm based on the BEV model. That is, in practical applications, the first plane image acquired by the acquisition device with different camera internal and external parameters is first projected to the same spherical coordinate system, which is equivalent to normalizing the different camera internal and external parameters. No matter what kind of camera internal and external parameters, the first plane image acquired by the acquisition device is input into BEV and has nothing to do with the camera internal and external parameters, so that even if the BEV model does not use the same camera internal and external parameters as training data during training, it can accurately obtain the target detection result of the first plane image acquired by the acquisition device under the bird's-eye view. In particular, in the scenario where images collected by multiple acquisition devices are fused to generate BEV views and target detection is performed, even if the camera internal and external parameters of the multiple acquisition devices are different, and the camera internal and external parameter training data used in BEV model training is different, it will not affect the target detection process of the BEV model. The technical solution of the disclosed embodiment can be applied to the camera perception module of an autonomous vehicle, reducing the problem of increased difficulty in adapting the perception algorithm caused by different camera internal and external parameters of different models, and can effectively save the development time and adaptation cost of the target detection algorithm based on the BEV model.
[0111] In one implementation, the first determining submodule is used to:
[0112] Determine the roll angle of the acquisition device according to the camera extrinsic parameters of the acquisition device.
[0113] According to the camera internal parameters of the acquisition device, the horizontal pixel deviation u0 and the vertical pixel deviation v0 of the acquisition device are determined.
[0114] The pixel coordinates of each pixel point of the first plane image are determined according to the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0.
[0115] In one implementation, the second determining submodule is used to:
[0116] The latitude of each pixel is determined according to the pitch angle in the camera extrinsic parameters, the first focal length fy in the camera intrinsic parameters, and the longitudinal pixel coordinates of each pixel.
[0117] The longitude of each pixel is determined according to the latitude, pitch angle, yaw angle in the camera extrinsic parameters, second focal length fx in the camera intrinsic parameters and the lateral pixel coordinates of each pixel.
[0118] In one embodiment, the conversion module is used to:
[0119] According to the boundary line of the preset projection plane, a first angle range of the preset projection plane along the longitude direction and a second angle range along the latitude direction are determined.
[0120] According to the grids divided in the preset projection plane, a third angle range of the boundary line of each grid along the meridian direction and a fourth angle range along the latitude direction are determined.
[0121] According to the first angle range, the second angle range, the third angle range, the fourth angle range and the longitude and latitude of each pixel point of the spherical image, the spherical image is projected onto a preset projection plane to obtain a second plane image.
[0122] In one embodiment, the target detection module is used to:
[0123] Only the second plane image is input into the BEV model, so that the BEV model performs target detection on the second plane image only based on the image features of the second plane image, thereby obtaining the target detection result of the first plane image under the bird's-eye view.
[0124] or
[0125] The second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant are input into the BEV model, so that the BEV model performs target detection on the second plane image based on the image features of the second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant, and obtains the target detection result of the first plane image from a bird's-eye view, wherein the camera intrinsic parameter constant and the camera extrinsic parameter constant are not associated with the acquisition device.
[0126] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0127] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0128] Figure 6 FIG. 1 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Figure 6As shown, the electronic device includes: a memory 610 and a processor 620, and the memory 610 stores a computer program that can be run on the processor 620. The number of the memory 610 and the processor 620 can be one or more. The memory 610 can store one or more computer programs. When the one or more computer programs are executed by the electronic device, the electronic device executes the method provided by the above method embodiment. The electronic device may also include: a communication interface 630, which is used to communicate with external devices and perform data exchange transmission.
[0129] If the memory 610, the processor 620 and the communication interface 630 are implemented independently, the memory 610, the processor 620 and the communication interface 630 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0130] Optionally, in a specific implementation, if the memory 610, the processor 620 and the communication interface 630 are integrated on a chip, the memory 610, the processor 620 and the communication interface 630 can communicate with each other through an internal interface.
[0131] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.
[0132] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
[0133] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computer, the process or function according to the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (for example: infrared, Bluetooth, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by the computer, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc. It is worth noting that the computer-readable storage medium mentioned in the present disclosure may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0134] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0135] In the description of the embodiments of the present disclosure, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0136] In the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or, for example, A / B can mean A or B. "And / or" in this article is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0137] In the description of the embodiments of the present disclosure, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0138] The above description is only an exemplary embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A bird's-eye view target detection method based on a spherical coordinate system, comprising: Based on the camera internal and external parameters of the acquisition device, project the first plane image into a spherical coordinate system to obtain a spherical image, wherein the first plane image is acquired by the acquisition device; converting the spherical image into a second planar image; The BEV model is used to perform target detection on the second plane image to obtain a target detection result of the first plane image from a bird's-eye view.
2. The method according to claim 1, wherein: Based on the camera internal and external parameters of the acquisition device, the first plane image is projected into the spherical coordinate system to obtain a spherical image, including: Determine the pixel coordinates of each pixel point of the first plane image according to the camera intrinsic parameters and camera extrinsic parameters of the acquisition device; Determine the longitude and latitude of each pixel point according to the camera intrinsic parameter, the camera extrinsic parameter and the pixel coordinates of each pixel point; According to the longitude and latitude of each pixel point, the first plane image is projected onto a spherical coordinate system to obtain a spherical image.
3. The method according to claim 2, wherein: Determining the pixel coordinates of each pixel point of the first plane image according to the camera intrinsic parameters and camera extrinsic parameters of the acquisition device includes: Determining a roll angle of the acquisition device according to a camera extrinsic parameter of the acquisition device; Determine the horizontal pixel deviation u0 and the vertical pixel deviation v0 of the acquisition device according to the camera intrinsic parameters of the acquisition device; The pixel coordinates of each pixel point of the first plane image are determined according to the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0.
4. The method according to claim 2, wherein: Determining the longitude and latitude of each pixel point according to the camera intrinsic parameter, the camera extrinsic parameter, and the pixel coordinates of each pixel point includes: Determine the latitude of each pixel point according to the pitch angle in the camera extrinsic parameter, the first focal length fy in the camera intrinsic parameter, and the longitudinal pixel coordinate of each pixel point; The longitude of each pixel point is determined according to the latitude of each pixel point, the pitch angle, the yaw angle in the camera extrinsic parameters, the second focal length fx in the camera intrinsic parameters, and the lateral pixel coordinates of each pixel point.
5. The method according to any one of claims 1 to 4, wherein: Converting the spherical image into a second plane image comprises: Determine a first angle range of the preset projection plane along the longitude direction and a second angle range along the latitude direction according to the boundary line of the preset projection plane; According to the grids divided in the preset projection plane, determine a third angle range of the boundary line of each grid along the meridian direction and a fourth angle range along the latitude direction; According to the first angle range, the second angle range, the third angle range, the fourth angle range and the longitude and latitude of each pixel point of the spherical image, the spherical image is projected onto the preset projection plane to obtain a second plane image.
6. The method according to any one of claims 1 to 4, wherein: Performing target detection on the second plane image using the BEV model to obtain a target detection result of the first plane image from a bird's-eye view, including: Only the second plane image is input into the BEV model, so that the BEV model performs target detection on the second plane image based only on the image features of the second plane image, and obtains the target detection result of the first plane image in a bird's-eye view; or The second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant are input into the BEV model, so that the BEV model performs target detection on the second plane image based on the image features of the second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant, and obtains the target detection result of the first plane image from a bird's-eye view, wherein the camera intrinsic parameter constant and the camera extrinsic parameter constant are not associated with the acquisition device.
7. A bird's-eye view target detection device based on a spherical coordinate system, comprising: A projection module, configured to project a first plane image to a spherical coordinate system based on camera internal and external parameters of an acquisition device to obtain a spherical image, wherein the first plane image is acquired by the acquisition device; A conversion module, used for converting the spherical image into a second plane image; The target detection module is used to perform target detection on the second plane image by using the BEV model to obtain the target detection result of the first plane image from a bird's-eye view.
8. The device according to claim 7, wherein: The projection module comprises: A first determination submodule, used to determine the pixel coordinates of each pixel point of the first plane image according to the camera intrinsic parameters and camera extrinsic parameters of the acquisition device; A second determination submodule is used to determine the longitude and latitude of each pixel point according to the camera intrinsic parameter, the camera extrinsic parameter and the pixel coordinates of each pixel point; The projection submodule is used to project the first plane image to a spherical coordinate system according to the longitude and latitude of each pixel point to obtain a spherical image.
9. The device according to claim 8, wherein: The first determining submodule is used for: Determining a roll angle of the acquisition device according to a camera extrinsic parameter of the acquisition device; Determine the horizontal pixel deviation u0 and the vertical pixel deviation v0 of the acquisition device according to the camera intrinsic parameters of the acquisition device; The pixel coordinates of each pixel point of the first plane image are determined according to the roll angle, the lateral pixel deviation u0 and the longitudinal pixel deviation v0.
10. The device according to claim 8, wherein: The second determining submodule is used for: Determine the latitude of each pixel point according to the pitch angle in the camera extrinsic parameter, the first focal length fy in the camera intrinsic parameter, and the longitudinal pixel coordinate of each pixel point; The longitude of each pixel point is determined according to the latitude of each pixel point, the pitch angle, the yaw angle in the camera extrinsic parameters, the second focal length fx in the camera intrinsic parameters, and the lateral pixel coordinates of each pixel point.
11. The device according to any one of claims 7 to 10, wherein: The conversion module is used for: Determine a first angle range of the preset projection plane along the longitude direction and a second angle range along the latitude direction according to the boundary line of the preset projection plane; According to the grids divided in the preset projection plane, determine a third angle range of the boundary line of each grid along the meridian direction and a fourth angle range along the latitude direction; According to the first angle range, the second angle range, the third angle range, the fourth angle range and the longitude and latitude of each pixel point of the spherical image, the spherical image is projected onto the preset projection plane to obtain a second plane image.
12. The device according to any one of claims 7 to 10, wherein: The target detection module is used to: Only the second plane image is input into the BEV model, so that the BEV model performs target detection on the second plane image based only on the image features of the second plane image, and obtains the target detection result of the first plane image in a bird's-eye view; or The second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant are input into the BEV model, so that the BEV model performs target detection on the second plane image based on the image features of the second plane image, the camera intrinsic parameter constant and the camera extrinsic parameter constant, and obtains the target detection result of the first plane image from a bird's-eye view, wherein the camera intrinsic parameter constant and the camera extrinsic parameter constant are not associated with the acquisition device.
13. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
