Light field image lightweight semantic segmentation method based on cross-view association and parallax estimation

By combining cross-view association and disparity estimation with lightweight modules, the deployment problem of light field semantic segmentation on resource-constrained devices is solved, efficient light field image segmentation is achieved, and the model size and computational complexity are significantly reduced while maintaining High-precision segmentation effect.

CN118587430APending Publication Date: 2024-09-03TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing light field semantic segmentation technology is difficult to deploy on devices with limited resources, mainly due to limitations in computing power, storage space, and energy consumption. Moreover, traditional methods cannot effectively utilize the spatial angle information of light field images, resulting in a large number of parameters and complex calculations. High density makes it difficult to achieve lightweighting.

Method used

Using cross-view correlation and disparity estimation methods, the light field image is divided into a center view and a reference view, introducing lightweight self-attention, cross-attention, channel attention module and dual-attention feature fusion module, combined with depth separability Convolution replaces traditional convolution schemes, reduces the number of parameters and computational load, and enhances feature expression.

Benefits of technology

It achieves lightweight light field semantic segmentation, significantly reduces model size and computational complexity, while maintaining high-precision segmentation effects. It is suitable for deployment on resource-constrained devices. The model is reduced to 50% of other semantic segmentation models. The mIoU indicator is not significantly reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587430A
    Figure CN118587430A
Patent Text Reader

Abstract

The invention relates to a light field image lightweight semantic segmentation method based on cross-view association and parallax estimation, and the method comprises the steps: firstly processing all images of a light field to obtain a depth estimation file, enabling the depth estimation file to conveniently guide the propagation of the features of other reference views to a central view, and then randomly carrying out the segmentation of the features of the central view from the level of the central view; reference views obtained in the vertical direction and the diagonal direction and the central image are sent to the same Backbone together for preliminary feature extraction, then the central view is subjected to self-attention mechanism processing, and other reference view features are subjected to cross attention with the central view; and finally, sequentially aggregating the obtained features, and sending the aggregated features into a segmentation module for processing to obtain a final segmentation result image. According to the method provided by the invention, the number of parameters of the model and the calculation load are successfully reduced, the accuracy is not greatly reduced, and the model is more suitable for being deployed on resource-limited equipment while the performance of the model is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a light field image lightweight semantic segmentation method based on cross-view association and disparity estimation, which is the basis of computer vision tasks and plays an important role in the fields of human-computer interaction, virtual reality and light field image analysis. This method makes up for the limitation that resource-constrained devices (such as mobile devices, embedded systems and edge computing devices, etc.) cannot deploy light field semantic segmentation technology due to computing power, storage space and energy consumption limitations. The design of combining multi-view association in light field images with disparity estimation algorithms greatly enhances the semantic correlation between multiple channels, and can capture a wider range of contextual information while maintaining high computing efficiency. With the help of lightweight module design, the number of parameters and computational load of the model are greatly reduced, and various indicators are maintained at a relatively excellent level, which makes it more suitable for deployment on resource-constrained devices while optimizing model performance. Background Art

[0002] Light field semantic segmentation is a computer vision task that implements pixel-level semantic classification in light field images. It is widely used in image analysis, scene understanding, autonomous driving, medical image processing and other fields. Since this task uses high-dimensional 4D light field images containing rich geometric structure and angle information, and assigns corresponding semantic labels to each pixel in the light field image for semantic segmentation, it requires huge time and space in actual use. Chen et al. proposed the first CNN-based method to achieve light field semantic segmentation. This method uses the feature extraction backbone to process MacPI to obtain the result of the entire light field, but only using the two-dimensional information of the light field image cannot fully utilize the spatial angle information of the light field itself. Sheng et al. used light fields to refine the results of the center view image. Based on the existing image semantic segmentation work, this method inserted a new branch to mine structural information from the EPI mountain to refine the center view features. However, the lines in the EPIs are easily affected by noise and occlusion, and the information involved in more than half of the views is discarded. LFIE-Net introduces explicit-implicit branches to generate disparity maps within the network, and works with sub-aperture images to achieve dense semantic segmentation. This method fully exploits the spatial and angular information of the light field, but it also introduces more parameters and computation. Although light field semantic segmentation technology has been continuously developed in recent years, in order to improve the segmentation effect, the computational load introduced by the overall structure has been ignored for a long time, which hinders their application on resource-constrained hardware. In addition, in the process of realizing the lightweight semantic segmentation of light field images, no matter what form the light field image is taken as input (sub-aperture image, macro-pixel image, EPI image or a combination of some of these images), it will inevitably generate a huge amount of parameters, and this information will exist in the entire network processing flow. The rapid development of natural image semantic segmentation has enabled it to achieve accurate segmentation in real time, but the work on the lightweight semantic segmentation of light field images has not yet been carried out. Therefore, the lightweight semantic segmentation of light field images is still a difficult and challenging task.

