Context model-based Instant-NGP model compression method

Through the Instant-NGP model compression method based on the context model, the inter-layer and inter-dimensional context model is used for parameter value prediction, and combined with hash fusion and arithmetic coding technology, the problem of large storage space of the Instant-NGP model is solved and more than 100 times compression effect, significantly saving storage space.

CN118586471AActive Publication Date: 2024-09-03SHANGHAI JIAOTONG UNIV +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410704702.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-03
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

Due to the introduction of explicit hash representation, the Instant-NGP model has a large storage space, and the existing technology has limited effect in compressing it.

Method used

A context-based model is used to estimate parameter values ​​in hash representations, probabilistic predictions are provided through inter-layer and inter-dimensional context models, and hash fusion and arithmetic coding techniques are used to achieve model compression.

Benefits of technology

It effectively reduces the information entropy of hash representation, removes structural and dimensional redundancy, improves the accuracy of parameter value prediction, achieves a compression effect of more than 100 times, and saves storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586471A
    Figure CN118586471A
Patent Text Reader

Abstract

The invention discloses an Instant-NGP model compression method based on a context model, and the method comprises the steps: constructing and training a customized context model for three-dimensional and two-dimensional mixed Hash representation, carrying out the probability estimation of parameter values in a Hash table, fusing the information of all index nodes which generate Hash conflicts in the estimated parameter values, and carrying out the compression of an Instant-NGP model. And entropy coding is realized through an arithmetic coding technology, and the purpose of model compression is realized. According to the method, a context model is introduced to estimate a binarized parameter value in Hash representation so as to reduce the information entropy of the binarized parameter value, and finally the purpose of compression is achieved by using an arithmetic coding technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a technology in the field of neural network applications, specifically an Instant-NGP model compression method based on a context model. Background Art

[0002] Instant-NGP is a model that uses multi-view image rendering to synthesize three-dimensional scenes ("SIGGRAPH Instant Neural Graphics Primitives with a Multiresolution Hash Encoding"). Due to the introduction of explicit hash representation, the model has a large storage space. Based on this, BiRF introduces a mixed three-dimensional and two-dimensional hash representation ("Binary radiance fields"), and binarizes the parameters of the hash representation to +1 or -1, thereby achieving preliminary compression of the hash representation. The present invention further compresses the mixed hash representation of Instant-NGP based on this BiRF. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the present invention proposes an Instant-NGP model compression method based on a context model, introduces a context model to estimate the binary parameter values ​​in the hash representation to reduce its information entropy, and finally uses arithmetic coding technology to achieve the purpose of compression.

[0004] The present invention is achieved through the following technical solutions:

[0005] The present invention relates to an Instant-NGP model compression method based on a context model. A context model customized for a three-dimensional and two-dimensional mixed hash representation is constructed and trained to perform probability estimation on parameter values ​​in a hash table. The information of all index nodes that generate hash conflicts in the estimated parameter values ​​is then hashed and fused. Entropy coding is then performed through arithmetic coding technology to achieve the purpose of model compression.

[0006] The context model includes: an inter-layer context model and an inter-dimensional context model, wherein: the inter-layer context model uses a shallow hash representation to provide inter-layer context information for a deep hash representation through linear interpolation based on the multi-layer and multi-resolution characteristics of the hash representation; the inter-dimensional context model projects the reconstructed three-dimensional hash representation into two dimensions, and provides inter-dimensional context information for the two-dimensional hash representation through linear interpolation.

[0007] The inter-layer context information is obtained specifically in the following manner: the shallow layer is first decoded and used to provide a contextual basis for estimating the parameter value of the deep layer: for a parameter in the deep layer that needs to be probabilistically estimated, the position of the corresponding grid point is found through the hash index, and the position of the grid point is used to perform linear interpolation in the hash representation of the shallow layer to obtain context information. After this context information is input into a multi-layer perceptron (MLP), the probability prediction of the parameter value is realized.

[0008] The probability prediction described above adopts the Bernoulli probability model. For a predicted value p, if the true value of the current parameter is +1, then its probability is p; conversely, if the true value of the current parameter is -1, then its probability is 1-p.

[0009] The linear interpolation is a step of using the characteristic values ​​of the adjacent points and performing weighted summation with reference to the distance between the current grid point and the adjacent points. Taking one-dimensional linear interpolation as an example, for point C located between line segments AB, specifically: Where: f A and f B are the characteristic values ​​of point A and point B, respectively, C is the characteristic value of point C obtained by interpolation, D AC and D CB are the lengths of line segments AC and CB, respectively, and D AB is the length of line segment AB.

[0010] The multi-layer perceptron (MLP) is a neural network module composed of a number of neural network units.

