Dedicated Inference Engine and Binary-Weight Neural Networks for Lightweight Instance Segmentation

Tse-Wei Chen, Wei Tao, Dongyue Zhao, Kazuhiro Mima, Tadayuki Ito, Kinya Osa, Masami KatoWorkshops @ CVPR 2024 · DOI

Introduction

Instance segmentation is a critical yet computationally demanding task in computer vision, requiring the simultaneous identification and pixel-level outlining of individual objects. While state-of-the-art models deliver high precision, their deployment on resource-constrained embedded and mobile devices remains a challenge due to high memory and power requirements. Binary-Weight Neural Networks (BNNs) offer a promising path forward by quantizing weights to a single bit, effectively replacing complex multiplications with efficient bitwise operations. However, maintaining accuracy in dense prediction tasks like segmentation is notoriously difficult.

Researchers from Canon have addressed this by developing a co-designed solution: a dedicated hardware inference engine and a suite of hybrid BNN architectures optimized for instance segmentation.

Hardware Innovation: The Two-Mode Bitwise Engine

The proposed hardware architecture moves away from standard Multiply-Accumulate (MAC) units in favor of a specialized bitwise operation and accumulation array. This engine supports two distinct operational modes:

  • Mode 0 ($w \in \{-1, 1\}$): Utilizes XNOR logic for standard convolutional layers.
  • Mode 1 ($w \in \{0, 1\}$): Utilizes AND logic for binary matrix multiplications (BMM) within the decoder.

A key mathematical breakthrough in this design is the offloading of weight-dependent calculations. The authors demonstrated that a correction term ($\gamma$), which typically requires runtime computation based on weights, can be pre-computed and merged into the network's static bias term ($\beta$). By performing this "parameter generation" offline, the hardware can skip these steps during inference, leading to a significant reduction in logic gate complexity.

The architecture of the Dedicated Inference Engine, highlighting the bitwise operation array and memory bus integration.

Hybrid BNN Architectures

To complement the hardware, the researchers introduced two lightweight BNN models (A8W1): MSCAN-SparseInst and ConvNeXtV2-SparseInst. These models utilize 8-bit activations and 1-bit weights to balance efficiency and representational power.

The architecture integrates a modified SegNeXt or ConvNeXtV2 backbone with a SparseInst decoder. The SparseInst approach is particularly effective for lightweight execution as it focuses on a sparse set of instance activation maps rather than dense, per-pixel processing. To further optimize the network, standard convolutions were replaced with partial convolutions (PConv) to eliminate redundant feature map processing.

The MSCAN-SparseInst BNN architecture, showing the progression from the MSCAN-Tiny backbone through the FPN-Encoder to the SparseInst Decoder.

Performance and Efficiency Results

The co-designed system achieves remarkable efficiency gains without sacrificing performance in key categories. Evaluated on the COCO 2017 dataset, the results highlight several breakthroughs:

  • Hardware Footprint: The bitwise operation array requires only 52% of the gate count of traditional XNOR-based designs.
  • Model Compression: The ConvNeXtV2-SparseInst BNN occupies only 0.45 MB of memory—a 77.7× reduction compared to the YOLACT baseline (34.98 MB).
  • Computational Load: The BNNs require only 5.6 GMACs, representing just 9.8% of the operations required by YOLACT.
  • Accuracy: In the "Person" category, the BNN achieved a Mean Average Precision (mAP) of 31.21%, outperforming the full-precision YOLACT baseline (27.49%).

Conclusion and Future Outlook

This research demonstrates that through hardware-algorithm co-design, BNNs can be successfully applied to complex instance segmentation tasks. While the models showed some performance degradation in larger object categories like "Bus" and "Car," the gains in the "Person" category and the massive reduction in hardware complexity provide a viable path for real-time segmentation on edge devices. Future research will focus on further reducing activation bit-widths and refining decoder architectures to bridge the remaining accuracy gaps across all object classes.

Summary updated

BibTeX
@inproceedings{chen2024dedicated,
  author = {Tse-Wei Chen and Wei Tao and Dongyue Zhao and Kazuhiro Mima and Tadayuki Ito and Kinya Osa and Masami Kato},
  title = {{Dedicated Inference Engine and Binary-Weight Neural Networks for Lightweight Instance Segmentation}},
  booktitle = {Workshops @ CVPR},
  year = {2024},
  doi = {10.1109/cvprw63382.2024.00215},
}
Figure