Image detection method and device

By using camera intrinsic and extrinsic parameter information for feature extraction and mapping processing in the image detection method, the shortcomings in the generalization performance of the monocular roadside three-dimensional detection method are solved, and the adaptability to diverse scenes and detection accuracy are achieved. improvement.

CN118587696APending Publication Date: 2024-09-03LENOVO (BEIJING) LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410384686.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing monocular roadside 3D detection methods have shortcomings in generalization performance, especially depth estimation errors and poor scene adaptability due to the diversity of camera internal and external parameters, making it difficult to apply to diverse roadside scenes.

Method used

By obtaining the image to be detected containing camera internal and external parameter information, feature extraction and mapping processing are performed, and the attention mechanism and virtual coordinate system are used to normalize the image features to reduce the impact of camera parameters on the detection results, thereby improving detection accuracy. and generalization performance.

Benefits of technology

The generalization performance of the image detection method is improved, making it applicable to images with different camera internal and external parameters, and enhancing the adaptability and detection accuracy to diverse scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587696A
    Figure CN118587696A
Patent Text Reader

Abstract

The invention discloses an image detection method and device, and the method comprises the steps: obtaining a first to-be-detected image; wherein the first to-be-detected image has corresponding camera internal reference information and camera external reference information; based on the internal reference information of the camera, processing the first to-be-detected image to obtain a first feature map containing the internal reference information of the camera; mapping the first feature map into a second feature map based on the external parameter information of the camera; and determining at least one target identifier corresponding to the first to-be-detected image based on the second feature map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, but is not limited to, the field of computer technology, and in particular to an image detection method and device. Background Art

[0002] Intelligent transportation technology plays a vital role in helping to reduce traffic accidents and improve traffic efficiency.

[0003] At present, the perception system in intelligent transportation technology mainly equips mobile vehicles with lidar or on-board camera sensors. However, since the sensors installed on mobile vehicles are relatively low (usually on the top of the vehicle), the perception range is relatively limited and easily affected by occlusion, resulting in less than ideal perception of traffic conditions.

[0004] Roadside 3D object detection refers to the use of roadside cameras set up on the roadside to capture traffic images and detect 3D objects in the captured traffic images. Due to the high viewing angle of roadside cameras, images captured by roadside cameras have inherent advantages in occlusion robustness and long-term and large-scale prediction.

[0005] Improving the accuracy of roadside three-dimensional object detection is of great significance to intelligent transportation and autonomous driving technologies. Summary of the invention

[0006] In view of this, the present application at least provides an image detection method and device.

[0007] The technical solution of this application is implemented as follows:

[0008] In one aspect, the present application provides an image detection method, the method comprising:

[0009] Acquire a first image to be detected; wherein the first image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information;

[0010] Based on the camera intrinsic parameter information, the first image to be detected is processed to obtain a first feature map including the camera intrinsic parameter information;

[0011] Based on the camera extrinsic information, mapping the first feature map to a second feature map;

[0012] Based on the second feature map, at least one target identifier corresponding to the first image to be detected is determined.

[0013] In some embodiments, acquiring the first image to be detected includes:

[0014] Acquire a second image to be detected; wherein the second image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information;

[0015] Based on the camera intrinsic parameter information corresponding to the second image to be detected and the specified virtual camera intrinsic parameter information, the second image to be detected is normalized to generate the first image to be detected, and the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second image to be detected are used as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected.

[0016] In some embodiments, the first to-be-detected image is processed based on the camera intrinsic parameter information to obtain a first feature map containing the camera intrinsic parameter information, including:

[0017] Performing feature extraction on the first image to be detected to obtain a second feature map;

[0018] The second feature map is processed based on the camera intrinsic parameter information by utilizing an attention mechanism to obtain the first feature map.

[0019] In some embodiments, mapping the first feature map to a second feature map based on the camera extrinsic information includes:

[0020] Based on the camera extrinsic information, construct a virtual coordinate system;

[0021] Based on the virtual coordinate system, the first feature map is mapped to a second feature map in the virtual coordinate system.

[0022] In some embodiments, constructing a virtual coordinate system based on the camera extrinsic information includes:

[0023] Determine a ground equation corresponding to the first image to be detected based on the camera extrinsic information; wherein the camera extrinsic information and the ground equation have a specified mapping relationship; the ground equation is used to determine the position information of ground pixels in the first image to be detected;

[0024] Based on the ground equation, determining ground information of the ground in the first to-be-detected image;

[0025] The virtual coordinate system is constructed based on the ground information.

[0026] In some embodiments, the ground information includes coordinate information of the ground in a camera coordinate system; the second feature map includes a plurality of pixel points in a virtual coordinate system;

[0027] The mapping the first feature map to a second feature map in the virtual coordinate system based on the virtual coordinate system includes:

[0028] Determine a mapping relationship between the camera coordinates and the virtual coordinate system based on coordinate information of the ground in the camera coordinate system;

[0029] Based on the mapping relationship between the camera coordinate system and the virtual coordinate system, each pixel point in the first feature map is mapped from the camera coordinate system to the virtual coordinate system to obtain the second feature map.

[0030] In some embodiments, the method further comprises:

[0031] Acquire a first sample image set; wherein each first sample image in the first sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one first sample identifier;

[0032] Using the first sample image set to adjust parameters of the initial detection model to obtain a target detection model;

[0033] Among them, the target detection model is used to perform the following steps: obtain a first image to be detected; based on the camera intrinsic parameter information, process the first image to be detected to obtain a first feature map containing the camera intrinsic parameter information; based on the camera extrinsic parameter information, map the first feature map to a second feature map; based on the second feature map, determine at least one target identifier corresponding to the first image to be detected.

[0034] In some embodiments, acquiring the first sample image set comprises:

[0035] Acquire a second sample image set; wherein each second sample image in the second sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one second sample identifier;

[0036] Based on the camera intrinsic parameter information corresponding to each of the second sample images and the specified virtual camera intrinsic parameter information, perform intrinsic parameter normalization processing on the corresponding second sample images to generate the corresponding first sample images, and use the camera intrinsic parameter information and camera extrinsic parameter information corresponding to each of the second sample images as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the corresponding first sample image;

[0037] Based on the camera extrinsic parameter information corresponding to each of the second sample images, construct a corresponding virtual coordinate system;

[0038] Based on each of the virtual coordinate systems, at least one second sample identifier of the corresponding second sample image is mapped to a first sample identifier in the virtual coordinate system.

[0039] In some embodiments, the adjusting the parameters of the initial detection model using the sample image set to obtain the target detection model includes:

[0040] Determine, by using the initial detection model, at least one prediction identifier corresponding to each of the first sample images based on camera intrinsic parameter information and camera extrinsic parameter information corresponding to each of the first sample images;