[0003] To address the above shortcomings, we first divide the single-branch input in the traditional algorithm into three branches, using the center view image, N reference view images, and 1 disparity estimation map to replace the n×n sub-aperture images in the traditional input of the light field. In the three branches, we introduced lightweight self-attention, cross-attention, channel attention module and dual attention feature fusion module DAFM (Dual Attention Feature Fusion Module), so that the output features can show more detailed information; the image is processed by the pre-trained Backbone (Resnet), the center view is processed by the self-attention mechanism, and the other reference view features are cross-attentioned with the center view respectively; in addition, we also introduced the depth separable convolution, which is a type of convolution operation consisting of two steps: deep convolution and point-by-point convolution. We widely use it in feature encoding, replacing the traditional convolution scheme, and realizing the lightweight of the overall structure. After the above method design, the problem of difficulty in lightweighting in the field of semantic segmentation of light field images can be effectively improved. Therefore, the invention of a lightweight semantic segmentation method for light field images based on the combination of cross-view association and disparity estimation algorithm can solve the above problems while ensuring accurate segmentation effect. Summary of the invention

[0004] The present invention aims to provide a light field image lightweight semantic segmentation method based on cross-view correlation and disparity estimation, so as to achieve accurate segmentation of light field images and solve the problems existing in the field of light field image lightweighting.

[0005] The light field image lightweight semantic segmentation method includes the following steps:

[0006] 1. Obtain a public dataset for semantic segmentation of light field images: UrbanLF, an urban scene light field dataset, shot with an angle resolution of 9×9, with a total of 824 sets and 66,744 images, including 580 training sets, 164 test sets, and 80 validation sets;

[0007] 2. Data preprocessing: Use the OAVC (Occlusion-aware Vote Cost) light field depth estimation method to obtain the disparity estimation result of the central view, and randomly sample a total of N images in eight image stacks in the horizontal, vertical, left and right diagonal directions as reference view images;

[0008] 3. Use the pre-trained ResNet50 to perform preliminary feature extraction on the center view image and N reference view images respectively;

[0009] 4. Calculate the spatial correlation between the obtained reference view features and the obtained disparity estimation features of the central view. Considering that different perspectives contribute differently to the final feature map, channel attention calculation and convolution operation are used to obtain the final spatial correlation features.

[0010] 5. In order to reduce the computational burden, depthwise separable convolution is used instead of traditional convolution in the encoding stage, and self-attention calculation is performed on the central view features after encoding. At the same time, with the help of the design of the cross-attention mechanism, the central view features and the reference view features are respectively calculated by the cross-attention mechanism to realize the interaction between the central view features and the reference view features, and obtain high-quality features, so as to design and implement a more efficient neural network model in a targeted manner under limited resources;

[0011] 6. Using DAFM, the acquired central view features are first fused with the reference view features to obtain a cross-view feature map, and then the spatial correlation feature map is fused with the cross-view feature map to obtain the final prediction feature, which is then passed into the UperNet segmentation structure to obtain the final segmentation result;

[0012] 7. Conduct multiple experiments to explore the best network parameters, perform five cross-validations to get the average value, and use multiple evaluation indicators to evaluate the model, including Number of Parameters (Parameters), Pixel Accuracy (Acc), Mean Pixel Accuracy (mAcc), and Mean intersection-over-inion (mIou);

[0013] The beneficial effect of the present invention is that the method can effectively realize the lightweight semantic segmentation of light field. Based on the end-to-end neural network, two branches are designed to associate the central view with the reference view, and then combined with the disparity estimation algorithm, the data set disclosed in the light field semantic segmentation is selected and the disparity estimation grid of the central view is performed, and some challenging problems are further solved: the number of parameters of the light field semantic segmentation model is too large, the encoding convolution block and the decoding convolution block have high computational complexity, and the overall number of parameters of the model is large. In order to solve the above problems, the present invention constructs lightweight self-attention, cross-attention, channel attention modules and new feature fusion methods to realize multi-scale cross-fusion, while reducing the amount of convolution operations and reducing the number of parameters while enhancing feature expression. Experimental results show that the method proposed by us reduces the model to 50% of other semantic segmentation models while the mIou index is not significantly reduced (-0.5%), which helps the model to be deployed in resource-constrained devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of the light field semantic segmentation lightweight method of the present invention.

