Camera platform adaptive feature improvement method and device, equipment and storage medium

By embedding camera parameters into images and three-dimensional volume queries, and using a deformable attention mechanism for multi-view feature fusion, it solves the problems of fixed camera layout and co-planar assumptions in traditional feature enhancement methods, and achieves camera platform adaptive feature enhancement. , improving computational efficiency and applicability.

CN118609124APending Publication Date: 2024-09-06HUBEI UNIV OF ARTS & SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410335797.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-22
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The traditional feature enhancement method requires a fixed camera layout, which is difficult to handle when the camera is damaged or the layout changes. It also suffers from co-planar assumptions and low computational efficiency.

Method used

By acquiring images and parameters from different camera angles, embedding camera parameters into two-dimensional and three-dimensional features, establishing an alignment basis, and using a deformable attention mechanism for multi-view feature fusion, the camera platform can achieve adaptive feature improvement.

Benefits of technology

It realizes three-dimensional feature improvement in any scene and any camera layout, gets rid of the dependence on fixed camera layout, improves computing efficiency and applicability, and can handle dynamic camera platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609124A
    Figure CN118609124A
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a camera platform adaptive feature improvement method and device, equipment and a storage medium, and the method comprises the steps: obtaining camera images and camera parameters of a camera at different visual angles; embedding the camera parameters into the two-dimensional image features and the three-dimensional body query of the camera image, establishing an alignment basis for the two-dimensional image features and the three-dimensional body query, and obtaining the three-dimensional features of each view angle of the camera; and performing multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features. In consideration of inaccurate feature alignment caused by perspective distortion and perspective distortion, camera parameters are respectively embedded into two-dimensional image features and three-dimensional body query, and an alignment basis between the two-dimensional image features and the three-dimensional body query is established, so that the two-dimensional image features and the three-dimensional body query can be learned; and capturing the three-dimensional features of each view angle of the camera according to the camera parameters to carry out multi-view feature fusion, thereby realizing adaptive feature improvement of the camera platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a camera platform adaptive feature enhancement method, device, equipment and storage medium. Background Art

[0002] With the continuous development of computer and artificial intelligence (AI) technology, image processing has become an important direction in the field of computer science and artificial intelligence. Among them, feature enhancement is particularly important for 3D tasks based on RGB images. The traditional feature enhancement method can obtain a three-dimensional feature representation by projecting multi-view image features multiple times on planes at different heights. This method handles the problem of multiple planes to a certain extent, but it does not strictly get rid of the assumption of coplanarity. Projecting image features onto different planes requires the camera platform to be fixed, which makes it difficult to handle situations such as camera damage or changes in the layout of the camera platform.