[0041] determining a prediction loss based on at least one first sample identifier and at least one prediction identifier corresponding to each of the first sample images;

[0042] Based on the prediction loss, the initial detection model is updated to obtain a target detection model.

[0043] On the other hand, the present application provides an image detection device, comprising:

[0044] An acquisition module, used for acquiring a first image to be detected; wherein the first image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information;

[0045] A first feature determination module, configured to process the first image to be detected based on the camera intrinsic parameter information to obtain a first feature map including the camera intrinsic parameter information;

[0046] A second feature determination module, configured to map the first feature map to a second feature map based on the camera extrinsic parameter information;

[0047] An identification determination module is used to determine at least one target identification corresponding to the first image to be detected based on the second feature map.

[0048] On the other hand, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements part or all of the steps in the above method when executing the program.

[0049] On the other hand, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements part or all of the steps in the above method when executed by a processor.

[0050] On the other hand, the present application provides a computer program, comprising computer-readable codes. When the computer-readable codes are executed in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0051] On the other hand, the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, it implements part or all of the steps in the above method.

[0052] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0054] Figure 1 A schematic diagram of an implementation flow of an image detection method provided in this application;

[0055] Figure 2A is a schematic diagram of photographing an object using a camera with a focal length of f;

[0056] Figure 2B A schematic diagram of photographing an object using a camera with a focal length of f / 2;

[0057] Figure 3 A schematic diagram of an implementation flow of an embodiment of performing image detection according to the image detection method provided by the present application;

[0058] Figure 4 A schematic diagram of an implementation flow of an embodiment of performing detection model training according to the image detection method provided by the present application;

[0059] Figure 5 A schematic diagram of performing image detection using a detection model trained using the image detection method provided by the present application;

[0060] Figure 6 A schematic diagram of the structure of an image detection device provided in this application;

[0061] Figure 7 A hardware entity diagram of a computer device provided for this application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0063] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0064] The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged with a specific order or sequence where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.

[0066] In order to better understand the image detection method provided by this application, the relevant technology is first described below.

[0067] Monocular 3D object recognition refers to detecting the position of an object in 3D space from a 2D image. The main difficulty of monocular 3D object recognition is to identify the depth information of an object in 2D data that lacks depth information. Therefore, before performing 3D target detection, the technology needs to perform depth estimation based on 2D data.

[0068] However, existing monocular image depth estimation methods are easily affected by changes in the image acquisition scene, such as different scenes, different camera angles, or different distributions of objects in the scene, resulting in inaccurate 3D detection. Therefore, in order to make the model trained for a specific scene applicable to other scenes, the problem of data distribution differences must be solved.

[0069] Among the existing monocular roadside 3D detection methods, the height-based bird's eye view technology (Bird's Eye ViewHeight, referred to as BEVHeight) adopts the latest vehicle-side 3D detection technology. It is based on the BEV method and proposes a height-based detection method for roadside data. Compared with the original vehicle-side depth-based method, BEVHeight is more suitable for roadside data distribution and can make the detection results more robust even when the input data is disturbed. However, when the roadside scene changes, the generalization performance of this method decreases significantly.

[0070] The main reasons why BEVHeight is poorly generalized when applied to roadside 3D detection are:

[0071] 1) The intrinsic parameters of roadside cameras are diverse and uncontrollable. Models trained with sample data with a single camera intrinsic parameter are difficult to adapt to diverse scenarios, and different camera intrinsic parameters will cause depth estimation errors;

[0072] 2) The camera poses are diverse and uncontrollable. That is, in order to meet the shooting requirements of different intersections, the camera is installed at different angles at each intersection. The current monocular roadside 3D detection algorithms are difficult to apply to diverse scenarios. That is, the camera installation angle (represented by the camera external parameters) brings estimation errors.

[0073] Based on this, the present application provides an image detection method, which can be executed by a processor of a computer device. The computer device may refer to a server, a laptop, a tablet computer, a desktop computer, a smart TV, a set-top box, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, a portable gaming device) and other devices with data processing capabilities. Figure 1 A schematic diagram of an implementation process of image detection provided in this application, such as Figure 1 As shown, the method includes the following steps S101 to S104:

[0074] Step S101, obtaining a first image to be detected; wherein the first image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information.

[0075] Here, the first image to be detected refers to an image containing at least one target object.

[0076] In some embodiments, the first image to be detected may be a two-dimensional image, or a three-dimensional image including depth information. When the first image to be detected is a two-dimensional image, a specified depth estimation algorithm may be used to perform depth estimation on an object in the two-dimensional image, so as to further determine the identification information of the three-dimensional object in the first image to be detected using the estimated depth information. When the first image to be detected is a three-dimensional image, the three-dimensional information of the first image to be detected may be directly used to determine the identification information of the three-dimensional object in the first image to be detected.

[0077] In some embodiments, the first image to be detected may be picture data captured by a camera, or an image frame selected from video data captured by a camera.

[0078] The camera internal parameter information corresponding to the first image to be detected is a parameter used to describe the internal properties of the camera that collects the first image to be detected. Here, the camera internal parameter information may include the focal length, principal point (optical center) coordinates, distortion coefficient, etc. of the camera.

[0079] The camera extrinsic information corresponding to the first image to be detected is a parameter used to describe the setting position and posture of the camera that collects the first image to be detected. Here, the setting position of the camera can describe the specific location where the camera is set, for example, it is set at intersection 1, intersection 2, or square 3, etc.; the posture of the camera can describe the installation angle of the camera. For example, in order to adapt to different image acquisition scenarios, two cameras (i.e., camera 1 and camera 2) can be set at the same intersection, and camera 1 is set to the east and camera 2 is set to the north, so that the two cameras can be used to collect images in different directions.

[0080] Step S102: Process the first image to be detected based on the camera intrinsic parameter information to obtain a first feature map including the camera intrinsic parameter information.

[0081] Here, the first image to be detected is processed based on the camera intrinsic parameter information, that is, when determining the first feature map corresponding to the first image to be detected, attention is paid to the influence of the camera intrinsic parameter information corresponding to the first image to be detected on the features corresponding to the pixels of the first feature map, so as to adjust the features corresponding to the pixels in the feature map based on the camera intrinsic parameter information.

[0082] For example, the camera intrinsic parameter setting may cause image tilt. Accordingly, in the process of processing the first image to be detected based on the camera intrinsic parameter information, the pixel features are adjusted based on the camera intrinsic parameter information so that the feature corresponding to each pixel in the first feature map is a corrected feature.

[0083] In some embodiments, the first image to be detected may be first embedded to map high-dimensional features corresponding to the first image to be detected to low-dimensional features; then, the low-dimensional features corresponding to the first image to be detected may be processed based on camera intrinsic parameter information.