[0011] The inter-dimensional context information is specifically obtained in the following manner: the three-dimensional hash representation is decoded using the above-mentioned inter-layer context model, and after dimensionality reduction projection is performed to two dimensions, the context information is provided for the two-dimensional hash representation using the same-layer context model.

[0012] The dimensionality reduction projection method is to calculate the ratio of +1 parameters to all parameters on the axis to be reduced.

[0013] The hash fusion means that after obtaining the predicted probability values ​​of all indexed grid points using the inter-layer context model and the inter-dimensional context model, these probability values ​​are weighted summed using the normalized AOE weights as the final probability estimate of the parameter, specifically: in: is the probability value on the grid point predicted by the above inter-layer and inter-dimensional context model, p i is for the current parameter θ i The final fused probability prediction value, normalized AOE weight K is the value for the current parameter θ i The number of grid points to index.

[0014] The AOE is an intersection volume, which is numerically calculated as the intersection volume of the interpolation range of the grid point and the effective occupied grid in the Instant-NGP model. The definition of the occupied grid can refer to the concept in the Instant-NGP model.

[0015] When the parameter θ i If the AOE of all corresponding grid points is 0, it means that the parameter is not applied to the rendering and can be directly removed to reduce the model size.

[0016] The present invention relates to a system for implementing the above method, comprising: an inter-layer context module, an inter-dimensional context module and a hash fusion module, wherein: the inter-layer context module predicts the numerical probability of the parameter according to the multi-layer and multi-resolution characteristics of the hash representation through the context prediction relationship from the shallow layer to the deep layer; the inter-dimensional context module uses the three-dimensional hash representation to provide context information for the two-dimensional hash representation, thereby improving the latter's parameter prediction accuracy; the hash fusion module utilizes the characteristics of the hash index to fuse the prediction probabilities on all grid points indexed by the current parameter, thereby improving the prediction accuracy of the current parameter. Technical Effects

[0017] The present invention utilizes an inter-layer context model designed with multiple layers and multiple resolutions of hash representation to effectively remove the structural redundancy of this hash representation and effectively reduce information entropy. The inter-dimensional context model designed with the inter-dimensional relationship of three-dimensional hash representation and two-dimensional hash representation effectively removes the inter-dimensional redundancy of this hash representation and realizes model compression. Through the hash fusion module, hash conflicts are effectively utilized to improve the accuracy of parameter value prediction, thereby ensuring the effectiveness of compression. Compared with the prior art, the present invention can predict parameter values ​​in hash representation, use the Bernoulli mathematical model to obtain the probability of prediction accuracy, and use arithmetic coding based on this probability to perform entropy coding compression, thereby reducing the bit consumption during encoding and achieving the purpose of saving storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is the main flow chart of the present invention;

[0019] Figure 2 A schematic diagram of the relationship between the present invention and the benchmark model Instant-NGP;

[0020] In the figure: the upper left part shows the process of the benchmark model Instant-NGP, the lower left part shows the schematic diagram of the action area of ​​the proposed inter-layer and inter-dimensional context models; the right part shows the schematic diagram of the reduction of the spatial size after compression. In the illustrated example, a compression effect of more than 100 times is achieved;

[0021] Figure 3 The system module block diagram is as follows: a schematic diagram of the inter-layer context model of hash representation;

[0022] Figure 4 The system module block diagram is as follows: a schematic diagram of the inter-dimensional context model represented by hashing;

[0023] Figure 5 The system module block diagram is as follows: the schematic diagram of the hash fusion module;

[0024] Figure 6 This is a diagram of the subjective effect of the present invention compared with the benchmark methods Instant-NGP and BiRF. DETAILED DESCRIPTION

[0025] like Figure 2 As shown, this embodiment relates to an Instant-NGP model compression method based on a context model, including:

[0026] Step 1: Collect multi-view images and their corresponding view parameters, including:

[0027] 1.1 Arrange multiple cameras of the same model in a hemispherical shape, place the object to be photographed in the center, and press the camera shutter at the same time to obtain multi-view images of the object. Or use a camera device to capture multi-view images of a scene from multiple different perspectives.

[0028] 1.2 Collect the camera's internal parameters and the camera's posture during arrangement to obtain the viewing angle parameters.

[0029] Step 2: Construct an end-to-end network including Instant-NGP and corresponding compression modules, including:

[0030] 2.1 Construct a mixed three-dimensional and two-dimensional hash representation, and use BiRF technology to binarize the parameters in the hash representation into +1 and -1.

[0031] 2.2 According to the multi-layer and multi-resolution characteristics of hash representation, an inter-layer context model is first constructed, and the shallow hash representation is used to provide inter-layer context information for the deep hash representation through linear interpolation. Figure 3 As shown: After recovering the shallow hash representation through decoding, the context information is provided for the corresponding grid points of the hash representation of the current layer by linear interpolation, and combined with the frequency f of +1 in the current layerG Input into the multi-layer perceptron (MLP) together to obtain the predicted value p of the current grid point i , and calculate the probability of the point being predicted correctly using Bernoulli distribution.