[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of the present invention is to provide a camera platform adaptive feature enhancement method, device, equipment and storage medium, aiming to solve the technical problem of fixed camera layout in traditional feature enhancement method.

[0005] To achieve the above object, the present invention provides a camera platform adaptive feature enhancement method, the method comprising the following steps:

[0006] Obtain camera images and camera parameters at different camera angles;

[0007] Embedding the camera parameters into the two-dimensional image features and the three-dimensional volume query of the camera image, establishing an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtaining the three-dimensional features of each viewing angle of the camera;

[0008] Based on the camera parameters, multi-view feature fusion is performed on the three-dimensional features to obtain scene features.

[0009] Optionally, embedding the camera parameters into the two-dimensional image features and the three-dimensional volume query of the camera image, establishing an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtaining the three-dimensional features of each viewing angle of the camera includes:

[0010] Embedding the camera parameters into the two-dimensional image features of the camera image to obtain image features that include learnable camera parameter information;

[0011] embedding the camera parameters into a three-dimensional volume query of the camera image to obtain a three-dimensional volume query containing learnable camera parameter information;

[0012] Based on the pinhole imaging principle and the camera parameters as the alignment basis, the image features are sampled and filled into the three-dimensional volume query through a deformable attention mechanism to obtain the three-dimensional features of each camera perspective.

[0013] Optionally, embedding the camera parameters into the two-dimensional image features of the camera image to obtain image features covering learnable camera parameter information includes:

[0014] Based on the camera parameters, camera extrinsic parameters, camera intrinsic parameters and an image enhancement matrix for transforming the camera image from the scene space to the camera space are given;

[0015] The camera extrinsic parameters, the camera intrinsic parameters and the image enhancement matrix are transformed, and a camera parameter vector is constructed by performing camera parameter learning using a multi-layer perceptron;

[0016] determining two-dimensional image features of the camera image;

[0017] The camera parameter vector is embedded into the two-dimensional image feature to obtain an image feature that includes learnable camera parameter information.

[0018] Optionally, embedding the camera parameters into a three-dimensional volume query of the camera image to obtain a three-dimensional volume query covering learnable camera parameter information comprises:

[0019] Acquire an image scene of the camera image, and rasterize the image scene to construct a three-dimensional voxel corresponding to the camera image;

[0020] Determining a three-dimensional position code of the three-dimensional voxel;

[0021] Based on the three-dimensional position encoding, the camera parameters are embedded into a three-dimensional volume query corresponding to the three-dimensional voxel to obtain a three-dimensional volume query covering learnable camera parameter information.

[0022] Optionally, performing multi-view feature fusion on the three-dimensional feature based on the camera parameter to obtain a scene feature includes:

[0023] Determining the contribution of the three-dimensional features of each view to the scene features according to the camera parameters;

[0024] The three-dimensional features of each view are fused according to the contribution to obtain a scene feature. Optionally, the scene feature is represented as:

[0025] V=∑ n Ln ⊙V n ;

[0026] Among them, V represents the scene characteristics, n represents the number of viewing angles, and L n Indicates each view Figure 3 The contribution of dimensional features to scene features, ⊙ represents pixel-by-pixel multiplication, V n Represents the three-dimensional features of the image scene at each viewpoint within the three-dimensional voxel.

[0027] Optionally, after performing multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features, the method further includes:

[0028] Based on the scene features, convolution processing is performed on the camera image by 3D convolution to obtain a 3D density map corresponding to the camera image, wherein the camera image includes a crowd image;

[0029] The number of people in the camera image is determined based on the 3D density map.

[0030] In addition, to achieve the above-mentioned purpose, the present invention also proposes a camera platform adaptive feature enhancement device, the device comprising:

[0031] A parameter acquisition module is used to obtain camera images and camera parameters at different camera viewing angles;

[0032] A parameter embedding module, used to embed the camera parameters into the two-dimensional image features and three-dimensional volume query of the camera image, establish an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtain the three-dimensional features of each viewing angle of the camera;

[0033] The feature fusion module is used to perform multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features.

[0034] In addition, to achieve the above-mentioned purpose, the present invention also proposes a camera platform adaptive feature enhancement device, which includes: a memory, a processor, and a camera platform adaptive feature enhancement program stored in the memory and executable on the processor, and the camera platform adaptive feature enhancement program is configured to implement the steps of the camera platform adaptive feature enhancement method described above.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a camera platform adaptive feature enhancement program is stored. When the camera platform adaptive feature enhancement program is executed by a processor, the steps of the camera platform adaptive feature enhancement method described above are implemented.

[0036] The present invention obtains camera images and camera parameters of different camera viewing angles; then embeds the camera parameters into the two-dimensional image features and three-dimensional volume queries of the camera images, establishes an alignment basis between the two-dimensional image features and the three-dimensional volume queries, and obtains the three-dimensional features of each camera viewing angle; finally, based on the camera parameters, multi-view feature fusion is performed on the three-dimensional features to obtain scene features. Since the present invention takes into account the inaccurate feature alignment caused by perspective distortion and perspective distortion, the camera parameters are respectively embedded into the two-dimensional image features and the three-dimensional volume queries, an alignment basis between the two-dimensional image features and the three-dimensional volume queries is established, making them learnable, and the contribution of the three-dimensional features of each camera viewing angle to the scene features is captured based on the camera parameters, and multi-view feature fusion is performed, thereby achieving feature enhancement of the camera platform adaptively. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a structural diagram of a camera platform adaptive feature enhancement device in a hardware operating environment involved in an embodiment of the present invention;

[0038] Figure 2 It is a flowchart of a first embodiment of a camera platform adaptive feature enhancement method of the present invention;

[0039] Figure 3 It is a flowchart of a second embodiment of the camera platform adaptive feature enhancement method of the present invention;

[0040] Figure 4 It is a schematic diagram of a 3D crowd density estimation algorithm based on camera parameter feature enhancement in the second embodiment of the camera platform adaptive feature enhancement method of the present invention;

[0041] Figure 5 A visualization diagram of the second embodiment of the camera platform adaptive feature enhancement method of the present invention on the PETS2009 data set;

[0042] Figure 6 It is a structural block diagram of the first embodiment of the camera platform adaptive feature enhancement device of the present invention.

[0043] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0045] Reference Figure 1 , Figure 1 It is a structural schematic diagram of a camera platform adaptive feature enhancement device in a hardware operating environment involved in an embodiment of the present invention.

[0046] like Figure 1 As shown, the camera platform adaptive feature enhancement device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0047] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the camera platform adaptive feature enhancement device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0048] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a camera platform adaptive feature enhancement program.

[0049] exist Figure 1 In the camera platform adaptive feature enhancement device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the camera platform adaptive feature enhancement device of the present invention can be set in the camera platform adaptive feature enhancement device, and the camera platform adaptive feature enhancement device calls the camera platform adaptive feature enhancement program stored in the memory 1005 through the processor 1001, and executes the camera platform adaptive feature enhancement method provided in the embodiment of the present invention.

