A stereo image matching method and hardware accelerator based on sparse disparity regression

By introducing sparse disparity regression and pipelined execution into the stereo matching algorithm, and combining it with an FPGA accelerator, the computational complexity and storage problems of stereo matching on edge devices are solved, and efficient stereo matching results are achieved.

CN123181529APending Publication Date: 2026-11-27NANJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611384660.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing stereo matching technologies face challenges such as high computational complexity, large storage overhead, and redundant computation when deployed on edge devices. In particular, existing hardware accelerators fail to fully utilize sparsity during parallax regression, resulting in insufficient efficiency.

Method used

A lightweight network architecture based on inverse residual blocks (IRB) is adopted, combined with a sparse parallax regression algorithm. The computation process is optimized through pipelined execution and sparse parallax regression units, and a dedicated FPGA accelerator is designed to reduce redundant computation and storage access.

Benefits of technology

It achieves efficient stereo matching on edge devices, reduces computation and storage overhead, improves inference efficiency, and has an inference latency of 48ms, a throughput of 20.8FPS, and an energy efficiency of 0.846FPS/W, which is better than existing accelerators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181529A_ABST
    Figure CN123181529A_ABST
Patent Text Reader

Abstract

The application provides a stereo image matching method and hardware accelerator based on sparse disparity regression, and the method comprises the following steps: step 1, feature extraction: a pair of weight-shared MobileNetV2-100 backbone networks are used to extract multi-scale features from a stereo image pair; step 2, cost volume construction; step 3, cost aggregation; and step 4, disparity prediction. The method reduces the calculation and storage overhead of features and cost volumes through a lightweight network and multi-scale cost aggregation, and is suitable for edge device deployment; the sparse disparity regression uses a probability threshold to filter more than 90% invalid disparity candidates, and greatly reduces the regression operation amount under the premise of little loss of matching accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a stereo image matching method and hardware accelerator based on sparse parallax regression. Background Technology

[0002] Stereo matching aims to estimate depth information pixel by pixel from a pair of images by calculating correspondences. This technology has become a key technology in the fields of autonomous driving, robotics and augmented reality.

[0003] Stereo matching, as a fundamental task in 3D vision, has gone through three main stages of development: traditional methods, hybrid methods, and end-to-end deep learning methods.

[0004] Traditional stereo matching methods can be broadly categorized into two types: local matching and global optimization. Local methods rely on manually designed similarity metrics, which have low computational costs, but their robustness in textureless and occluded regions is limited. Global methods, on the other hand, improve matching consistency through energy optimization, but their computational complexity is high.

[0005] To improve matching accuracy, hybrid methods, while retaining the traditional optimization framework, introduce Convolutional Neural Networks (CNNs) into the feature extraction or cost calculation stages. Representative methods include MC-CNN (reference: Jure Zbontar and Yann LeCun. 2015. Stereo Matching by Training a Convolutional Neural Network to Compare Image Patches. J. Mach.Learn. Res. 17 (2015), 65:165:32) and SGM-Net (reference: Akihito Seki and Marc Pollefeys. 2017. SGM-Nets: Semi-Global Matching with Neural Networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 6640–6649. doi:10.1109 / CVPR.2017.703) to predict adaptive penalty parameters. While these methods improve robustness, they still rely on manually designed optimization processes and require complex multi-stage processing.

[0006] In recent years, deep learning-based stereo matching networks have emerged (References: Yue Cao, Jiarui Xu, Stephen Lin, Fangyun Wei, and Han Hu. 2019. GCNet: NonLocal Networks Meet Squeeze-Excitation Networks and Beyond. 2019IEEE / CVF International Conference on Computer Vision Workshop (ICCVW) (2019), 1971–1980; Jia-Ren Chang and Yong-Sheng Chen. 2018. Pyramid Stereo Matching Network. In 2018 IEEE / CVF Conference on Computer Vision and Pattern Recognition. 54105418. doi:10.1109 / CVPR.2018.00567; Nikolaus Mayer, EddyIlg, Philip Häusser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. 2015. A (Large Dataset to Train Convolutional Networks for Disparity, Optical Flow, and Scene Flow Estimation. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2015), 4040–4048.) This study significantly improves matching accuracy by learning powerful feature representation methods and cost aggregation models. However, the high computational complexity and memory access requirements of these networks make efficient deployment on resource-constrained edge devices extremely challenging.