[0016] Figure 2 It is a diagram of a specific implementation method of self-attention and cross-attention of the present invention.

[0017] Figure 3 This is a diagram of the specific implementation method of channel attention invented by Mu.

[0018] Figure 4 This is a diagram of a specific implementation method of the DAFM dual attention feature fusion module of the present invention.

[0019] Figure 5 This is the result of the semantic segmentation of the light field image of the present invention. DETAILED DESCRIPTION

[0020] The process of the present invention is as follows Figure 1 As shown in the figure, the method first processes all light field images to obtain disparity estimation data, so that it is convenient to guide the propagation of features of other reference views to the central view; then, N reference views randomly sampled from the horizontal, vertical and diagonal directions of the central view are sent to the same Backbone together with the central image for preliminary feature extraction; then the central view features are processed by the self-attention mechanism, while the other reference view features are cross-attentioned with the central view features, and spatial correlation is calculated with the obtained disparity estimation features of the central view, and finally the obtained features are subjected to DAFM feature aggregation in turn and sent to the segmentation module for processing to obtain the final segmentation result image.

[0021] 1. Obtain light field disparity estimation prediction results

[0022] The OAVC light field disparity estimation method is used to calculate the disparity estimation result of the central view image of each light field image. In order to project accurate geometric correspondence in the feature space, we use the OAVC light field depth estimation method as a disparity estimator to obtain high-quality disparity priors and predict the disparity value D∈R of the central view. H×W , where the label range is set to 256. And OAVC runs on the CPU, which reduces the workload of the GPU and greatly reduces the calculation time. To further improve the accuracy of disparity estimation, we use 5 cascaded depthwise separable convolutional layers, continuously calibrate D through local skip residual connections, and obtain the same as The same resolution d∈R H×W , which is used for subsequent feature propagation.

[0023] 2. Disparity Estimation Feature Processing and Spatial Correlation Calculation

[0024] 2.1 Disparity Estimation Feature Processing

[0025] In the first layer branch, the initial disparity map is first calculated by the existing light field disparity estimation technology; according to the image consistency assumption, the features of other reference views are propagated to the central view. According to the four-dimensional light field structure, given the central view a c Parallax d, reference view Medium pixel L(u c , v c ,h c , w c )'s spatial coordinates It can be calculated by the following transformation:

[0026]

[0027] 2.2 Spatial correlation calculation

[0028] We transform each reference feature to the center view in turn to obtain an aligned feature set The size of each feature group is Considering that each reference view contributes differently to the final feature representation, we use channel attention to generate the weights of the aggregated aligned features. First, the parallel aligned features are concatenated along the channel dimension, and then the adaptive pooling method is used to compress the spatial information. After two convolutional layers and a sigmoid function, we get the weights and perform multiplication. Finally, the feature channels are compressed through two layers of convolution. The whole process is expressed as:

[0029]

[0030]

[0031]

[0032] Where [·] represents the cascade operation, H s×s F represents a convolutional layer with kernel size s×s, and φ represents the sigmoid function. ex Represents the output features, which contain valid information from all reference views to enhance the center view.

[0033] 3. Cross-view feature processing between the center view and the reference view

[0034] 3.1 Center view feature processing

[0035] First, the center view image is processed using the feature extraction backbone, and then the features of the center view are enhanced through self-attention, which is expressed as follows:

[0036]

[0037] in R represents the number of v to c v ×h×w dimension adjustment.

[0038] 3.2 Reference view feature processing

[0039] Cross-attention aims to exploit the similarities of other views to complement the missing information of the center view. In order to make the reference view image better complement the center view image, cross-attention should pay more attention to the inconsistent regions between views, which are not accessible by self-attention. Inconsistent regions can be represented as regions with large differences. To this end, we generate an attention mask for each reference view by calculating the disparity offset of each pixel. Its expression is as follows:

[0040]