[0050] The embodiment of the present invention provides a camera platform adaptive feature enhancement method, referring to Figure 2 , Figure 2 Schematic diagram of the process of the first embodiment of the camera platform adaptive feature enhancement method of the present invention.

[0051] It should be noted that feature enhancement is particularly important for 3D tasks based on RGB images. According to the pinhole camera model, spatial object points can be uniquely mapped to two-dimensional image points under given camera parameters, which to a certain extent inspires the enhancement of image features to three-dimensional features. For example, the paper "Orthographic Feature Transform for Monocular 3D Object Detection" (Roddick, T, Kendall, A, Cipolla, R, BMVC, 2019) first proposed the reverse thinking of discretizing spatial information and using three-dimensional voxel queries to enhance image features to top-view features; for example, "BEVFormer: Learning Bird's-Eye-View Representation from Multi-Camera Images via Spatiotemporal Transformers" (Zhiqi Li, Wenhai Wang, Hongyang Li, and et al. ECCV, 2022) was the first to formulate a multi-view based on RGB images. Figure 3 End-to-end training task for object detection.

[0052] However, due to the coplanar assumption, the above algorithm is difficult to apply to 3D density estimation tasks with variable scenes and camera platforms. In order to solve the coplanar assumption problem, for example, the paper "3D Crowd Counting via Geometric Attention-Guided Multi-view Fusion" (Qi Zhang and Antoni B.Chan, International Journal of Computer Vision, 2022) proposes to project multi-view image features multiple times on planes at different heights to obtain three-dimensional feature representation, and then estimate the 3D crowd density. Although this method has dealt with the problem of multiple planes to a certain extent, there are still the following problems: 1) This discrete horizontal plane method still requires the known positions of multiple planes as a priori, and does not strictly get rid of the coplanar assumption; 2) The method of projecting image features onto different planes significantly increases the amount of calculation, which reduces the computational efficiency of the model to a certain extent; 3) This method still needs to ensure that the camera platform is fixed, and it is difficult to deal with situations such as changes in camera viewing angle or number of cameras, making this type of method unapplicable in real scenes.

[0053] To solve the above problems, an embodiment of the present invention proposes a camera platform adaptive feature enhancement, which realizes three-dimensional feature enhancement of any scene and any camera layout platform by using camera parameters, so that feature enhancement does not rely on a fixed camera layout.

[0054] In this embodiment, the camera platform adaptive feature enhancement method includes the following steps:

[0055] Step S10: Obtain camera images and camera parameters at different camera viewing angles.

[0056] It should be noted that the execution subject of the method of this embodiment can be a computing service device with image acquisition, camera parameter acquisition, parameter embedding and feature enhancement functions, such as a personal computer, server, etc., or other electronic devices that can achieve the same or similar functions, such as the above-mentioned camera platform adaptive feature enhancement device, and this embodiment does not limit this. Here, the above-mentioned camera platform adaptive feature enhancement device (referred to as enhancement device) is used to specifically illustrate this embodiment and the following embodiments.

[0057] It should be understood that the camera parameters are numerical parameters of the camera, including camera extrinsic parameters and camera intrinsic parameters, such as focal length, resolution, etc. The camera parameters can be used to map the two-dimensional features of the camera image to three-dimensional features for feature enhancement.

[0058] Step S20: embedding the camera parameters into the two-dimensional image features and three-dimensional volume query of the camera image, establishing an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtaining the three-dimensional features of each viewing angle of the camera.

[0059] It should be noted that two-dimensional image features are features extracted from camera images that describe image content and structure, such as edge features, color features, texture features, etc.

[0060] It can be understood that the 3D volume query is a scene voxel in a camera image that constructs the 3D shape and size information of a human body or an object.

[0061] In a specific implementation, after acquiring camera images and camera parameters of different camera viewing angles, the lifting device can embed the camera parameters into the two-dimensional image features of the camera image, so that the two-dimensional image features have camera parameter information, and then embed the camera parameters into the three-dimensional volume query, so that the volume query and the two-dimensional image features have common information camera parameters, so that the two-dimensional image features and the three-dimensional volume query have a local alignment basis, so that the image distortion law caused by perspective can be learned to overcome the inaccurate alignment caused by perspective distortion and perspective distortion, thereby aligning to obtain the three-dimensional features of each camera viewing angle.

[0062] Step S30: performing multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features.

[0063] It should be noted that the deformable attention mechanism is an attention model for processing three-dimensional features. It introduces learnable deformation parameters based on the traditional attention mechanism, which can dynamically adjust or deform the position and shape of three-dimensional features. This makes the feature representation independent of a single image feature, so that dynamic camera layouts can be effectively processed.