[0007] Recent research (Reference: Xianda Guo, Chenming Zhang, Dujun Nie, WenzhaoZheng, Youmin Zhang, and Long Chen. 2024. Lightstereo: Channel Boost is AllYou Need for Efficient 2D Cost Aggregation. 2025 IEEE International Conference on Robotics and Automation (ICRA) (2024), 8738–8744, Vladimir Tankovich, Christian Häne, S. Fanello, Yinda Zhang, Shahram Izadi, and SofienBouaziz. 2020. HITNet: Hierarchical Iterative Tile Refinement Network for Real-time Stereo Matching. 2021 IEEE / CVF Conference on Computer Vision andPattern Recognition (CVPR) (2020), 14357–14367, Haofei Xu and Juyong Zhang.2020. AANet: Adaptive Aggregation Network for Efficient Stereo Matching. 2020 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2020), 1956–1965.) explored lightweight networks by replacing computationally intensive 3D convolutional operations with a more efficient 2D aggregation architecture. Even with the latest lightweight designs, stereo matching still faces core algorithmic challenges and overlooked optimization potential: First, many existing lightweight networks (Reference: Antyanta Bangunharcana, Jae-Won Cho, Seokju Lee, In-So Kweon, Kyung soo Kim, and Soohyun Kim. 2021.)Correlate-and-Excite: Real-Time Stereo Matching via Guided Cost Volume Excitation. 2021 IEEE / RSJ International Conference on Intelligent Robots and Systems (IROS) (2021), 3542–3548; Faranak Shamsafar, Samuel Woerz, Rafia Rahim, and Andreas Zell. 2021. Mo bileStereoNet: Towards Lightweight Deep Networks for StereoMatching. 2022 IEEE / CVF Winter Conference on Applications of Computer Vision (WACV) (2021), 677–686.) still retains standard convolution operations and dense cost volume calculation processes, resulting in significant computational complexity and memory access overhead; secondly, most existing methods (References: Yue Cao, Jiarui Xu, Stephen Lin, Fangyun Wei, and Han Hu. 2019. GCNet: NonLocal Networks MeetSqueeze-Excitation Networks and Beyond. 2019IEEE / CVF International Conference on Computer Vision Workshop (ICCVW) (2019), 1971–1980, Jia-Ren Chang and Yong-Sheng Chen. 2018. Pyramid Stereo Matching Network. In 2018 IEEE / CVFConference on Computer Vision and Pattern Recognition. 54105418. doi:10.1109 / CVPR.2018.00567, Xiaoyang Guo, Kai Yang, Wukui Yang, Xiaogang Wang, andHongsheng Li. 2019. Group-Wise Correlation Stereo Network.The 2019 IEEE / CVFConference on Computer Vision and Pattern Recognition (CVPR) (2019), 3268–3277, and Gangwei Xu, Junda Cheng, Peng Guo, and Xin Yang. 2022. Attention Concatenation Volume for Accurate and Efficient StereoMatching. 2022 IEEE / CVFConference on Computer Vision and Pattern Recognition (CVPR) (2022), 12971–12980. ignores the inherent sparsity in disparity regression: after softmax normalization, only a few disparity candidate values ​​contribute significantly, while most probability values ​​are close to zero, which leads to redundant computation in the weighted aggregation process.

[0008] At the same time, existing FPGA accelerators (Reference: Feng Min, Ying Wang, Haobo Xu, Junpei Huang, Yujie Wang, Xingqi Zou, Meix uan Lu, and Yinhe Han. 2022. Dadu-SV: Accelerate Stereo Vision Processing on NPU. IEEE Embedded Systems Letters14, 4 (2022), 191–194. doi:10.1109 / LES.2022. 3162859, Xie Tao, Sun Jiazheng, Zhao Xiangqiang, Yu Chongchong, and FengWenbin. 2024. Efficient Design and Implementation of Binocular Stereo Matching Algorithm for Embedded Systems. In 2024 43rd Chinese Control Conference (CCC). 7948–7954. (doi:10.23919 / CCC63176.2024.10662045) These approaches either target traditional stereo matching algorithms, limiting the use of deep learning-based methods, or they optimize only a single convolutional neural network unit, failing to fully exploit the characteristics of deep stereo matching (such as relevant volume construction, cost aggregation, and disparity regression). Therefore, optimizing either the network architecture or the hardware architecture alone cannot fully realize the performance potential of edge stereo matching systems.

[0009] Existing deep learning stereo matching schemes mainly achieve disparity estimation by constructing a cost volume and performing cost aggregation. End-to-end stereo networks, represented by DispNet (reference: Nikolaus Mayer, EddyIlg, Philip Häusser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. 2015. A Large Dataset to Train Convolutional Networks for Disparity, Optical Flow, and Scene Flow Estimation. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2015), 4040–4048.), typically include steps such as feature extraction, cost volume construction, cost aggregation, and disparity regression.GCNet (Reference: Yue Cao, Jiarui Xu, Stephen Lin, Fangyun Wei, and Han Hu. 2019. GCNet: NonLocal Networks Meet Squeeze-Excitation Networks and Beyond. 2019IEEE / CVF International Conference on Computer Vision Workshop (ICCVW) (2019), 1971–1980.), PSMNet (Reference: Jia-RenChang and Yong-Sheng Chen. 2018. Pyramid Stereo Matching Network. In 2018IEEE / CVF Conference on Computer Vision and Pattern Recognition. 54105418. doi:10.1109 / CVPR.2018.00567), GWCNet (Reference: Xiaoyang Guo, Kai Yang, Wukui Yang, Xiaogang Wang, and Hongsheng Li. 2019. Group-Wise Correlation Stereo Methods such as Network.2019 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2019), 3268–3277. and ACVNet (Reference: Gangwei Xu, Junda Cheng, Peng Guo, and Xin Yang. 2022. Attention Concatenation Volume for Accurate and Efficient StereoMatching. 2022 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2022), 12971–12980.) use three-dimensional convolution to process the four-dimensional cost volume. Although they can achieve high matching accuracy, they have large computational and storage costs, making it difficult to meet the real-time deployment requirements of edge devices.In recent years, LightStereo (Reference: Xianda Guo, Chenming Zhang, Dujun Nie, WenzhaoZheng, Youmin Zhang, and Long Chen. 2024. Lightstereo: Channel Boost is AllYou Need for Efficient 2D Cost Aggregation. 2025 IEEE International Conference on Robotics and Automation (ICRA) (2024), 8738–8744.) and HITNet (Reference: Vladimir Tankovich, Christian Häne, S. Fanello, Yinda Zhang, ShahramIzadi, and Sofien Bouaziz. 2020. HITNet: Hierarchical Iterative TileRefinement Network for Real-time Stereo Matching. 2021 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2020), Lightweight methods such as 14357–14367 reduce computational complexity through two-dimensional cost aggregation networks and compact three-dimensional cost volumes. However, they mainly focus on network structure compression and feature representation optimization, and still have problems such as redundant cost aggregation calculations and repeated calculations of a large number of low-contribution candidate disparities in the disparity regression stage. They fail to fully exploit the sparsity characteristics in the stereo matching calculation process.