[0032] 2.3 Constructing inter-dimensional context model: After mapping the three-dimensional hash representation obtained by decoding in step 2.2 to two dimensions, the inter-dimensional context information is provided for the two-dimensional hash representation by linear interpolation. Figure 4 As shown, the inter-dimensional context model obtains the three-dimensional part of the hash representation by decoding, and then reduces the dimension of the three-dimensional part along any dimension in the xyz axis to obtain the corresponding two-dimensional representation; when decoding the two-dimensional part of the hash representation, the grid position is used to perform linear interpolation on the representation after the above-mentioned dimensionality reduction projection to obtain context information.

[0033] 2.4 The hash fusion module is introduced to fuse all the grid points indexed by the hash of the parameters, such as Figure 5 As shown: For a parameter θ i , all grid points indexed by it are first calculated through steps 2.2 and 2.3 to obtain the predicted probability Then pass Weighted summation to obtain the parameter θ i The final predicted probability Then calculate the number of bits consumed by calculating information entropy The weight The method of obtaining is through AOE normalization.

[0034] 2.5 After obtaining the probability of each grid point through steps 2.2 and 2.3, the probabilities on these grid points are fused into the corresponding parameters θ in step 2.4 i And get the final predicted probability p i After that, entropy coding can be performed through arithmetic coding to achieve model compression.

[0035] Step 3: Input the multi-view images and view parameters collected in step 1 into the end-to-end network constructed in step 2 for training, perform arithmetic coding on the network parameters obtained after training, and use the loss function L = L mse +λL entropy / M, where: L mse is the mean square error function, which is the rendering quality loss part originally used in Instant-NGP and BiRF technologies, and measures the similarity between the rendered image and the true image; L entropyIt is the loss part proposed by the present invention, which is used to measure the number of bits consumed by the hash representation and directly reflects the model size. λ is a trade-off parameter between the two parts. The larger λ is, the smaller the compressed model is but the lower the rendering quality is, and vice versa. M is the number of all parameters in the hash representation, L is entropy is calculated as the sum of the number of bits consumed by all parameters in the hash representation: Where L represents the number of layers of hash representation, and I represents the number of parameters in the current layer.

[0036] The arithmetic coding means that after a numerical value and its corresponding prediction probability are given, it is represented by a bit stream of "01".

[0037] After specific practical experiments, in the specific environment settings of NVIDIA 3090GPU, the initial learning rate is set to 0.01 and the number of training steps is 20,000 rounds. For three-dimensional hash representation, the number of layers used is 12, the shallowest layer resolution is 16, and the deepest layer resolution is 512; for two-dimensional hash representation, the number of layers used is 4, the shallowest layer resolution is 128, and the deepest layer resolution is 1024. For three-dimensional hash representation, the upper limit of the hash table length of each layer is 2 19 ; For two-dimensional hash representation, the upper limit of the hash table length at each layer is 2 17 In the inter-layer context, the number of shallow layers that provide context information for the deep layer is 3. The dimension F of the parameters in the hash representation is set to 8. λ is set to 0.7e-3 to 4e-3. The results shown in Tables 1 to 3 are obtained by the above method.

[0038] Table 1 Experimental results of the present invention on the Synthetic-NeRF dataset (F=8, λ=1e-3)

[0039] Table 2 Experimental results of BiRF on Synthetic-NeRF dataset (F=8) Scenario PSNR↑ SSIM↑ LPIPS↓ Model size (MB)↓ chair 36.17 0.986 0.016 5.6 drums 26.05 0.937 0.063 5.7 ficus 34.71 0.984 0.018 5.8 hotdog 37.51 0.981 0.028 5.8 lego 36.48 0.982 0.015 5.8 materials 30.09 0.951 0.051 5.7 mic 37.44 0.992 0.009 5.6 ship 30.27 0.897 0.112 6.0 average 33.59 0.964 0.039 5.8

[0040] Table 3 Experimental results of Instant-NGP on Synthetic-NeRF dataset (F=8) Scenario PSNR↑ SSIM↑ LPIPS↓ Model size (MB)↓ chair 35.91 0.986 0.021 45.56 drums 25.18 0.933 0.092 45.56 ficus 33.76 0.983 0.024 45.56 hotdog 37.48 0.983 0.034 45.56 lego 35.86 0.981 0.022 45.56 materials 29.65 0.950 0.069 45.56 mic 36.98 0.992 0.014 45.56 ship 30.93 0.896 0.138 45.56 average 33.22 0.963 0.052 45.56

[0041] Compared with the prior art, the present invention achieves a smaller model while achieving the same or higher rendering quality by accurately predicting the parameter values ​​in the hash representation.