[0064] In the specific implementation, the lifting device uses camera parameters to guide the aggregation of each view of the camera image, considering the contribution of image features from different perspectives to the scene features, so that the feature representation does not depend on a single image feature, thereby effectively processing dynamic camera layouts. Then, the three-dimensional features can be feature lifted through the deformation attention mechanism to achieve feature lifting.

[0065] After acquiring the camera images and camera parameters of different camera angles, the lifting device of this embodiment can embed the camera parameters into the two-dimensional image features of the camera image based on the bridge effect of the camera parameters projected from the three-dimensional world to the two-dimensional world, so that the two-dimensional image features have camera parameter information, and then embed the camera parameters into the three-dimensional volume query, so that the volume query and the two-dimensional image features have common information camera parameters, so that the two-dimensional image features and the three-dimensional volume query have a local alignment basis, so as to align and obtain the three-dimensional features of each camera angle. Then use the camera parameters to guide the aggregation of each view of the camera image, consider the contribution of image features from different angles to the scene features, so that the feature representation does not depend on a single image feature, so that the dynamic camera layout can be effectively processed. Finally, the three-dimensional features are feature lifted through the deformable attention mechanism, so as to achieve feature lifting. Since the present invention takes into account the inaccurate feature alignment caused by perspective distortion and perspective distortion, the camera parameters are respectively embedded into the two-dimensional image features and the three-dimensional volume query, an alignment basis between the two-dimensional image features and the three-dimensional volume query is established to make it learnable, and multi-view feature fusion is performed based on the camera parameters to capture the contribution of the three-dimensional features of different camera perspectives to the scene features, thereby achieving adaptive feature enhancement of the camera platform (including changes in camera appearance and number of cameras).

[0066] refer to Figure 3 , Figure 3 Schematic diagram of the flow chart of the second embodiment of the camera platform adaptive feature enhancement method of the present invention.

[0067] Based on the above first embodiment, in this embodiment, step S20 includes:

[0068] Step S21: embedding the camera parameters into the two-dimensional image features of the camera image to obtain image features that include learnable camera parameter information.

[0069] Step S22: embedding the camera parameters into the three-dimensional volume query of the camera image to obtain a three-dimensional volume query covering learnable camera parameter information.

[0070] Step S23: Based on the pinhole imaging principle and the camera parameters as the alignment basis, the image features are sampled and filled into the three-dimensional volume query through a deformable attention mechanism to obtain the three-dimensional features of each camera perspective.

[0071] In the specific implementation, the process of camera parameter embedding is divided into the following parts: First, the camera parameters can be embedded in the two-dimensional image features, so that the two-dimensional image features have camera parameter information. Then the camera parameters are embedded in the voxel query, so that the three-dimensional query and the two-dimensional image features have common information - camera parameters, so that the two-dimensional image features and the three-dimensional query have a local alignment basis. Finally, based on the pinhole imaging principle and the camera parameters as the alignment basis, the image features are sampled and filled into the three-dimensional query through the deformable attention mechanism to obtain the three-dimensional features of each camera perspective. In this way, the two-dimensional image features and the three-dimensional query can be quickly aligned according to the camera parameters.

[0072] Furthermore, in this embodiment, step S21 includes: based on the camera parameters, given the camera extrinsic parameters, camera intrinsic parameters and image enhancement matrix for transforming the camera image from the scene space to the camera space; transforming the camera extrinsic parameters, the camera intrinsic parameters and the image enhancement matrix, and using a multi-layer perceptron to perform camera parameter learning to construct a camera parameter vector; determining the two-dimensional image features of the camera image; embedding the camera parameter vector into the two-dimensional image features to obtain image features covering learnable camera parameter information.

[0073] It should be noted that the camera extrinsic parameters are parameters that describe the position and posture of the camera in the world coordinate system, and represent the position, orientation, and scale information of the camera relative to the shooting scene.

[0074] It can be understood that the camera intrinsic parameters are parameters that describe the optical parameters and imaging characteristics inside the camera, including focal length, image center point coordinates, pixel spacing, etc., which are used to describe the internal geometric structure and imaging process of the camera.

[0075] It should be noted that the image enhancement matrix is ​​a matrix that corrects the distortion (such as radial distortion and tangential distortion) in the image to obtain the real geometric information. Since the camera often introduces distortion during the imaging process, it causes problems such as straight lines in the image becoming curves or image edges stretching. By correcting the image distortion, the real geometric shape of the object in the camera image can be restored.