[0010] In terms of hardware implementation, existing FPGA-based stereo matching acceleration solutions mainly optimize certain computational modules in traditional stereo algorithms or deep networks. For Census transformation (Reference: Ke Li, Xiwei Fang, YunhaoMa, Wenyue Zhang, Pingcheng Dong, Zhuoyu Chen, Lei Chen, and Fengwei An. 2024. Stereo Matching Accelerator With Re-Computation Scheme and Data-ReusedPipeline for Autonomous Vehicles. IEEE Transactions on Circuits and SystemsI: Regular Papers 71, 6 (2024), 2760–2773. doi:10.1109 / TCSI.2024.3367186) and SGM (Semi-Global Matching, Reference: Gang Chen, Yehua Ling, Tao He, Haitao Meng, Shengyu He, Yu Zhang, and Kai Huang. 2020. Stereo Engine: An FPGA-BasedAccelerator for Real-Time High Quality Stereo Estimation With Binary NeuralNetwork. IEEE Transactions on Computer-Aided Design of Integrated Circuitsand Systems39, 11 Traditional algorithms such as (2020), 4179–4190.doi:10.1109 / TCAD.2020.3012864) rely on regularized data processing flows for acceleration design. However, due to the limited matching accuracy of traditional algorithms, they are difficult to meet the requirements of modern 3D vision tasks. Although FPGA accelerators for deep learning stereo matching networks can achieve end-to-end inference, they usually adopt a layer-by-layer execution approach, which requires frequent intermediate feature map caching and data migration, resulting in significant on-chip memory access overhead.

[0011] Furthermore, lightweight stereo matching networks have widely adopted MobileNet-style backbone networks based on depthwise separable convolutions (DSC) and IRB structures (Reference: Mark Sandler, Andrew G. Howard, Menglong Zhu, Andrey Zhmoginov, and Liang Chieh Chen. 2018. MobileNetV2: Inverted Residuals and Linear Bottlenecks. 2018IEEE / CVF Conference on Computer Vision and Pattern Recognition (2018), 4510-4520.), enabling existing MobileNet accelerators (Reference: Lei Xuan, Ka-Fai Un, Chi-Seng Lam, and Rui P. Martins. 2022. An FPGA-Based Energy-Efficient ReconfigurableDepthwise Separable Convolution Accelerator for Image Recognition. IEEE Transactions on Circuits and Systems II: Express Briefs 69, 10 (2022)). 4003–4007. doi:10.1109 / TCSII.2022.3180553、Jiye Huang, Xin Liu, Tongdong Guo, and Zhijin Zhao. 2023. A High-Performance FPGA-Based Depthwise Separable Convolution Accelerator. Electronics 12, 7 (2023). doi:10.3390 / electronics12071571) has become a potential hardware infrastructure, but although it can efficiently support depthwise separable convolution and inverse residual structures, it is mainly designed for general vision tasks such as classification and detection, and lacks optimization mechanisms for the specific computational processes in stereo matching, such as correlation cost construction, multi-scale cost aggregation, and disparity regression. Summary of the Invention

[0012] Purpose of the Invention: Stereo matching technology recovers disparity and 3D scene information by estimating the pixel correspondence between two images. However, due to the algorithmic complexity caused by redundant calculations in cost aggregation and disparity regression, as well as the insufficient efficiency of hardware supporting specific stereo matching operations, the efficient deployment of this technology on edge devices still faces challenges. To address these issues, this invention provides a stereo image matching method and hardware accelerator based on sparse disparity regression. The aim is to achieve accurate and efficient stereo matching. At the algorithm level, a lightweight network architecture based on Inverted Residual Block (IRB) is adopted, and a Sparse Disparity Regression (SDR) algorithm is introduced to eliminate redundant disparity regression calculations. At the hardware level, a dedicated accelerator is equipped, and IRB operations are executed through inter-layer pipelined execution, significantly reducing the number of memory accesses for intermediate feature parameters. Furthermore, a streaming correlation engine optimizes data flow to reuse main processing array resources, while a dedicated sparse regression unit further improves the disparity calculation speed by skipping invalid calculations.

[0013] The method includes the following steps:

[0014] Step 1, Feature Extraction: Using a pair of weight-shared MobileNetV2-100 backbone networks, multi-scale features are extracted from stereo image pairs;

[0015] Step 2, construct the cost body;

[0016] Step 3: Perform cost aggregation;

[0017] Step 4: Perform disparity prediction.