[0041] In the formula, is the disparity value of the central viewpoint image, ||·||2 is the Euclidean distance, σ is the threshold, and stride=H / h is the output stride of the backbone.

[0042] Then the key mappings, value mappings, and attention masks of all reference views are sequentially concatenated, arranged, and reshaped to obtain Where N R =nhw. The cross attention weight is defined as:

[0043]

[0044] in ω represents the additional weight of pixels with larger disparity. We cross and To integrate the angle relationship, the characteristics of the central view are enhanced. The process is described as:

[0045]

[0046] in In this way, cross-attention tends to obtain more information from inconsistent regions of different views with the help of disparity estimation.

[0047] 4. Dual Attention Feature Fusion

[0048] Finally, first F self and F cross Aggregate the output features of the two branches in the lower layer to obtain the combination F im The output features of the two results F im and F ex Aggregate the output features of to generate the final prediction feature F pred, which is then fed into the segmentation head to obtain the predicted segmentation map. The calculation flow of DAFM is as follows:

[0049]

[0050]

[0051] in, represents the product of elements, Indicates connection, f SCA (·) represents spatial convolution attention SCA (SpatialConvolution Attention), f CCA (·) represents channel convolution attention CCA (Channel Convolution Attention), x ext Indicates connection F im and F ex characteristics.

[0052] 5. Evaluation of Segmentation Results

[0053] To make the results more convincing, we will use the average of five cross-validations to measure the effectiveness of the model, using the number of parameters (Parameters), pixel accuracy (Acc), average pixel accuracy (mAcc), and average intersection-over-union (mIou):

[0054]

[0055] Among them, TP represents true positive (the number of pixels correctly classified as positive), TN represents true negative (the number of pixels correctly classified as negative), FP represents false positive (the number of pixels incorrectly classified as positive), and FN represents false negative (the number of pixels incorrectly classified as negative).

[0056]

[0057]

[0058] Where N represents the number of categories, and for each category i, TP_i, TN_i, FP_i, and FN_i represent the number of pixels of true positives, true negatives, false positives, and false negatives of that category, respectively.

[0059] These indicators are used to evaluate the performance of image semantic segmentation models. Acc measures the accuracy of the overall classification, mAcc measures the average classification accuracy of each category, and mIoU pays more attention to the accuracy and completeness of the target area. The higher the result, the better the effect.

[0060] The present invention proposes a light field image lightweight semantic segmentation method based on cross-view association and disparity estimation. The method is based on the association between the central view and the reference view and the light field disparity estimation algorithm. It not only achieves high-performance semantic segmentation of light field images and significantly improves the segmentation accuracy, but also has a good compression effect on the model size, which facilitates the deployment of light field semantic segmentation models on edge devices.

[0061] It should be noted that the above is only an embodiment of the present invention, which is only to explain the present invention and does not limit the patent scope of the present invention. Any obvious changes that belong to the technical concept of the present invention are also within the protection scope of the present invention.

Claims

1. The present invention mainly relates to a light field image lightweight semantic segmentation method based on cross-view correlation and disparity estimation, the method comprising the following steps: (1) Obtain a public dataset for semantic segmentation of light field images: UrbanLF, an urban scene light field dataset, shot with an angle resolution of 9×9, with a total of 824 sets and 66,744 images, including 580 training sets, 164 test sets, and 80 validation sets; (2) Data preprocessing: Use the OAVC (Occlusion-aware Vote Cost) light field depth estimation method to convert each set of images into numpy format images, and obtain the disparity estimation results of the generated central view. N images randomly sampled from eight image stacks in the horizontal, vertical, left, and right diagonal directions are used as reference view images. (3) Use the pre-trained ResNet50 to perform preliminary feature extraction on the center view image and N reference view images respectively; (4) Calculate the spatial correlation between the obtained reference view features and the obtained disparity estimation features of the central view. Considering the contribution / difference of different perspectives to the final feature map, channel attention calculation and convolution operation are used to obtain the final spatial correlation features. (5) In order to reduce the computational burden, depthwise separable convolution is used to replace traditional convolution in the encoding stage, and self-attention calculation is performed on the central view features of the encoded image. At the same time, with the help of the design of the cross-attention mechanism, the central view features and the reference view features are respectively calculated by the cross-attention mechanism to realize the interaction between the central view features and the reference view features, and obtain high-quality features, so as to design and implement a more efficient neural network model in a targeted manner under limited resources; (6) Using DAFM, the acquired central view features are first fused with the reference view features to obtain a cross-view feature map, and then the spatial correlation feature map is fused with the cross-view feature map to obtain the final prediction feature, which is then passed into the UperNet segmentation structure to obtain the final segmentation result; (7) Multiple experiments were conducted to explore the optimal network parameters, and five cross-validations were performed to obtain the average value. The model was evaluated using a variety of evaluation indicators, including Number of Parameters (Parameters), Pixel Accuracy (Acc), Mean Pixel Accuracy (mAcc), and Mean intersection-over-inion (mIou).