[0084] In some embodiments, when the first image to be detected is a two-dimensional image, depth information corresponding to pixels in the first image to be detected is identified to generate a first feature map containing the depth information.

[0085] Step S103: Mapping the first feature map to a second feature map based on the camera extrinsic information.

[0086] The influence of camera extrinsics on the first feature map is that for the same object, the coordinate representation of the object is different in the images captured by cameras using different camera extrinsics, that is, the object coordinates in each image are the coordinate representations in the camera coordinate system corresponding to the image, and the camera coordinate system corresponding to each image is determined by the setting position and posture of the corresponding camera (that is, camera extrinsic information), which leads to different coordinate representations of the same object in images corresponding to different camera extrinsics. It can be seen that camera extrinsic information has an important influence on the accuracy of detection results during image detection.

[0087] Therefore, here the first feature map is normalized based on the camera extrinsic information to obtain the second feature map.

[0088] In some embodiments, the first feature map is normalized based on the camera extrinsic information, that is, the pixel coordinates in the first feature map are mapped from the camera coordinate system to a unified virtual coordinate system to obtain a second feature map, thereby eliminating the influence of the camera extrinsic parameters on the feature map corresponding to the first image to be detected.

[0089] Step S104: determining at least one target identifier corresponding to the first image to be detected based on the second feature map.

[0090] Here, the target identification refers to identification information generated for the target object in the first image to be detected.

[0091] For example, in a traffic scenario, the target objects may include vehicles, pedestrians, etc.; the identification information may include location information corresponding to the target object, which may be displayed on the detection image using a detection box or the like; the identification information may also include type indication information corresponding to the target object, which may be displayed on the detection image with a corresponding indicator.

[0092] In some embodiments, the target identification includes three-dimensional coordinate information corresponding to the corresponding target object. For example, the target identification includes position information represented by three-dimensional coordinates. In this way, the position of the corresponding target object can be shown in the form of a three-dimensional detection frame on the first image to be detected.

[0093] In some embodiments, based on the second feature map, the second feature map is identified using a detection model to determine at least one detection object in the second feature map, and a corresponding target identifier is determined for each detection object.

[0094] In some embodiments, the second feature map can be detected using a BEV 3D detection model, a YOLO (you only look once) series model, a 3D target detection model based on multi-view feature aggregation (Average Viewpoint Feature Aggregation for 3D Object Detection, AVOD), etc. to determine at least one target identifier corresponding to the first image to be detected.

[0095] In the image detection method provided by the present application, first, a first image to be detected having corresponding camera intrinsic parameter information and camera extrinsic parameter information is obtained; then, the first image to be detected is processed based on the camera intrinsic parameter information to obtain a first feature map, and the first feature map is mapped to a second feature map based on the camera extrinsic parameter information; finally, at least one target identifier corresponding to the first image to be detected is determined based on the second feature map. In this way, on the one hand, when determining the first feature map corresponding to the first image to be detected, the influence of the camera intrinsic parameter information on the pixel features in the first image to be detected is considered, so as to achieve the effect of correcting the pixel features of the first image to be detected based on the camera intrinsic parameter information; on the other hand, the first feature map is mapped to the second feature map based on the camera extrinsic parameter information, so as to achieve the normalization processing of the image to be detected based on the camera extrinsic parameter information, that is, the first feature map containing the original camera extrinsic parameter information is unified to the second feature map containing the unified virtual camera extrinsic parameter information, thereby reducing the influence of the camera extrinsic parameter information on the image detection result and improving the image detection accuracy. It can be seen that the detection method provided in the present application improves the generalization performance of the image detection method by processing the image to be detected using the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the image to be detected, and can be applied to images to be detected with different camera intrinsic parameters and / or camera extrinsic parameters.

[0096] In some embodiments, the acquisition of the first image to be detected, that is, the above step S101, can be implemented as the following steps S1011 to S1012:

[0097] Step S1011, obtaining a second image to be detected; wherein the second image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information.

[0098] Here, the second image to be detected is the original image corresponding to the first image to be detected, that is, the first image to be detected is obtained after preprocessing the second image to be detected.

[0099] In some embodiments, the second image to be detected may be a two-dimensional image or a three-dimensional image captured by a camera.

[0100] In some embodiments, the second image to be detected may be a picture captured by a camera, or an image frame obtained from video data captured by a camera.

[0101] The camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second image to be detected, that is, the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the camera used to acquire the second image to be detected. In some embodiments, the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second image to be detected are of the same type as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected, and are not described in detail here.

[0102] Step S1012, based on the camera intrinsic parameter information corresponding to the second image to be detected and the specified virtual camera intrinsic parameter information, the second image to be detected is normalized to generate the first image to be detected, and the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second image to be detected are used as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected.

[0103] Here, the virtual camera internal parameter information refers to the internal parameter information corresponding to the preset virtual camera.

[0104] In some embodiments, based on historical information of image detection, camera intrinsic parameter information of a larger number of images may be determined as intrinsic parameter information corresponding to the virtual camera, thereby reducing the number of images to be detected that require intrinsic parameter normalization processing.

[0105] In some embodiments, the virtual camera intrinsic parameter information includes a virtual focal length.

[0106] In some embodiments, based on historical information of image detection, the number of images captured by a camera with a focal length of 2100 mm is greater than the number of images captured by cameras with other focal lengths, and 2100 mm is determined as the virtual focal length corresponding to the virtual camera.

[0107] like Figure 2A and Figure 2B As shown, the object 210 is photographed by using a camera 220 with a focal length of f and a camera 240 with a focal length of f / 2, respectively, to obtain an image 230 and an image 250 corresponding to the object 210. It can be seen from the images 230 and 250 that the focal length information of the camera determines the size of the photographed object in the image.

[0108] Therefore, after unifying the camera focal length corresponding to the second image to be detected to the virtual focal length, the size difference caused by the camera focal length during the imaging process can be reduced.

[0109] In the above embodiment, the second image to be detected is subjected to camera intrinsic parameter normalization processing at the virtual camera layer using the specified virtual camera intrinsic parameter information. However, there are other differences between images shot based on different camera intrinsic parameters that cannot be normalized using virtual camera intrinsic parameters. Therefore, the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second image to be detected are used as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected, so that the camera intrinsic parameter information corresponding to the second image to be detected can be used to process the first image to be detected in subsequent steps (e.g., the above step S102).

[0110] In some embodiments, the first image to be detected is processed based on the camera intrinsic parameter information to obtain a first feature map containing the camera intrinsic parameter information, that is, the above step S102 can be implemented as the following steps S1021 to S1022:

[0111] Step S1021: extract features from the first image to be detected to obtain a third feature map.

[0112] In some embodiments, feature extraction is performed on the first image to be detected, that is, embedding processing is performed on the first image to be detected to map high-dimensional features corresponding to the first image to be detected to low-dimensional features.