[0018] Step 1 includes: all standard convolutional layers in the MobileNetV2-100 backbone network are replaced with depthwise separable convolution (DSC) layers.

[0019] Step 2 includes: in multi-scale features, the left feature map with an image resolution of one-quarter of the original size. and right feature map A three-dimensional correlation cost body is constructed by calculating element-wise products along the channel dimension c. :

[0020] (1),

[0021] in, These are the x and y coordinates of the feature map pixels, respectively. This represents the disparity value.

[0022] Step 3 includes: inspired by the lightweight stereo matching network LightStereo, a lightweight encoder-decoder network based on the Inverted Residual Block (IRB) architecture is used to process the relevant cost volume data, and features of different scales extracted by the backbone network are convolutionally fused to enhance the contextual representation.

[0023] In step 3, each inverted residual block (IRB) in the lightweight encoder-decoder network first dilates the number of channels using pointwise convolution (PW), then captures feature information on the channels using 3x3 depthwise convolution (DW), and finally pulls the dilated features back to the low-dimensional space using another layer of pointwise convolution (PW).

[0024] In step 3, the relevant cost body performs hierarchical feature aggregation through the lightweight encoder-decoder network. During the encoding process, it realizes the synergistic utilization of image appearance information and matching cues. The decoder restores spatial resolution through skip connections to obtain the matching cost of parallax.

[0025] Step 4 includes: matching costs Convert to probability weights using the softmax function:

[0026] (2),

[0027] in This represents the contribution of the disparity value d; subsequently, a threshold is introduced. To eliminate low-probability candidates:

[0028] (3),

[0029] Ultimately, only the contribution value of the retained disparity d is used. Perform disparity regression calculations to obtain disparity estimates. :

[0030] (4),

[0031] in The maximum parallax value preset for the network.

[0032] The resulting low-resolution coarse disparity map is then multiplied with the original image features extracted using a lightweight context network to obtain spatial context information, which helps to complete disparity upsampling and finally outputs a full-resolution disparity map.

[0033] The present invention also provides a hardware accelerator for implementing the method, including a convolutional computation array, an on-chip storage hierarchy, a controller, and a sparse disparity regression unit (SDR).

[0034] The convolutional computation array includes a pointwise convolutional computation array and a depthwise convolutional computation array. The pointwise convolutional computation array is used to perform pointwise convolution, and the depthwise convolutional computation array is used to perform depthwise convolution. The convolutional computation array is used for convolutional computation in feature extraction and cost aggregation, and is also reused for operator computation in cost volume construction and disparity prediction.

[0035] The on-chip storage hierarchy includes an activation value block memory, a weight block memory, a row cache, an intermediate cache, and a partial sum cache. The activation value block memory stores feature maps, the weight block memory stores weight data, the row cache reuses weight rectangular windows, and the intermediate cache and partial sum cache store intermediate scores. The on-chip storage hierarchy is used to reuse feature maps (including left feature maps). and right feature map ( ) and weight data (referring to the weight data saved in the trained model, stored in memory), reducing the number of accesses to off-chip memory;

[0036] The controller includes a DW controller and a PW controller, which respectively control the data scheduling of depthwise convolution (DW) and pointwise convolution (PW), and are used to uniformly schedule and manage the hardware accelerator.

[0037] The controller employs the following scheduling strategy:

[0038] The pointwise convolutional computation array is an array composed of m×n convolutional processing units. In the first pointwise convolution in the inverted residual block IRB architecture, n input channels are processed in parallel and m output channels are generated. The controller first traverses the input channel dimensions to complete the data accumulation of the current output channel group, and then scans the feature map in row priority order. After the current three output rows are generated, the depthwise convolution in the inverted residual block IRB architecture will be activated immediately.

[0039] The depthwise convolutional computation array is an array consisting of 9×q convolutional processing units, combined with row buffers, and through the DW controller, it adapts to two or more convolutional strides to continuously generate 3×3 sliding window data.

[0040] The output of the depthwise convolutional computation array is stored in an intermediate buffer and then used as the input activation value for the second pointwise convolutional layer.

[0041] The sizes of the pointwise convolutional computation array and the depthwise convolutional computation array are jointly optimized: the pointwise convolutional computation array and the depthwise convolutional computation array are configured to be m×n and 9×q respectively, where q=m / 2, to build an inverted residual block (IRB) architecture computation pipeline: after the third row of the first pointwise convolutional PW is output, the depthwise convolutional DW begins to be computed; after the first pointwise convolutional PW is computed, the second pointwise convolutional PW is immediately activated and executed in parallel with the depthwise convolutional DW computation.

[0042] Reusing the pointwise convolutional computation array, streaming correlation cost volume calculation is performed: first, stereo image pairs (i.e., left feature maps) are read one by one in a predetermined order. and right feature map The right feature pixel is processed, and the corresponding left candidate feature is obtained sequentially according to the disparity range and the correlation calculation is completed. When all left disparity candidates corresponding to the right feature pixel are calculated, the next right feature pixel is processed. At the same time, a left feature row cache is established in the row cache to temporarily store and reuse the read left features.