[0076] Specifically, refer to Figure 4 , Figure 4The schematic diagram of the 3D crowd density estimation algorithm based on camera parameter feature enhancement of the second embodiment of the camera platform adaptive feature enhancement method of the present invention. According to the camera images {In}n≤N from different perspectives and the camera parameters, the camera extrinsic parameters M∈R representing the transformation from the scene space to the camera space can be given. 3×4 , intrinsic parameter K∈R 3×3 , image enhancement matrix I∈R 2×3 , construct the camera parameter vector ξ∈R by stretching, concatenating and expanding {M,K,I} 27 ×H×W . Simultaneously perform position encoding P I ∈R 2×H×W , for the code at position (u, v) PI(·,u,v) = [u / W,v / H] T H and W represent the length and width of the image respectively. The feature map is defined as F∈R C×H×W , which is embedded into the image-level features of the camera parameters and can be calculated by the formula:

[0077]

[0078] Where [·] represents tensor concatenation, φI:R 29 →R C The multi-layer perceptron (MLP) representing the aggregated position encoding and camera parameters represents the multiplication of the corresponding elements of the two matrices.

[0079] Furthermore, in this embodiment, step S22 includes: acquiring an image scene of the camera image, and rasterizing the image scene to construct a three-dimensional voxel corresponding to the camera image; determining a three-dimensional position code of the three-dimensional voxel; and based on the three-dimensional position code, embedding the camera parameters into a three-dimensional volume query corresponding to the three-dimensional voxel to obtain a three-dimensional volume query covering learnable camera parameter information.

[0080] It should be noted that a 3D voxel is a rasterized volume element of a camera image content in a 3D space, similar to a pixel in a 2D space.

[0081] In actual implementation, Figure 4 As shown, the scene in the camera image can be rasterized into a three-dimensional voxel with a shape of Z×Y×X. For the voxel Ω at position p=(d,h,w) p ∈R C ; Three-dimensional position space encoding P v ∈R 3×Z×Y×X At position P V (·,d,h,w)=[d / Z,h / Y,w / X] T , at this time, embedding the camera parameters into the 3D volume query can be expressed as:

[0082]

[0083] In the formula, φc:R 30 →R C represents the multi-layer perceptron that aggregates 3D position encoding and camera parameters, and ξ has the same meaning as in the above, which represents the camera parameter vector. Since the camera parameters are embedded in both image-level features and 3D volume queries, E C and E V They can be aligned based on camera parameter information to upgrade image-level features to three-dimensional features.

[0084] Furthermore, in this embodiment, step S30 includes: determining the contribution of the three-dimensional features of each view to the scene features according to the camera parameters; and fusing the three-dimensional features of each view according to the contribution to obtain the scene features.

[0085] It should be noted that the contribution is a weight value used in the deformable attention mechanism to measure the importance or contribution of each element in the three-dimensional features of each view to the current output.

[0086] Furthermore, the scene features in this embodiment are expressed as:

[0087] V=Σ n L n ⊙V n ;

[0088] Among them, V represents the scene characteristics, n represents the number of viewing angles, and L n Indicates each view Figure 3 The contribution of dimensional features to scene features, ⊙ represents pixel-by-pixel multiplication, V n Represents the three-dimensional features of the image scene at each viewpoint within the three-dimensional voxel.

[0089] In actual implementation, Figure 4 As shown in Figure 1, a deformable attention mechanism can be used to perform feature enhancement, and the 3D feature fusion process of each viewpoint can be merged into the feature enhancement process to achieve feature enhancement. First, given a voxel Ω at p = (d, h, w) p , the corresponding 3D position (x', y', z') can be expressed as:

[0090] X'=s(wX / 2) y'=s(hY / 2) z'=s(wZ / 2);

[0091] Where s is the size of the voxel Ω in the real world. Assuming the camera's intrinsic parameters K and extrinsic parameters M, the reference point p = (u, v) corresponding to the three-dimensional position point (x', y', z') can be calculated by the above formula:

[0092] [u, v, 1] T =K·M[x', y', z', 1] T ;

[0093] Among them, the three-dimensional features in each voxel can be obtained based on the deformable attention mechanism, as shown in the following formula:

[0094] DeformAttn(Ω p , F) = ∑ h W h ·H h (Ω p , F);

[0095] H h (Ω p , F)=Σ k A hk ·W' h F(p+Δp hk );

[0096] Where W h and W' h are learnable parameters, h and k represent the number of attention heads and the number of sampling points respectively, and W h ∈R C ×C / h , W' h ∈R C / h×C . A hk represents the normalized attention value, Σ k A hk = 1. Δp is the offset reference point of the reference point p, and F(p+Δpk) is the sampling of the above F at the position of p+Δpk by bilinear interpolation.

[0097] Then, the three-dimensional features of each view are fused under the guidance of camera parameters. Compared with the existing multi-view fusion method that can only handle stable and fixed camera layouts, the embodiment of the present invention uses camera parameters to guide the aggregation of each view. {Vn}n≤N is used to represent the three-dimensional features of each view in the scene voxel, and the scene features can be calculated by the following formula:

[0098] V=Σ n L n ⊙V n ;

[0099] Where, L n ∈R 1×Z×Y×X Indicates each view Figure 3 The contribution of the p-dimensional feature to the scene feature, ⊙ represents the pixel-by-pixel multiplication. The weight L of the n-th perspective of the p-th pixel grid p n The calculation method is as follows:

[0100]

[0101] Where S represents all camera views of voxel p, φ:R C →R+ measures the importance of the voxel, Ω n It refers to a volume query in which camera parameters are embedded in the nth view. The process of fusing 3D features of each view angle in the embodiment of the present invention is independent of the arrangement of camera views, and thus can handle dynamic camera layouts.

[0102] Furthermore, in this embodiment, after step S30, it also includes: based on the scene features, convolution processing is performed on the camera image through 3D convolution to obtain a 3D density map corresponding to the camera image, and the camera image includes a crowd image; and the number of people in the camera image is determined according to the 3D density map.

[0103] It should be noted that 3D convolution is a convolution operation performed in three-dimensional space. By combining 3D convolution with 3D pooling, batch normalization, residual connection, etc., the performance and efficiency of image processing can be improved.

[0104] In specific implementation, feature enhancement technology is of great significance for intelligent analysis of multimedia data for 3D density estimation. Traditional feature enhancement technology has coplanar assumptions and camera platform layout consistency constraints. It enhances two-dimensional image features to ground features and then realizes scene features through multi-view feature fusion. It is not suitable for flexible camera platform layout and arbitrarily distributed crowds in actual scenes. In view of the above problems, the embodiment of the present invention uses feature enhancement technology to realize 3D crowd density estimation in practical scenarios, such as Figure 4 As shown, the corresponding camera parameters are combined with the multi-view image features extracted by the feature extractor in some form, so that the two-dimensional image features have camera parameter information; at the same time, the scene is rasterized into voxels of equal size, and the representation of the voxels can be learned. The voxels are projected to the two-dimensional image features through the camera parameters to fill the three-dimensional voxels to obtain three-dimensional feature enhancement, avoiding the assumption of coplanarity; the camera parameters are used as the leading factor to learn the contribution of different view features to the three-dimensional voxels, so as to achieve the feature fusion of multiple views to obtain the feature expression at the scene level, so that the algorithm does not rely on the image sorting and the number of view angles, and realizes the multi-view fusion of any camera layout; finally, based on the scene features, the camera image can be convolved by combining 3D convolution with 3D pooling, batch normalization, residual connection, etc. to obtain the 3D density map corresponding to the camera image, and the camera image includes a crowd image. Then, the number of people in the camera image is determined according to the 3D density map. Thereby, the 3D crowd density estimation of practical scenes (any plane, any camera platform) is realized.

[0105] Through experiments on multiple multi-view datasets (including DukeMTMC, PETS2009 and CityStreet), the performance comparison with 3D density estimation methods is shown in Tables 1 to 3. The visualization on the PETS2009 dataset is shown in Figure 5 As shown, Figure 5 This is a visualization diagram of the second embodiment of the camera platform adaptive feature enhancement method of the present invention on the PETS2009 dataset.

[0106]

[0107] Table 1

[0108]

[0109] Table 2

[0110]

[0111] Table 3

[0112] Among them, Table 1 is a performance comparison of the camera platform adaptive feature enhancement method and the 3D density estimation method on DukeMTMC according to an embodiment of the present invention. Table 2 is a performance comparison of the camera platform adaptive feature enhancement method according to an embodiment of the present invention on PETS2009. Table 3 is a performance comparison of the camera platform adaptive feature enhancement method according to an embodiment of the present invention on CityStreet.

[0113] Through the above experiments conducted on multiple large-scale data, the results show that the camera platform adaptive feature enhancement method of the embodiment of the present invention can perform robust 3D crowd density estimation in any scene and any camera layout platform.

[0114] The camera parameters corresponding to this embodiment are combined with the multi-view image features extracted by the feature extractor in some form, so that the two-dimensional image features have camera parameter information; at the same time, the scene is rasterized into voxels of equal size, and the voxels are projected to the two-dimensional image features through the camera parameters to fill the three-dimensional voxels to obtain three-dimensional feature enhancement, avoiding the assumption of coplanarity. Then, the camera parameters are used as the leading factor to learn the contribution of different view features to the three-dimensional voxels, so as to achieve the feature fusion of multiple views to obtain the feature expression at the scene level, so that the algorithm does not rely on the image sorting and the number of view angles, and realizes the multi-view fusion of any camera layout. Finally, based on the scene features, the camera image can be convolved by combining 3D convolution with 3D pooling, batch normalization, residual connection, etc. to obtain the 3D density map corresponding to the camera image, and the camera image includes a crowd image. Then, the number of people in the camera image is determined according to the 3D density map. Thereby, 3D crowd density estimation of practical scenes (any plane, any camera platform) is realized.

[0115] In addition, an embodiment of the present invention further proposes a storage medium, on which a camera platform adaptive feature enhancement program is stored. When the camera platform adaptive feature enhancement program is executed by a processor, the steps of the camera platform adaptive feature enhancement method described above are implemented.

[0116] Reference Figure 6 , Figure 6 It is a structural block diagram of the first embodiment of the camera platform adaptive feature enhancement device of the present invention.

[0117] like Figure 6 As shown, the camera platform adaptive feature enhancement device proposed in the embodiment of the present invention includes:

[0118] The parameter acquisition module 701 is used to acquire camera images and camera parameters at different camera viewing angles;

[0119] A parameter embedding module 702 is used to embed the camera parameters into the two-dimensional image features and the three-dimensional volume query of the camera image, establish an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtain the three-dimensional features of each viewing angle of the camera;

[0120] The feature fusion module 703 is used to perform multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features.

[0121] After acquiring the camera images and camera parameters of different camera angles, the lifting device of this embodiment can embed the camera parameters into the two-dimensional image features of the camera image based on the bridge effect of the camera parameters projected from the three-dimensional world to the two-dimensional world, so that the two-dimensional image features have camera parameter information, and then embed the camera parameters into the three-dimensional volume query, so that the volume query and the two-dimensional image features have common information camera parameters, so that the two-dimensional image features and the three-dimensional volume query have a local alignment basis, so as to align and obtain the three-dimensional features of each camera angle. Then use the camera parameters to guide the aggregation of each view of the camera image, consider the contribution of image features from different angles to the scene features, so that the feature representation does not depend on a single image feature, so that the dynamic camera layout can be effectively processed. Finally, the three-dimensional features are feature lifted through the deformable attention mechanism, so as to achieve feature lifting. Since the present invention takes into account the inaccurate feature alignment caused by perspective distortion and perspective distortion, the camera parameters are respectively embedded into the two-dimensional image features and the three-dimensional volume query, an alignment basis between the two-dimensional image features and the three-dimensional volume query is established to make it learnable, and multi-view feature fusion is performed based on the camera parameters to capture the contribution of the three-dimensional features of different camera perspectives to the scene features, thereby achieving adaptive feature enhancement of the camera platform (including changes in camera appearance and number of cameras).

[0122] Based on the first embodiment of the camera platform adaptive feature enhancement device of the present invention, a second embodiment of the camera platform adaptive feature enhancement device of the present invention is proposed.

[0123] In this embodiment, the parameter embedding module 702 is further used to embed the camera parameters into the two-dimensional image features of the camera image to obtain image features covering learnable camera parameter information; embed the camera parameters into the three-dimensional volume query of the camera image to obtain the three-dimensional volume query covering the learnable camera parameter information; based on the pinhole imaging principle and the camera parameters as the alignment basis, the image features are sampled and filled into the three-dimensional volume query through a deformable attention mechanism to obtain the three-dimensional features of each viewing angle of the camera.

[0124] Furthermore, the parameter embedding module 702 is also used to, based on the camera parameters, give the camera extrinsic parameters, camera intrinsic parameters and image enhancement matrix of the camera image transformed from the scene space to the camera space; transform the camera extrinsic parameters, the camera intrinsic parameters and the image enhancement matrix, and use a multi-layer perceptron to perform camera parameter learning to construct a camera parameter vector; determine the two-dimensional image features of the camera image; embed the camera parameter vector into the two-dimensional image features to obtain image features covering the learnable camera parameter information.

[0125] Furthermore, the parameter embedding module 702 is also used to obtain the image scene of the camera image, and rasterize the image scene to construct a three-dimensional voxel corresponding to the camera image; determine the three-dimensional position code of the three-dimensional voxel; based on the three-dimensional position code, embed the camera parameters into the three-dimensional volume query corresponding to the three-dimensional voxel to obtain a three-dimensional volume query covering the learnable camera parameter information.

[0126] Furthermore, the feature fusion module 703 is also used to determine the contribution of the three-dimensional features of each view to the scene feature according to the camera parameters; and to fuse the three-dimensional features of each view according to the contribution to obtain the scene feature.

[0127] Furthermore, the scene feature is expressed as:

[0128] V=Σ n L n ⊙V n ;

[0129] Among them, V represents the scene characteristics, n represents the number of viewing angles, and L n Indicates each view Figure 3 The contribution of dimensional features to scene features, ⊙ represents pixel-by-pixel multiplication, V n Represents the three-dimensional features of the image scene at each viewpoint within the three-dimensional voxel.

[0130] Furthermore, the camera platform adaptive feature enhancement device also includes a density estimation module 704, which is used to perform convolution processing on the camera image through 3D convolution based on the scene features to obtain a 3D density map corresponding to the camera image, wherein the camera image includes a crowd image; and determine the number of people in the camera image according to the 3D density map.

[0131] Other embodiments or specific implementations of the camera platform adaptive feature enhancement device of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.

[0132] 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 system 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 system. 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 system including the element.

[0133] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0135] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A camera platform adaptive feature enhancement method, characterized in that: The camera platform adaptive feature enhancement method comprises: Obtain camera images and camera parameters at different camera angles; Embedding the camera parameters into the two-dimensional image features and the three-dimensional volume query of the camera image, establishing an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtaining the three-dimensional features of each viewing angle of the camera; Based on the camera parameters, multi-view feature fusion is performed on the three-dimensional features to obtain scene features.