[0113] Here, any feature extraction algorithm commonly used in the art can be used to extract features from the first image to be detected, for example, a local binary pattern (LBP), a HOG feature extraction algorithm (Histogram of Oriented Gradient), a scale-invariant feature transform (SIFT) and similar algorithms can be used.

[0114] Step S1022: Using an attention mechanism, based on the camera intrinsic parameter information, the third feature map is processed to obtain the first feature map.

[0115] Here, the attention mechanism is used to integrate the camera intrinsic parameter information into the third feature map to obtain the first feature map, so that the features in the first feature map are features adjusted by the camera intrinsic parameter information.

[0116] In some embodiments, feature extraction is performed on the camera intrinsic parameter information. For example, a multilayer perceptron (MLP) is used to extract feature of the camera intrinsic parameter information to obtain feature information corresponding to the camera intrinsic parameter. Then, the feature information corresponding to the camera intrinsic parameter is used as query information (query), and a transformation model (Transformer) is used to process element features in the third feature map so that the processed features focus on the camera intrinsic parameter information.

[0117] In some embodiments, the attention mechanism may include a self-attention mechanism, a spatial attention mechanism, and the like.

[0118] In this way, by utilizing the attention mechanism, the features in the feature map corresponding to the first image to be detected are focused on the camera intrinsic parameter information corresponding to the first image to be detected, thereby achieving adjustment of the image features based on the camera intrinsic parameter information.

[0119] In some embodiments, based on the camera extrinsic information, mapping the first feature map to the second feature map, that is, the above step S103, can be implemented as the following steps S1031 to S1032:

[0120] Step S1031, constructing a virtual coordinate system based on the camera extrinsic information.

[0121] Here, the virtual coordinate system refers to a unified coordinate system established based on the specified information. For example, the virtual coordinate system corresponds to the world coordinate system, or corresponds to a coordinate system established based on the real ground in the first image to be detected.

[0122] By constructing a virtual coordinate system based on the camera extrinsic information, the images to be detected acquired by cameras with different extrinsic parameters can be unified into the virtual coordinate system.

[0123] In some embodiments, step S1031 may be implemented as the following steps S1033 to S1035:

[0124] Step S1033, determining a ground equation corresponding to the first image to be detected based on the camera extrinsic information; wherein the camera extrinsic information and the ground equation have a specified mapping relationship; the ground equation is used to determine the position information of ground pixel points in the first image to be detected.

[0125] Here, the ground equation is an equation used to determine the position information of ground pixels in the first image to be detected, that is, the ground equation is used to determine the position information of pixels in the first image to be detected in the camera coordinate system.

[0126] The ground equation has a specified mapping relationship with the camera extrinsic information, that is, the coordinates of the ground in the images taken by cameras set at the same position and the same posture are the same in the camera coordinate system, while the coordinates of the ground in the images taken by cameras set at different positions or with different postures are different in the camera coordinate system. Therefore, for cameras set at different positions and with different postures, the corresponding ground equations are determined respectively, and then the positions of the ground pixels in the image to be detected are determined using the ground equations.

[0127] In some embodiments, the corresponding relationship between the camera extrinsic parameter and the ground equation can be determined by the following steps: first, multiple images taken by cameras set at different positions and different postures, and the point cloud data corresponding to each image are obtained; then, the ground pixel points in each image are determined using a pre-trained model; thereafter, the point cloud data is projected onto the corresponding image, thereby determining the point cloud data corresponding to the ground pixel points on each image, that is, determining the depth data of the ground pixel points in the camera coordinate system; finally, the three-dimensional coordinates corresponding to at least three ground pixel points in each image (that is, the three-dimensional coordinates determined based on the two-dimensional coordinates in the camera coordinate system and the depth data) are used to determine the ground equation used to calculate the ground position in the camera coordinate system. In this way, the ground equation corresponding to different camera extrinsic parameter information can be determined.

[0128] In some embodiments, when using the image detection method provided by the present application, the camera extrinsic parameter information corresponding to the image to be detected includes corresponding ground equation information.

[0129] Step S1034: determining ground information of the ground in the first image to be detected based on the ground equation.

[0130] As mentioned above, the ground equation is constructed based on the three-dimensional coordinates of the ground pixel points in the image. Therefore, based on the ground equation corresponding to the camera extrinsic information of the first image to be detected, the ground information in the first image to be detected can be determined, for example, the three-dimensional coordinate information of the ground pixel points in the camera coordinate system.

[0131] Step S1035: construct the virtual coordinate system based on the ground information.

[0132] In some embodiments, the ground in the determined first image to be detected is taken as a two-dimensional plane of the virtual coordinate system, such as the two-dimensional plane formed by the x-axis and the y-axis in the virtual coordinate system, and a virtual coordinate system is established with the origin in the camera coordinate system (for example, the optical center of the camera) as the coordinate origin.

[0133] In some embodiments, the ground in the determined first image to be detected is taken as a two-dimensional plane of the virtual coordinate system, such as the two-dimensional plane formed by the x-axis and the y-axis in the virtual coordinate system, and a virtual coordinate system is established with a specified point on the ground (for example, the center point on the ground) as the coordinate origin.

[0134] It can be seen that the virtual coordinate system can be considered as a coordinate system established based on the real ground corresponding to the first image to be detected. In this way, using different camera extrinsic parameter information corresponding to the image to be detected, the virtual coordinate system established for each image to be detected is unified.

[0135] Step S1032: Based on the virtual coordinate system, map the first feature map to a second feature map in the virtual coordinate system.

[0136] As can be seen from the above, for the images to be detected with different camera extrinsic information, the virtual coordinate system is a unified coordinate system. In this way, the first feature map is mapped to the second feature map in the virtual coordinate system, that is, the pixel features in the first feature map are mapped from the original camera coordinate system to the unified virtual coordinate system.

[0137] In this way, for the images to be detected with different camera extrinsic parameter information, after mapping their feature maps to the virtual coordinate system, image detection can be performed based on the feature maps in the unified virtual coordinate system, reducing the image detection error caused by different camera extrinsic parameter information and improving the generalization performance of the image detection method.

[0138] In some embodiments, the ground information includes coordinate information of the ground in a camera coordinate system; the second feature map includes a plurality of pixel points in a virtual coordinate system;

[0139] Based on the virtual coordinate system, mapping the first feature map to a second feature map in the virtual coordinate system, that is, the above step S1032, can be implemented as the following steps S1036 to S1037:

[0140] Step S1036: Determine a mapping relationship between the camera coordinate system and the virtual coordinate system based on the coordinate information of the ground in the camera coordinate system.