[0043] The Sparse Disparity Regression (SDR) calculation unit performs the following calculations: First, a Softmax operation is performed on the matching cost to obtain the probability value corresponding to each disparity level. The probability value is compared with a preset threshold, and a binary mask is output. High levels in the binary mask mark valid disparity candidate positions with probabilities exceeding the threshold. Next, the binary mask is used to traverse the disparity dimensions, filter all valid candidate positions, and output an ordered disparity index sequence. Based on the disparity index sequence, the valid probability value corresponding to the disparity index is extracted. Finally, the extracted probability value is multiplied by the disparity value corresponding to the disparity index and summed to obtain the final sparse regression disparity result.

[0044] This approach does not optimize the network structure or hardware architecture in isolation, but rather adopts a joint design approach at both the algorithm and hardware levels. At the algorithm level, a multi-scale two-dimensional cost aggregation structure is designed to reduce the computational complexity of cost calculations. A disparity regression method based on probabilistic sparsity is proposed, which filters out low-contribution disparity candidates based on the Softmax output probability distribution, retaining only valid candidates for regression calculation, thus reducing redundant computation from the source. At the hardware level, an inter-layer pipelined execution mechanism is designed for the inverted residual structure in the lightweight network, enabling overlapping execution of different convolutional stages and reducing intermediate feature access. Simultaneously, a pipelined correlation computation and sparse disparity regression acceleration module are designed to achieve data reuse and skip invalid computations. Through joint optimization of algorithmic computational characteristics and hardware execution architecture, this approach can improve inference efficiency on edge devices while maintaining matching accuracy.

[0045] This invention discloses a lightweight stereo matching method and its FPGA acceleration architecture, which has the following advantages: First, the lightweight network and multi-scale cost aggregation reduce the computational and storage overhead of features and cost bodies, making it suitable for edge device deployment; Second, sparse disparity regression uses probability thresholds to filter more than 90% of invalid disparity candidates, significantly reducing the amount of regression computation with minimal loss in matching accuracy; Third, the inter-layer pipelined design of the IRB and the construction of the streaming cost body reduce off-chip memory access and lower bandwidth consumption; Fourth, the customized FPGA acceleration architecture achieves 48ms inference latency, 20.8FPS throughput, and 0.846 FPS / W energy efficiency on the VCK190 platform, which is superior to the overall performance of existing accelerators. Attached Figure Description

[0046] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.

[0047] Figure 1 This is a diagram of the overall architecture of the method of this invention.

[0048] Figure 2 This is a diagram of the overall hardware architecture of the hardware accelerator of this invention.

[0049] Figure 3 This is a diagram of the interlayer piping architecture of the IRB.

[0050] Figure 4 This is a data flow diagram for the construction of related volumes.

[0051] Figure 5 This is a schematic diagram of sparse parallax regression calculation. Detailed Implementation

[0052] like Figure 1 As shown, this embodiment of the invention provides a stereo image matching method based on sparse disparity regression, comprising four stages: feature extraction, cost volume construction, cost aggregation, and disparity prediction. First, the framework employs a pair of weight-shared MobileNetV2-100 backbone networks, where all standard convolutional layers are replaced by depthwise separable convolutional (DSC) layers to extract multi-scale features from stereo image pairs; among these multi-scale features, the left and right feature maps have a resolution of one-quarter. and The relevant cost body is constructed by calculating element-wise products along the channel dimension c:

[0053] (1),

[0054] The relevant cost volume data is processed by a lightweight encoder-decoder network built on an inverted residual block (IRB) architecture, which fuses features of different resolutions from the backbone network to enhance contextual representation. Finally, the aggregated cost volume is transformed into a probability distribution using a softmax function, and the proposed sparse disparity regression (SDR) method generates a coarse disparity map. Subsequently, a lightweight context network upsamples the coarse prediction results to generate the final full-resolution disparity map.

[0055] The proposed cost aggregation network adopts a lightweight encoder-decoder architecture based on IRBs. Each IRB first inflates the number of channels through pointwise convolution (PW), then captures feature information on the channels using 3x3 depthwise convolution (DW), and finally pulls the inflated features back into the low-dimensional space through another pointwise convolution (PW).

[0056] To effectively aggregate matching costs, the relevant cost volume employs a hierarchical feature aggregation approach using an encoder-decoder architecture. During encoding, image appearance information and matching cues are utilized collaboratively. The enhanced cost volume improves matching robustness in textureless and repetitive regions and progressively expands the receptive field. Finally, the decoder restores spatial resolution through skip connections to obtain detailed disparity information.

[0057] Sparse disparity regression: The aggregated cost volume is first transformed into a probability distribution using the Softmax function, and then disparity estimation is performed using soft-argmax. The resulting probability distribution is highly sparse: the vast majority of probability values ​​are concentrated near zero, and their contribution to the final disparity estimation is negligible. Therefore, performing weighted summation on all disparity candidate values ​​would introduce significant redundant computational burden.

[0058] To reduce this redundancy, sparse disparity regression can be achieved by retaining only disparity candidate points with informational value. Existing sparse strategies typically employ Top-k selection or threshold-based truncation methods. While the Top-k method can retain a fixed number of disparity candidate points for each pixel, it cannot adapt to the differences in disparity uncertainty across different image regions. In contrast, the threshold-based strategy employed in this invention dynamically determines the number of disparity candidate points to retain based on probability distribution, retaining only 1 to 2 disparity candidate points in most pixels; while automatically retaining more candidate points at object boundaries and occluded regions (where matching uncertainty is higher), thus achieving a more flexible and accurate sparse representation.