2. The camera platform adaptive feature enhancement method according to claim 1, characterized in that: The embedding of the camera parameters into the two-dimensional image features of the camera image and the three-dimensional volume query, establishing an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtaining the three-dimensional features of each viewing angle of the camera includes: Embedding the camera parameters into the two-dimensional image features of the camera image to obtain image features that include learnable camera parameter information; embedding the camera parameters into a three-dimensional volume query of the camera image to obtain a three-dimensional volume query containing learnable camera parameter information; Based on the pinhole imaging principle and the camera parameters as the alignment basis, the image features are sampled and filled into the three-dimensional volume query through a deformable attention mechanism to obtain the three-dimensional features of each camera perspective.

3. The camera platform adaptive feature enhancement method according to claim 2, characterized in that: The step of embedding the camera parameters into the two-dimensional image features of the camera image to obtain image features containing learnable camera parameter information includes: Based on the camera parameters, camera extrinsic parameters, camera intrinsic parameters and an image enhancement matrix for transforming the camera image from the scene space to the camera space are given; The camera extrinsic parameters, the camera intrinsic parameters and the image enhancement matrix are transformed, and a camera parameter vector is constructed by performing camera parameter learning using a multi-layer perceptron; determining two-dimensional image features of the camera image; The camera parameter vector is embedded into the two-dimensional image feature to obtain an image feature that includes learnable camera parameter information.