[0141] Here, as described above, the coordinate information of the ground pixel points included in the first image to be detected in the camera coordinate system can be determined based on the ground equation, and the virtual coordinate system is constructed based on the ground information (for example, the virtual coordinate system is constructed with the ground information as a two-dimensional plane in the virtual coordinate system). Based on this, the mapping relationship between the coordinates of the ground pixel points in the camera coordinate system and the coordinates in the virtual coordinate system can be determined, and then the mapping relationship between the camera coordinate system and the virtual coordinate system can be determined.

[0142] Step S1037: Based on the mapping relationship between the camera coordinate system and the virtual coordinate system, map each pixel point in the first feature map from the camera coordinate system to the virtual coordinate system to obtain the second feature map.

[0143] Here, based on the mapping relationship between the camera coordinate system and the virtual coordinate system, the pixel points in the camera coordinate system are mapped to the virtual coordinate system to obtain the second feature map.

[0144] In the above embodiment, a ground equation is determined based on the camera extrinsic parameter information of the first image to be detected, and the coordinate information of the ground pixel points in the first image to be detected is determined based on the ground equation. Then, a virtual coordinate system is established based on the coordinate information of the ground pixel points, and the first feature map corresponding to the first image to be detected is mapped to the second feature map under the virtual coordinate system. This realizes the normalization of the feature map of the first image to be detected based on the camera extrinsic parameters of the first image to be detected, reduces the detection error caused by different camera extrinsic parameter information, and improves the generalization performance of the image detection method.

[0145] In some embodiments, each target identifier includes coordinate information of the corresponding target object in a virtual coordinate system;

[0146] Thus, after determining at least one target identifier corresponding to the first image to be detected based on the second feature map, that is, after the above step S104, the image detection method further includes the following step S105:

[0147] Step S105 : mapping the coordinate information of each target object in the virtual coordinate system to the coordinate information in the camera coordinate system based on the mapping relationship between the camera coordinate system and the virtual coordinate system.

[0148] Here, the coordinate information of each target object in the virtual coordinate system is mapped to the coordinate information in the camera coordinate system, that is, the target identification information in the virtual coordinate system is converted to the identification information in the camera coordinate system, so that the position of each target object can be correctly identified on the first image to be detected.

[0149] In some embodiments, the image detection method provided by the present application further includes the following steps S106 to S107:

[0150] Step S106, obtaining a first sample image set; wherein each first sample image in the first sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one first sample identifier.

[0151] Here, the first sample image set is an image set used for model training of the initial detection model.

[0152] The camera intrinsic parameter information and camera extrinsic parameter information corresponding to each first sample image are the intrinsic parameter information and extrinsic parameter information of the camera used to acquire the first sample image. In some embodiments, the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first sample image are of the same type as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected, and are not described in detail here.

[0153] The at least one first sample identification corresponding to each first sample image is sample identification information determined in advance for the corresponding first sample image and is used to supervise the training process of the detection model.

[0154] In some embodiments, at least one first sample identifier corresponding to each first sample image represents position information of a target object in the corresponding first sample image in a virtual coordinate system.

[0155] Step S107, adjusting the parameters of the initial detection model using the first sample image set to obtain a target detection model;

[0156] Among them, the target detection model is used to perform the following steps: obtain a first image to be detected; based on the camera intrinsic parameter information, process the first image to be detected to obtain a first feature map containing the camera intrinsic parameter information; based on the camera extrinsic parameter information, map the first feature map to a second feature map; based on the second feature map, determine at least one target identifier corresponding to the first image to be detected.

[0157] Here, the first sample image set is used to adjust the parameters of the initial detection model, that is, the sample data in the first sample image set is used to continuously optimize the model parameters so that the detection model can better predict or make decisions on unknown data.

[0158] In some embodiments, the model parameters of the detection model may be adjusted using an optimization algorithm such as a gradient descent algorithm or a stochastic gradient descent algorithm.

[0159] In some embodiments, the parameters of the model are updated by calculating the loss between the predicted identification obtained by the detection model for each first sample image and the first sample identification corresponding to the first sample image. In this way, the above step S107 can be implemented as the following steps S1071 to S1073:

[0160] Step S1071: using the initial detection model, based on the camera intrinsic parameter information and the camera extrinsic parameter information corresponding to each of the first sample images, determine at least one prediction identifier corresponding to each of the first sample images.

[0161] Here, firstly, the first sample image is encoded using the initial detection model to obtain a first sample feature map corresponding to the first sample image;

[0162] Then, the camera intrinsic parameter information corresponding to the first sample image is input into the initial detection model, so that the initial detection model embeds the camera intrinsic parameter information to obtain the feature representation corresponding to the camera intrinsic parameter information of the first sample image; in the process of the initial detection model estimating the depth information of the pixels in the first sample image based on the first sample feature map, the Transformer model is used to use the feature representation corresponding to the camera intrinsic parameter information as query information (query information) based on the attention mechanism, and the features in the first sample feature map are adjusted to obtain the second sample feature map;

[0163] Afterwards, based on the camera extrinsic information corresponding to the first sample image, a ground equation corresponding to the first sample image is determined; a virtual coordinate system is constructed based on the ground equation; and the second sample feature map is mapped to a third sample feature map in the virtual coordinate system;

[0164] Here, the specific method of determining the ground equation, constructing the virtual coordinate system, and mapping the second sample feature map to the third sample feature map in the virtual coordinate system can be found in the above detailed description and will not be repeated here.

[0165] Finally, the target object is detected on the third sample feature map to obtain a prediction identifier corresponding to at least one target object.

[0166] Here, the specific method of performing target object detection on the third sample feature map can be found in the above detailed description and will not be repeated here.

[0167] Step S1072: determining a prediction loss based on at least one first sample identifier and at least one prediction identifier corresponding to each of the first sample images.

[0168] Here, the prediction loss is used to measure the error between at least one first sample identifier and at least one prediction identifier corresponding to each first sample image.

[0169] In some embodiments, a loss function is preset, and the loss between each first sample identifier and each predicted identifier is calculated using the loss function.

[0170] In some embodiments, the loss function may be established using square loss, mean square error loss, or the like.

[0171] Step S1073: Based on the prediction loss, update the detection model to obtain a target detection model.

[0172] Here, the prediction loss is used to update the parameters of the initial detection model so that each predicted identifier predicted by the updated detection model for each first sample image is closer to each first sample identifier, that is, the model parameters of the updated detection model can more accurately predict the target object in the first sample image.

[0173] In this way, by calculating the loss between the predicted identifier and the first sample identifier, the detection model is updated multiple times until the loss is reduced to a specified loss threshold, and the target detection model is determined.

[0174] In some embodiments, the obtaining of the first sample image set, that is, the above step S106, can be implemented as the following steps S1061 to S1064:

[0175] Step S1061, obtaining a second sample image set; wherein each second sample image in the second sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one second sample identifier.

[0176] Here, each second sample image in the second sample image set is an original image captured by a camera of the object, that is, after preprocessing each second sample image, a corresponding first sample image in the first sample image set is obtained.