[0059] Specifically, matching cost First, convert the weights into probability weights using softmax operation:

[0060] (2),

[0061] in This represents the contribution value of the disparity candidate d. A threshold is then introduced. To eliminate low-probability candidates:

[0062] (3),

[0063] Ultimately, this difference can be eliminated by using only the retained candidate variables:

[0064] (4),

[0065] By eliminating the accumulation of low-confidence disparity candidate points, the proposed SDR significantly reduces the number of multiple accumulation operations with negligible accuracy loss, while still maintaining adaptive disparity representation in complex regions.

[0066] To efficiently run the method on an FPGA platform, this embodiment also provides a hardware accelerator for implementing the method, the overall architecture of which is as follows: Figure 2 As shown, the accelerator includes a convolutional computation array, an on-chip storage hierarchy, a controller, and a disparity regression module.

[0067] The convolutional computation array is used for reconfigurable pointwise convolution and depthwise convolution processing. As an integrated general-purpose computing engine, the convolutional computation array can fully support the entire process of feature extraction, cost volume construction, cost aggregation, and disparity regression, significantly reducing hardware resource overhead while effectively improving hardware computing utilization. The on-chip storage hierarchy includes activation value block memory, weight block memory, row cache, intermediate cache, and partial sum cache. By reusing feature maps and weight data, the number of accesses to off-chip memory is minimized.

[0068] The entire hardware accelerator is uniformly scheduled and managed by the controller, and the multiplexer can dynamically configure the data path for different computing stages, thereby realizing the continuous pipeline execution of the data flow.

[0069] To eliminate the inefficiency of traditional layer-by-layer execution methods, this invention proposes an inter-layer pipeline architecture for implementing end-to-end streaming execution of mainstream IRBs. The overall scheduling strategy is as follows: Figure 3 As shown in (d).

[0070] Pointwise convolution computation arrays employ, for example Figure 3The array shown in (a) consists of m×n convolutional processing units. Specifically, the first pointwise convolution (PWf) processes n input channels in parallel and generates m output channels. The controller first traverses the input channel dimensions to complete the data accumulation of the current output channel group, and then scans the feature map in row-priority order. After the current three output rows are generated, the DW is activated immediately without waiting for the PWf operation to complete.

[0071] like Figure 3 As shown in (c), the depthwise convolution computation array uses an array of 9×q convolution processing units, combined with... Figure 3 The lightweight linear buffer shown in (b) continuously generates a 3×3 sliding window while supporting different convolution strides controlled by the DW controller. This streaming data processing approach ensures that each input feature only needs to be called once; while the DW weights are cached on-chip and updated only after being reused at all spatial locations, thus significantly reducing memory bandwidth requirements.

[0072] The DW output is stored in an intermediate buffer and then used as the input activation values ​​for the second pointwise convolution (PWs). Since the DW output is generated row by row in space, while PWs are calculated by accumulating the input channel groups, a Psum buffer is introduced to store and accumulate intermediate results until all channel groups have been processed.

[0073] To maximize pipeline efficiency, the array sizes of the PW and DW layers are jointly optimized. Statistical analysis shows that the computation cycle required by the PW layer is approximately twice that of the DW layer; therefore, the PW and DW layers are configured with sizes of m×n and 9×q, respectively, where q = m / 2. Based on this configuration, this invention constructs the following... Figure 3 The three-stage PWf-DW-PWs pipeline is shown in Figure (d). DW computation begins when the third output line of PWf is available; PWs is activated immediately upon PWf completion and overlaps with the remaining DW computation. By precisely balancing the computational throughput between the PW and DW layers, the proposed scheduling scheme effectively avoids pipeline bubbles caused by stage imbalance and ensures continuous data flow between different levels. Thus, DW latency is effectively hidden between the two PW stages, allowing IRB computation to proceed smoothly without pipeline congestion. This cross-level scheduling strategy reduces the need for intermediate feature map buffers and improves overall pipeline utilization and processing efficiency.

[0074] To efficiently construct the cost volume, this invention reuses existing computing arrays and designs a streaming correlation cost volume calculation engine. First, right-side feature pixels are read sequentially according to a predetermined order. Then, corresponding left-side candidate features are obtained and their calculations are performed based on the disparity range. Once all disparity candidate features for a pixel have been calculated, the next right-side feature pixel is processed. Simultaneously, to address the issue of repeated access to left-side features, this invention designs a left-side feature caching mechanism to temporarily store and reuse already read left-side features, specifically as follows... Figure 4 As shown. Under this data arrangement mechanism, each set of left feature vectors only needs to be read once, and can be repeatedly called in multiple calculations of adjacent disparities; when the disparity is 192, the number of feature map memory accesses can be reduced to 1 / 48 of the original.

[0075] In addition, this invention notes that pointwise convolution and feature correlation are essentially channelwise dot product operations. Therefore, this solution directly reuses the existing convolution processing unit array to complete the correlation calculation, without the need to build a dedicated correlation operation hardware unit.

[0076] The probability distribution output by Softmax is extremely sparse, which makes traditional dense disparity regression schemes computationally inefficient. Therefore, this invention specifically designs an SDR hardware computing unit, the overall structure of which is as follows: Figure 5 As shown.