4. The camera platform adaptive feature enhancement method according to claim 3, characterized in that: The embedding the camera parameters into the three-dimensional volume query of the camera image to obtain the three-dimensional volume query covering the learnable camera parameter information includes: Acquire an image scene of the camera image, and rasterize the image scene to construct a three-dimensional voxel corresponding to the camera image; Determining a three-dimensional position code of the three-dimensional voxel; Based on the three-dimensional position encoding, the camera parameters are embedded in a three-dimensional volume query corresponding to the three-dimensional voxel to obtain a three-dimensional volume query covering learnable camera parameter information.

5. The camera platform adaptive feature enhancement method according to claim 4, characterized in that: The step of performing multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features comprises: Determining the contribution of the three-dimensional features of each view to the scene features according to the camera parameters; The three-dimensional features of the views are fused according to the contribution to obtain scene features.

6. The camera platform adaptive feature enhancement method according to claim 5, characterized in that: The scene features are expressed as: V=∑ n L n ⊙V n ; Among them, V represents the scene characteristics, n represents the number of viewing angles, and L n represents the contribution of each view's 3D features to the scene features, ⊙ represents pixel-by-pixel multiplication, V n Represents the three-dimensional features of the image scene at each viewpoint within the three-dimensional voxel.

7. The camera platform adaptive feature enhancement method according to claim 6, characterized in that: After performing multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features, the method further includes: Based on the scene features, convolution processing is performed on the camera image by 3D convolution to obtain a 3D density map corresponding to the camera image, wherein the camera image includes a crowd image; The number of people in the camera image is determined based on the 3D density map.

8. A camera platform adaptive feature enhancement device, characterized in that: The device comprises: A parameter acquisition module is used to obtain camera images and camera parameters at different camera viewing angles; A parameter embedding module, used to embed the camera parameters into the two-dimensional image features and three-dimensional volume query of the camera image, establish an alignment basis between the two-dimensional image features and the three-dimensional volume query, and obtain the three-dimensional features of each viewing angle of the camera; The feature fusion module is used to perform multi-view feature fusion on the three-dimensional features based on the camera parameters to obtain scene features.

9. A camera platform adaptive feature enhancement device, characterized in that: The device comprises: a memory, a processor, and a camera platform adaptive feature enhancement program stored in the memory and executable on the processor, wherein the camera platform adaptive feature enhancement program is configured to implement the steps of the camera platform adaptive feature enhancement method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a camera platform adaptive feature enhancement program, which, when executed by a processor, implements the steps of the camera platform adaptive feature enhancement method according to any one of claims 1 to 7.