[0177] The camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second sample image are of the same type as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected. For details, please refer to the detailed description above and will not be repeated here.

[0178] The at least one second sample identifier corresponding to each second sample image is determined based on the corresponding second sample image, that is, the sample identifier is determined in the camera coordinate system corresponding to the second sample image.

[0179] In this way, each second sample identifier corresponds to the camera intrinsic parameter information and camera extrinsic parameter information of the corresponding second sample image.

[0180] Step S1062, based on the camera intrinsic parameter information corresponding to each of the second sample images and the specified virtual camera intrinsic parameter information, perform intrinsic parameter normalization processing on the corresponding second sample images to generate the corresponding first sample images, and use the camera intrinsic parameter information and camera extrinsic parameter information corresponding to each of the second sample images as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the corresponding first sample image.

[0181] Here, the internal parameter normalization processing is performed on the second sample image, that is, the internal parameter information of the second sample image is unified to the specified virtual camera internal parameter information.

[0182] The process of performing internal reference normalization processing on the second sample image is the same as the process of performing internal reference normalization processing on the second to-be-detected image in the above text, and the detailed description can be found in the above text, which will not be repeated here.

[0183] Step S1063: construct a corresponding virtual coordinate system based on the camera extrinsic parameter information corresponding to each of the second sample images.

[0184] Here, based on the camera extrinsic parameter information corresponding to the second sample image, the ground equation corresponding to the second sample image is determined; then, the virtual coordinate system corresponding to the second sample image is constructed based on the ground equation.

[0185] The above method for determining the ground equation and constructing the virtual coordinate system is the same as the method for constructing the corresponding virtual coordinate system based on the camera extrinsic information corresponding to the first image to be detected. Please refer to the detailed description above and will not be repeated here.

[0186] Step S1064: Based on each of the virtual coordinate systems, map at least one second sample identifier of the corresponding second sample image to a first sample identifier in the virtual coordinate system.

[0187] Here, since the virtual coordinate system is constructed based on the ground information in the corresponding second sample image, and the ground information includes the coordinate information of the ground pixel points in the corresponding camera coordinate system, the virtual coordinate system has a mapping relationship with the camera coordinate system corresponding to the second sample image. In this way, based on the mapping relationship, the position information (i.e., coordinate information) of the second sample identifier can be mapped from the camera coordinate system to the virtual coordinate system to obtain the corresponding first sample identifier.

[0188] In some embodiments, the camera extrinsic parameter information corresponding to each second sample image includes the camera posture of the camera that collected the second sample image. In this way, the method for mapping the second sample identifier to the first sample identifier can be, first, by calculating the cross product and dot product of the ground plane in the second sample image and the camera posture, the direction and angle of the rotation axis of the camera relative to the ground plane are determined; then the second sample identifier determined in the camera coordinate system is reversely rotated according to the direction and angle of the rotation axis to obtain the corresponding first sample identifier.

[0189] In this way, by mapping the second sample identifier containing different camera intrinsic parameter information and camera extrinsic parameter information to the first sample identifier in a unified virtual coordinate system, the influence of the camera intrinsic parameter information and camera extrinsic parameter information on model training can be reduced, thereby improving the accuracy of model prediction.

[0190] During the process of training the initial detection model according to the detection method provided in the present application, the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the sample image are applied to the model training, so that the detection model can learn and pay attention to the camera intrinsic parameter information in the sample image. At the same time, the feature map of the sample image can be mapped to a unified virtual coordinate system according to the camera extrinsic parameter information of the sample image, so as to reduce the detection error caused by the camera extrinsic parameter information, thereby improving the detection accuracy and generalization performance of the target detection model obtained after training.

[0191] Next, combine Figure 3 , an embodiment of performing image detection according to the image detection method provided by the present application is described in detail. Figure 3 As shown, the image detection embodiment includes the following steps S301 to S307:

[0192] Step S301, acquiring a first image; then, executing step S302;

[0193] Here, the first image is an image to be detected, including camera intrinsic parameter information and camera extrinsic parameter information of a camera that captures the first image.

[0194] Step S302, normalizing the focal length of the first image to adjust the focal length of the first image to the specified virtual camera focal length, generating a second image; using the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image as the camera intrinsic parameter information and camera extrinsic parameter information of the second image; then, executing step S303;

[0195] Step S303, extracting features from the second image to obtain a fourth feature map; then, executing step S304;

[0196] Step S304, using the camera intrinsic parameter information corresponding to the second image, based on the attention mechanism, feature adjustment is performed on the fourth feature map to obtain a fifth feature map; then, step S305 is executed;

[0197] Step S305, constructing a virtual coordinate system corresponding to the second image based on the camera extrinsic information corresponding to the second image; mapping the pixel coordinates in the fifth feature map from the camera coordinate system to the virtual coordinate system to obtain a sixth feature map; then, executing step S306;

[0198] Step S306, using the BEV image detection method, determining at least one target identifier from the sixth feature map; executing, executing step S307;

[0199] Step S307: Map the determined at least one target identifier from the virtual coordinate system to the camera coordinate system to obtain at least one corresponding real identifier, and display each real identifier on the first image.

[0200] Next, combine Figure 4 , an embodiment of training a detection model according to the image detection method provided by the present application is described in detail. Figure 4 As shown, the detection model training embodiment includes the following steps S401 to S406:

[0201] Step S401, obtaining a third sample image set; then, executing step S402;

[0202] Here, the third sample image set includes a plurality of third sample images; each third sample image includes camera intrinsic parameter information and camera extrinsic parameter information of a camera that acquires the third sample image, and at least one third sample identifier.

[0203] Step S402, normalizing the focal length of each third sample image to adjust the focal length of the third sample image to the specified virtual camera focal length, and generating a corresponding fourth sample image; using the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the third sample image as the camera intrinsic parameter information and camera extrinsic parameter information of the corresponding fourth sample image; then, executing step S403;

[0204] Step S403, constructing a virtual coordinate system based on the camera intrinsic parameter information and the camera extrinsic parameter information corresponding to each fourth sample image, and mapping the corresponding at least one third sample identifier to at least one fourth sample identifier in the virtual coordinate system; thereafter, executing step S404;

[0205] Step S404, inputting each fourth sample image into the initial detection model to determine at least one prediction identifier corresponding to each fourth sample image; thereafter, executing step S405;

[0206] Step S405, calculating the loss of at least one fourth sample identifier and at least one prediction identifier corresponding to each fourth sample image; then, executing step S406;

[0207] Step S406: based on the loss corresponding to each fourth sample image, update the parameters of the detection model to obtain the target detection model.

[0208] In one embodiment, the object detection model includes a scaling module, an image encoder, a depth decoder, a coordinate converter, a BEV 3D detector, and an identity converter. Figure 5 , a process of performing image detection on the third image to be detected using the trained target detection model is described in detail.