[0077] First, the Softmax probability value is compared with a preset threshold to generate a binary active mask for identifying valid disparity candidate points. Then, a priority encoder compresses this mask into a compact disparity index sequence, thus skipping inactive disparity candidate points without scanning all disparity channels. Based on the generated disparity index, only the corresponding probability value is extracted from the data source and multiplied and summed with its respective disparity index. In this way, the dense disparity regression operation, which originally required traversing all disparity candidates and performing point-by-point weighted summation, is transformed into a sparse accumulation calculation performed only on high-confidence candidate values.

[0078] Compared to traditional dense implementations, this invention eliminates disparity candidates with probabilities below a threshold, significantly reducing the number of Multiply Accumulate (MAC) operations while ensuring accuracy. By eliminating redundant MAC operations on low-confidence disparity candidates, this sparse regression hardware effectively improves computational throughput and hardware resource utilization.

[0079] This invention is developed based on the PyTorch framework and trained on four NVIDIA RTX 4090 Graphics Processing Units (GPUs). The network is first trained on the SceneFlow dataset using the AdamW optimizer and the OneCycleLR scheduling strategy, and then fine-tuned on the KITTI dataset. Finally, 10-bit wide quantization-aware training techniques are used for both weights and activation functions, combined with a customized Softmax quantization scheme. The proposed accelerator is implemented in Verilog HDL and synthesized using Vivado 2020.2. A Xilinx ACAP VCK190 FPGA is used. The parallel parameters of the PW and DW arrays are configured as m=32, n=32, and q=16. Hardware performance is evaluated in terms of latency, frame rate, power consumption, and energy efficiency.

[0080] Table 1 compares this invention with representative lightweight stereo matching networks on the SceneFlow dataset. Specifically, compared to LightStereo-S, this invention requires only 11.07 GFLOPs of computational resources and 2.43 million parameters, reducing computational complexity and model size by 51.3% and 29.4%, respectively, while maintaining competitive accuracy.

[0081] Table 1 Results on SceneFlow

[0082]

[0083] Tables 2 (quantifying the D1 error rate in the background (bg), foreground (fg), and joint (all) partitions) and 3 (evaluating the proportion of outliers (Out-x) when the disparity error exceeds x pixels in the non-occluded (Noc) region and the full image (All) region) respectively present the benchmark results of this invention on the KITTI2015 and KITTI2012 datasets. The D1-all error rate of this invention is only 2.64%, which is superior to most lightweight stereo matching methods, including [35,36,39,43], and other real-time network models. This model demonstrates excellent performance on both reflective datasets and the standard KITTI2012 dataset; especially under the Out-2 and Out-3 evaluation metrics, its performance significantly surpasses traditional lightweight methods such as [12,26,47].

[0084] Table 2 Benchmark results on the KITTI2015 dataset

[0085]

[0086] Table 3 Benchmark results of KITTI2012 reflection dataset and KITTI2012 dataset

[0087]

[0088] Table 4 shows the reduction in sparsity ratio, error rate, and MAC value under different probability thresholds. When the threshold is set to 0.01, the sparsity ratio of all three datasets exceeds 90%, while maintaining disparity estimation accuracy comparable to the baseline method; however, when a lower threshold of 0.001 is used, the accuracy is almost negligible.

[0089] While this method offers some improvements, it fails to fully leverage the increased sparsity to reduce computational complexity. This indicates that probability values ​​below 0.01 have minimal impact on the final disparity regression result, while the dominant probabilities determining the regression outcome are effectively preserved. Therefore, setting 0.01 as a threshold eliminates redundant disparity candidates, and this threshold was selected for use in the proposed sparse disparity regression architecture.

[0090] Table 4. Effects of different probability thresholds

[0091]

[0092] Table 5 compares this solution with software platforms and existing FPGA accelerators. CPU power consumption is calculated as the product of CPU utilization and thermal design power, while GPU power consumption is measured using the NVIDIA-SMI tool. Compared to CPU and GPU platforms, the accelerator efficiency of this invention is improved by 34.4 times and 1.23 times, respectively. Compared to the A-U3D accelerator, this design achieves higher matching accuracy while improving throughput by 2.06 times, reducing latency by 6.02 times, and improving energy efficiency by 3.2 times. These results fully demonstrate the effectiveness of the proposed algorithm-hardware co-design scheme in achieving efficient stereo matching on an edge FPGA platform.

[0093] Table 5 Performance Comparison on Different Deployment Platforms

[0094]

[0095] According to statistics, the average hardware utilization rate of this invention is approximately 80%, while the utilization rate of most computationally intensive layers exceeds 90%, indicating that the proposed unified processing architecture can efficiently utilize available computing resources. Table 6 summarizes the FPGA resource utilization rate of the proposed accelerator.

[0096] Table 6 FPGA Resource Utilization

[0097]

[0098] This invention provides a stereo image matching method and hardware accelerator based on sparse disparity regression. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.

Claims

1. A stereo image matching method based on sparse disparity regression, characterized in that, Includes the following steps: Step 1, Feature Extraction: Using a pair of weight-shared MobileNetV2-100 backbone networks, multi-scale features are extracted from stereo image pairs; Step 2, construct the cost body; Step 3: Perform cost aggregation; Step 4: Perform disparity prediction.

2. The method according to claim 1, characterized in that, Step 1 includes: replacing all standard convolutional layers in the MobileNetV2-100 backbone network with depth-separable convolutional (DSC) layers.