2. The method for lightweight semantic segmentation of light field images based on cross-view correlation and disparity estimation according to claim 1, characterized in that: According to the step (1), the UrbanLF urban scene light field dataset publicly available in the field is selected. In order to fully verify the effectiveness of the model, we perform five cross-validations and calculate the average value.

3. The method for lightweight semantic segmentation of light field images based on cross-view correlation and disparity estimation according to claim 1, characterized in that: According to step (2), we process the dataset using the OAVC light field depth estimation method, convert each set of images into numpy format images, obtain the disparity estimation results of the generated central view, and randomly sample N images from eight image stacks in the horizontal, vertical, left and right diagonal directions as reference view images.

4. The method for lightweight semantic segmentation of light field images based on cross-view correlation and disparity estimation according to claim 1, characterized in that: In step (3), we use the pre-trained ResNet50 as the backbone network to perform preliminary feature extraction on the center view image and N reference view images respectively.

5. The method for lightweight semantic segmentation of light field images based on cross-view correlation and disparity estimation according to claim 1, characterized in that: In step (4), we combine channel attention and convolution operations to calculate the spatial association between the obtained reference view features and the obtained disparity estimation features of the central view to obtain the final spatial association features. The whole process is expressed as: Where [·] represents the cascade operation, H s×s F represents a convolutional layer with kernel size s×s, and φ represents the sigmoid function. ex Represents the output features, which contain valid information from all reference views to enhance the center view.

6. The method for lightweight semantic segmentation of light field images based on cross-view correlation and disparity estimation according to claim 1, characterized in that: In step (5), we use depthwise separable convolution in the encoding stage and then enhance the features of the center view through self-attention, which is expressed as follows: in R represents the number of v to c v ×h×w dimension adjustment. Cross-attention aims to exploit the similarities of other views to compensate for the center view. In order to make the reference view image better complement the center view image, cross-attention should pay more attention to the inconsistent regions between views, which are not accessible by self-attention. Inconsistent regions can be represented as regions with large differences. To this end, we generate an attention mask for each reference view by calculating the disparity offset of each pixel. Its expression is as follows: In the formula, is the disparity value of the central viewpoint image, ||·||2 is the Euclidean distance, σ is the threshold, and stride=H / h is the output stride of the backbone. Then the key mappings, value mappings, and attention masks of all reference views are sequentially concatenated, arranged, and reshaped to obtain Where N R =nhw. The cross attention weight is defined as: in ω represents the additional weight of pixels with larger disparity. We cross and To integrate the angle relationship, the characteristics of the central view are enhanced. The process is described as: in In this way, cross-attention tends to obtain more information from inconsistent regions of different views with the help of the estimated disparity originated from the first-layer branch.

7. The method for lightweight semantic segmentation of light field images based on cross-view correlation and disparity estimation according to claim 1, characterized in that: In step (6), we use DAFM to first fuse the acquired center view features with the reference view features to obtain a cross-view feature map, and then fuse the spatial correlation feature map with the cross-view feature map to obtain the final prediction feature, which is then passed into the UperNet segmentation structure to obtain the final segmentation result. The calculation process of DAFM is as follows: in, represents the product of elements, Indicates connection, f SCA (·) represents spatial convolution attention SCA (SpatialConvolution Attenfion), f CCA (·) represents channel convolution attention CCA (Channel Convolution Attention), x cxt Indicates connection F im and F ex characteristics.

8. The method for lightweight semantic segmentation of light field images based on cross-view correlation and disparity estimation according to claim 1, characterized in that: In step (7), we evaluate the performance of the network using indicators including parameters, pixel accuracy (Acc), average pixel accuracy (mAcc), and average intersection-over-union (mIou).

Citation Information

Cited By

  • SS-SSM-based multi-dimensional feature extraction fusion light field semantic segmentation method

    CN120747523A