[0209] like Figure 5 As shown, first, the third image to be detected 501 is input into the target detection model.

[0210] Here, the third image to be detected 501 has corresponding camera intrinsic parameter information and camera extrinsic parameter information; wherein the camera intrinsic parameter information is shared by the scaling module 510, the depth decoder 530 and the coordinate converter 540 of the target detection model; and the camera extrinsic parameter information is used by the coordinate converter 540.

[0211] The third image to be detected 501 is input to the scaling module 510. The scaling module 510 normalizes the focal length in the camera intrinsic parameter information of the third image to be detected 501 based on the specified virtual camera focal length to obtain a fourth image to be detected 502 with the virtual camera focal length. The scaling module 510 inputs the fourth image to be detected 502 to the image encoder 520.

[0212] The image encoder 520 encodes the fourth image to be detected 502 to obtain a seventh feature map corresponding to the fourth image to be detected 502. The image encoder 520 inputs the seventh feature map to the depth decoder 530.

[0213] The depth decoder 530 performs depth estimation on the pixels in the seventh feature map to determine the depth information corresponding to each pixel; based on the depth information of each pixel in the seventh feature map and the two-dimensional coordinate information in the camera coordinate system, an eighth feature map with three-dimensional information corresponding to the seventh feature map is determined. In the process of estimating the depth information of the pixels in the seventh feature map, the depth decoder 530 adjusts the estimation result of the pixel depth based on the attention mechanism and the camera intrinsic parameter information corresponding to the fourth image to be detected 502.

[0214] The depth decoder 530 transmits the eighth feature map to the coordinate converter 540 .

[0215] The coordinate converter 540 constructs a virtual coordinate system based on the camera intrinsic parameter information and the camera extrinsic parameter information corresponding to the fourth image to be detected 502; based on the virtual coordinate system, the coordinate converter 540 converts the eighth feature map 541 in the camera coordinate system into a ninth feature map 542 in the virtual coordinate system. The coordinate converter 540 transmits the ninth feature map 542 to the BEV 3D detector 550.

[0216] The BEV 3D detector 550 performs target detection on the ninth feature map 542 to determine at least one target identifier corresponding to at least one target object. The BEV 3D detector 550 sends the at least one target identifier to the identifier converter 560 .

[0217] The identification converter 560 converts at least one target identification into at least one real identification in the camera coordinate system, and displays each real identification on the third image to be detected, thereby obtaining a detection result image 503 .

[0218] Based on the foregoing embodiments, an embodiment of the present application provides an image detection device, which includes the units included and the modules included in the units, which can be implemented by a processor in a computer device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0219] Figure 6 A schematic diagram of the composition structure of an image detection device provided in this application is shown in FIG. Figure 6 As shown, the image detection device 600 includes: an acquisition module 610, a first feature determination module 620, a second feature determination module 630 and an identification determination module 640, wherein:

[0220] The acquisition module 610 is used to acquire a first image to be detected; wherein the first image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information;

[0221] A first feature determination module 620 is used to process the first to-be-detected image based on the camera intrinsic parameter information to obtain a first feature map including the camera intrinsic parameter information;

[0222] A second feature determination module 630, configured to map the first feature map to a second feature map based on the camera extrinsic parameter information;

[0223] The identification determination module 640 is used to determine at least one target identification corresponding to the first image to be detected based on the second feature map.

[0224] In some embodiments, the acquisition module 610 is used to:

[0225] Acquire a second image to be detected; wherein the second image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information;

[0226] Based on the camera intrinsic parameter information corresponding to the second image to be detected and the specified virtual camera intrinsic parameter information, the second image to be detected is normalized to generate the first image to be detected, and the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second image to be detected are used as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected.

[0227] In some embodiments, the first feature determination module 620 is used to:

[0228] Performing feature extraction on the first image to be detected to obtain a second feature map;

[0229] The second feature map is processed based on the camera intrinsic parameter information by utilizing an attention mechanism to obtain the first feature map.

[0230] In some embodiments, the second feature determination module 630 includes:

[0231] A coordinate system construction module 631 is used to construct a virtual coordinate system based on the camera external parameter information;

[0232] The coordinate system mapping module 632 is used to map the first feature map to a second feature map in a virtual coordinate system based on the virtual coordinate system.

[0233] In some embodiments, the coordinate system construction module 631 is used to:

[0234] Determine a ground equation corresponding to the first image to be detected based on the camera extrinsic information; wherein the camera extrinsic information and the ground equation have a specified mapping relationship; the ground equation is used to determine the position information of ground pixels in the first image to be detected;

[0235] Based on the ground equation, determining ground information of the ground in the first to-be-detected image;

[0236] The virtual coordinate system is constructed based on the ground information.

[0237] In some embodiments, the ground information includes coordinate information of the ground in a camera coordinate system; the second feature map includes a plurality of pixel points in a virtual coordinate system;

[0238] The coordinate system mapping module 632 is used to:

[0239] Determine a mapping relationship between the camera coordinate system and the virtual coordinate system based on coordinate information of the ground in the camera coordinate system;

[0240] Based on the mapping relationship between the camera coordinate system and the virtual coordinate system, each pixel point in the first feature map is mapped from the camera coordinate system to the virtual coordinate system to obtain the second feature map.

[0241] In some embodiments, the apparatus 600 further includes:

[0242] The sample acquisition module 650 is used to acquire a first sample image set; wherein each first sample image in the first sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one first sample identifier;

[0243] A model training module 660 is used to adjust the parameters of the initial detection model using the first sample image set to obtain a target detection model;

[0244] Among them, the target detection model is used to perform the following steps: obtain a first image to be detected; based on the camera intrinsic parameter information, process the first image to be detected to obtain a first feature map containing the camera intrinsic parameter information; based on the camera extrinsic parameter information, map the first feature map to a second feature map; based on the second feature map, determine at least one target identifier corresponding to the first image to be detected.

[0245] In some embodiments, the sample acquisition module 650 is used to:

[0246] Acquire a second sample image set; wherein each second sample image in the second sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one second sample identifier;

[0247] Based on the camera intrinsic parameter information corresponding to each of the second sample images and the specified virtual camera intrinsic parameter information, perform intrinsic parameter normalization processing on the corresponding second sample images to generate the corresponding first sample images, and use the camera intrinsic parameter information and camera extrinsic parameter information corresponding to each of the second sample images as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the corresponding first sample image;

[0248] Based on the camera extrinsic parameter information corresponding to each of the second sample images, construct a corresponding virtual coordinate system;

[0249] Based on each of the virtual coordinate systems, at least one second sample identifier of the corresponding second sample image is mapped to a first sample identifier in the virtual coordinate system.