3. The method according to claim 2, characterized in that, Step 2 includes: in multi-scale features, the left feature map with an image resolution of one-quarter of the original size. and right feature map A three-dimensional correlation cost body is constructed by calculating element-wise products along the channel dimension c. : (1), in, These are the x and y coordinates of the feature map pixels, respectively. This represents the disparity value.

4. The method according to claim 3, characterized in that, Step 3 includes: using a lightweight encoder-decoder network built on an inverted residual block (IRB) architecture to process the relevant cost volume data, and convolving and fusing features of different scales extracted by the backbone network to enhance contextual representation.

5. The method according to claim 4, characterized in that, In step 3, each inverted residual block (IRB) in the lightweight encoder-decoder network first dilates the number of channels through pointwise convolution (PW), then captures feature information on the channels using 3x3 depthwise convolution (DW), and finally pulls the dilated features back to the low-dimensional space through another pointwise convolution (PW).

6. The method according to claim 5, characterized in that, In step 3, the relevant cost body performs hierarchical feature aggregation through the lightweight encoder-decoder network. During the encoding process, it realizes the synergistic utilization of image appearance information and matching cues. The decoder restores spatial resolution through skip connections to obtain the matching cost of parallax.

7. The method according to claim 6, characterized in that, Step 4 includes: matching costs Convert to probability weights using the softmax function: (2), in This represents the contribution of the disparity value d; subsequently, a threshold is introduced. To eliminate low-probability candidates: (3), Ultimately, only the contribution value of the retained disparity d is used. Perform disparity regression calculations to obtain disparity estimates. : (4), in The maximum parallax value preset for the network.

8. A hardware accelerator for implementing the method as described in any one of claims 1 to 7, characterized in that, This includes a convolutional computation array, an on-chip storage hierarchy, a controller, and a sparse parallax regression (SDR) computation unit. The convolutional computation array includes a pointwise convolutional computation array and a depthwise convolutional computation array. The pointwise convolutional computation array is used to perform pointwise convolution, and the depthwise convolutional computation array is used to perform depthwise convolution. The convolutional computation array is used for convolutional computation in feature extraction and cost aggregation, and is also reused for operator computation in cost volume construction and disparity prediction. The on-chip storage hierarchy includes an activation value block memory, a weight block memory, a row cache, an intermediate cache, and a partial sum cache. The activation value block memory is used to store feature maps, the weight block memory is used to store weight data, the row cache is used to reuse weight rectangular windows, and the intermediate cache and partial sum cache are used to store intermediate values ​​for calculation. The on-chip storage hierarchy is used to reuse feature maps and weight data, reducing the number of accesses to off-chip memory. The controller includes a DW controller and a PW controller, which respectively control the data scheduling of depthwise convolution (DW) and pointwise convolution (PW), and are used to uniformly schedule and manage the hardware accelerator.

9. The hardware accelerator according to claim 8, characterized in that, The controller employs the following scheduling strategy: The pointwise convolutional computation array is an array composed of m×n convolutional processing units. In the first pointwise convolution in the inverted residual block IRB architecture, n input channels are processed in parallel and m output channels are generated. The controller first traverses the input channel dimensions to complete the data accumulation of the current output channel group, and then scans the feature map in row priority order. After the current three output rows are generated, the depthwise convolution in the inverted residual block IRB architecture will be activated immediately. The depthwise convolutional computation array is an array consisting of 9×q convolutional processing units, combined with row buffers, and through the DW controller, it adapts to two or more convolutional strides to continuously generate 3×3 sliding window data. The output of the depthwise convolutional computation array is stored in an intermediate buffer and then used as the input activation value for the second pointwise convolutional layer. The sizes of the pointwise convolutional computation array and the depthwise convolutional computation array are jointly optimized: the pointwise convolutional computation array and the depthwise convolutional computation array are configured to be m×n and 9×q respectively, where q=m / 2, to build an inverted residual block (IRB) architecture computation pipeline: after the third row of the first pointwise convolutional PW is output, the depthwise convolutional DW begins to be computed; after the first pointwise convolutional PW is computed, the second pointwise convolutional PW is immediately activated and executed in parallel with the depthwise convolutional DW computation.

10. The hardware accelerator according to claim 9, characterized in that, The pointwise convolutional computation array is reused to perform streaming correlation cost volume calculation: first, the right feature pixels in the stereo image pair are read one by one in a predetermined order, and the corresponding left candidate features are obtained sequentially according to the disparity range and the correlation calculation is completed. When all the left disparity candidates corresponding to the right feature pixels are calculated, the next right feature pixel is processed. At the same time, a left feature row cache is established in the row cache to temporarily store and reuse the read left features. The Sparse Disparity Regression (SDR) calculation unit performs the following calculations: First, it performs a Softmax operation on the matching cost to obtain the probability value corresponding to each disparity level. Then, it compares the probability value with a preset threshold and outputs a binary mask. High levels in the binary mask mark valid disparity candidate positions with probabilities exceeding the threshold. Next, it uses the binary mask to traverse the disparity dimensions, filters all valid candidate positions, and outputs an ordered disparity index sequence. Based on the disparity index sequence, the effective probability values ​​corresponding to the disparity index are extracted; finally, the extracted probability values ​​are multiplied by the disparity values ​​corresponding to the disparity index and summed to obtain the final sparse regression disparity result.