[0042] The above-mentioned specific implementation can be partially adjusted in different ways by those skilled in the art without departing from the principle and purpose of the present invention. The protection scope of the present invention shall be based on the claims and shall not be limited by the above-mentioned specific implementation. Each implementation scheme within its scope shall be subject to the constraints of the present invention.

Claims

1. A context model-based Instant-NGP model compression method, characterized in that: By constructing and training a context model customized for 3D and 2D mixed hash representation, it is used to estimate the probability of parameter values ​​in the hash table, and then hashing the information of all index nodes that produce hash conflicts in the estimated parameter values, and then implementing entropy coding through arithmetic coding technology to achieve the purpose of model compression; The context model includes: an inter-layer context model and an inter-dimensional context model, wherein: the inter-layer context model uses a shallow hash representation to provide inter-layer context information for a deep hash representation through linear interpolation based on the multi-layer and multi-resolution characteristics of the hash representation; the inter-dimensional context model projects the reconstructed three-dimensional hash representation into two dimensions, and provides inter-dimensional context information for the two-dimensional hash representation through linear interpolation.

2. The context model-based Instant-NGP model compression method according to claim 1, characterized in that: The inter-layer context information is obtained specifically in the following manner: the shallow layer is first decoded and used to provide a contextual basis for estimating the parameter value of the deep layer: for a parameter in the deep layer that needs to be probabilistically estimated, the position of the corresponding grid point is found through the hash index, and the position of the grid point is used to perform linear interpolation in the hash representation of the shallow layer to obtain context information. After this context information is input into a multi-layer perceptron (MLP), the probability prediction of the parameter value is realized.

3. The context model-based Instant-NGP model compression method according to claim 2, characterized in that: The probability prediction described above adopts the Bernoulli probability model. For a predicted value p, if the true value of the current parameter is +1, then its probability is p; conversely, if the true value of the current parameter is -1, then its probability is 1-p.

4. The context model-based Instant-NGP model compression method according to claim 2, characterized in that: The linear interpolation is a step of using the characteristic values ​​of the adjacent points and performing weighted summation with reference to the distance between the current grid point and the adjacent points. Taking one-dimensional linear interpolation as an example, for point C located between line segments AB, specifically: Where: f A and f B are the characteristic values ​​of point A and point B, respectively, C is the characteristic value of point C obtained by interpolation, D AC and D CB are the lengths of line segments AC and CB, respectively, and D AB is the length of line segment AB.

5. The context model-based Instant-NGP model compression method according to claim 1, characterized in that: The inter-dimensional context information is specifically obtained in the following manner: the three-dimensional hash representation is decoded using the above-mentioned inter-layer context model, and after dimensionality reduction projection is performed to two dimensions, the context information is provided for the two-dimensional hash representation using the same-layer context model.

6. The context model-based Instant-NGP model compression method according to claim 5, characterized in that: The dimensionality reduction projection method is to calculate the ratio of +1 parameters to all parameters on the axis to be reduced.

7. The context model-based Instant-NGP model compression method according to claim 1, characterized in that: The hash fusion means that after obtaining the predicted probability values ​​of all indexed grid points using the inter-layer context model and the inter-dimensional context model, these probability values ​​are weighted summed using the normalized AOE weights as the final probability estimate of the parameter, specifically: in: is the probability value on the grid point predicted by the above inter-layer and inter-dimensional context model, p i is for the current parameter θ i The final fused probability prediction value, normalized AOE weight K is the value for the current parameter θ i The number of grid points to index.

8. The context model-based Instant-NGP model compression method according to claim 7, characterized in that: When the parameter θ i If the AOE of all corresponding grid points is 0, it means that the parameter is not applied to the rendering and can be directly removed to reduce the model size.

9. An Instant-NGP model compression system based on a context model for implementing any of the methods described in claims 1-8, characterized in that: include: An inter-layer context module, an inter-dimensional context module, and a hash fusion module, wherein: the inter-layer context module predicts the numerical probability of the parameter by predicting the context relationship from the shallow layer to the deep layer according to the multi-layer and multi-resolution characteristics of the hash representation; the inter-dimensional context module uses the three-dimensional hash representation to provide context information for the two-dimensional hash representation, thereby improving the latter's parameter prediction accuracy; The hash fusion module uses the characteristics of hash indexing to fuse the prediction probabilities of all grid points indexed by the current parameter, thereby improving the prediction accuracy of the current parameter.

Citation Information

Patent Citations

  • Context-sensitive search using a deep learning model

    CN106415535A

  • Weakly-supervised depth context-aware image characterization method and weak-supervised depth context-aware image characterization system

    CN112667841A

  • Image reconstruction method and system

    CN114998548A

  • Cloth image deep hash retrieval method based on multi-scale feature fusion

    CN115587210A

  • Image processing method and device based on deep learning

    CN116883696A