[0250] In some embodiments, the model training module 660 is used to:

[0251] Determine, by using the initial detection model, at least one prediction identifier corresponding to each of the first sample images based on camera intrinsic parameter information and camera extrinsic parameter information corresponding to each of the first sample images;

[0252] determining a prediction loss based on at least one first sample identifier and at least one prediction identifier corresponding to each of the first sample images;

[0253] Based on the prediction loss, the initial detection model is updated to obtain a target detection model.

[0254] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0255] It should be noted that, in the embodiment of the present application, if the above-mentioned image detection method is implemented in the form of a software function module, and when it is sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) perform all or part of the method described in each embodiment of the present application. And the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read Only Memory, ROM), disk or optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination between hardware, software and firmware.

[0256] An embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0257] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0258] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0259] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0260] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0261] It should be noted that Figure 7 A schematic diagram of a hardware entity of a computer device in an embodiment of the present application is shown in FIG. Figure 7 As shown, the hardware entity of the computer device 700 includes: a processor 701, a communication interface 702 and a memory 703, wherein:

[0262] Processor 701 generally controls the overall operation of computer device 700 .

[0263] The communication interface 702 enables the computer device to communicate with other terminals or servers through a network.

[0264] The memory 703 is configured to store instructions and applications executable by the processor 701, and can also cache data to be processed or processed by the processor 701 and each module in the computer device 700 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be performed between the processor 701, the communication interface 702, and the memory 703 through the bus 704.

[0265] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.

[0266] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

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

[0268] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0269] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0270] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0271] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0272] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. An image detection method, comprising: Acquire a first image to be detected; wherein the first image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information; Based on the camera intrinsic parameter information, the first image to be detected is processed to obtain a first feature map including the camera intrinsic parameter information; Based on the camera extrinsic information, mapping the first feature map to a second feature map; Based on the second feature map, at least one target identifier corresponding to the first image to be detected is determined.

2. The method according to claim 1, wherein: The step of acquiring a first image to be detected comprises: Acquire a second image to be detected; wherein the second image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information; Based on the camera intrinsic parameter information corresponding to the second image to be detected and the specified virtual camera intrinsic parameter information, the second image to be detected is normalized to generate the first image to be detected, and the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the second image to be detected are used as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the first image to be detected.

3. The method according to any one of claims 1 to 2, wherein: The first to-be-detected image is processed based on the camera intrinsic parameter information to obtain a first feature map containing the camera intrinsic parameter information, including: Performing feature extraction on the first image to be detected to obtain a third feature map; The third feature map is processed based on the camera intrinsic parameter information by utilizing an attention mechanism to obtain the first feature map.

4. The method according to claim 1, wherein: The mapping the first feature map to a second feature map based on the camera extrinsic parameter information includes: Based on the camera extrinsic information, construct a virtual coordinate system; Based on the virtual coordinate system, the first feature map is mapped to a second feature map in the virtual coordinate system.

5. The method according to claim 4, wherein: The step of constructing a virtual coordinate system based on the camera extrinsic information includes: Determine a ground equation corresponding to the first image to be detected based on the camera extrinsic information; wherein the camera extrinsic information and the ground equation have a specified mapping relationship; the ground equation is used to determine the position information of ground pixels in the first image to be detected; Based on the ground equation, determining ground information of the ground in the first to-be-detected image; The virtual coordinate system is constructed based on the ground information.

6. The method according to claim 5, wherein: The ground information includes coordinate information of the ground in a camera coordinate system; the second feature map includes a plurality of pixel points in a virtual coordinate system; The mapping the first feature map to a second feature map in the virtual coordinate system based on the virtual coordinate system includes: Determine a mapping relationship between the camera coordinates and the virtual coordinate system based on coordinate information of the ground in the camera coordinate system; Based on the mapping relationship between the camera coordinate system and the virtual coordinate system, each pixel point in the first feature map is mapped from the camera coordinate system to the virtual coordinate system to obtain the second feature map.

7. The method according to any one of claims 1 to 6, wherein: The method further comprises: Acquire a first sample image set; wherein each first sample image in the first sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one first sample identifier; Using the first sample image set to adjust parameters of the initial detection model to obtain a target detection model; Among them, the target detection model is used to perform the following steps: obtain a first image to be detected; based on the camera intrinsic parameter information, process the first image to be detected to obtain a first feature map containing the camera intrinsic parameter information; based on the camera extrinsic parameter information, map the first feature map to a second feature map; based on the second feature map, determine at least one target identifier corresponding to the first image to be detected.

8. The method according to claim 7, wherein: The acquiring of the first sample image set comprises: Acquire a second sample image set; wherein each second sample image in the second sample image set has corresponding camera intrinsic parameter information, camera extrinsic parameter information and at least one second sample identifier; Based on the camera intrinsic parameter information corresponding to each of the second sample images and the specified virtual camera intrinsic parameter information, perform intrinsic parameter normalization processing on the corresponding second sample images to generate the corresponding first sample images, and use the camera intrinsic parameter information and camera extrinsic parameter information corresponding to each of the second sample images as the camera intrinsic parameter information and camera extrinsic parameter information corresponding to the corresponding first sample image; Based on the camera extrinsic parameter information corresponding to each of the second sample images, construct a corresponding virtual coordinate system; Based on each of the virtual coordinate systems, at least one second sample identifier of the corresponding second sample image is mapped to a first sample identifier in the virtual coordinate system.

9. The method according to claim 8, wherein: The step of adjusting the parameters of the initial detection model by using the sample image set to obtain the target detection model includes: Determine, by using the initial detection model, at least one prediction identifier corresponding to each of the first sample images based on camera intrinsic parameter information and camera extrinsic parameter information corresponding to each of the first sample images; determining a prediction loss based on at least one first sample identifier and at least one prediction identifier corresponding to each of the first sample images; Based on the prediction loss, the initial detection model is updated to obtain a target detection model.

10. An image detection device, comprising: An acquisition module, used for acquiring a first image to be detected; wherein the first image to be detected has corresponding camera intrinsic parameter information and camera extrinsic parameter information; A first feature determination module, configured to process the first image to be detected based on the camera intrinsic parameter information to obtain a first feature map including the camera intrinsic parameter information; A second feature determination module, configured to map the first feature map to a second feature map based on the camera extrinsic parameter information; An identification determination module is used to determine at least one target identification corresponding to the first image to be detected based on the second feature map.

Citation Information

Patent Citations

  • Face image processing method and device for model training

    CN110956065A

  • A method and device for detecting obstacle

    CN111612760A

  • Target detection method, electronic equipment, roadside equipment and cloud control platform

    CN112668460A

  • Method, device and equipment for determining state of object in vehicle-road cooperation

    CN113657224A

  • Method and device for determining position of target object, equipment and storage medium

    CN114821497A