arXiv:2610.29617eess.IVOct 2026

Manuscript Offprint

arXiv:2610.29617

TernScope: Model-Hardware Co-Design for Efficient Ternary Endoscopic Segmentation

Zhuoyu Wu, Wenhui Ou, Qiawei Zheng, Xuhong Qiu, Wenqi Fang, Raphaël C. -W. Phan

Zhuoyu Wu1,∗^{1,*}, Wenhui Ou2^{2}, Qiawei Zheng2^{2}, Xuhong Qiu4^{4}, Wenqi Fang3^{3}, Raphael C.-W. Phan1^{1}

1^{1}CyPhi AI Research Lab, School of Information Technology, Monash University Malaysia, Malaysia

2^{2}Department of Electronic and Computer Engineering, The Hong Kong University of Science and Technology, Hong Kong

3^{3}Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences, Shenzhen, China

4^{4}School of Computer Science and Engineering, Southeast University, Nanjing, China

*Corresponding author: Zhuoyu Wu (zhuoyu.wu@monash.edu)

Code and experiments: https://github.com/ReaganWu/TernScope

Abstract—Edge medical segmentation must reconcile small model size, high accuracy, and fast inference. TernScope addresses this tradeoff through model–hardware co-design, learning a compact segmentation network whose low-bit operators also simplify hardware execution. Split-channel large-kernel blocks preserve spatial context with limited computation, while branch fusion removes redundant inference paths. Ternary Progressive Quantization-aware Training (TPQ) then adapts the fused network from deep to shallow layers, through the decoder, and finally to the input and prediction layers. All 25 convolutions use ternary weights and 8-bit activations, enabling packed storage and multiplier-free computation. The resulting model uses 0.2483M parameters and 0.0949 GMACs while retaining competitive segmentation accuracy on in-domain and external datasets. Under the same 45 nm technology, TernScope reduces compute-array area by 88.46% compared with the original Gemmini, a systolic-array accelerator with 8-bit × 8-bit multipliers. These results demonstrate a path from accurate lightweight medical segmentation to compact low-bit hardware.

Index Terms—Model–hardware co-design, endoscopic segmentation, ternary neural networks, structural re-parameterization.

I. INTRODUCTION

Medical image segmentation at the edge faces a model size–accuracy–inference speed trilemma: a deployable model must fit limited memory, delineate lesions accurately, and deliver predictions promptly [1]–[3]. Reducing network width or spatial processing can save resources, but also restrict the contextual information available for segmentation [4], [5]. The goal is therefore to retain strong segmentation capacity within a small, fast model. For endoscopic applications, this requires treating predictive quality and deployment cost as joint design objectives.

A compact network does not automatically translate into fast inference or a small accelerator. Execution also depends on memory access, operator organization, and the target architecture [6]–[8]. Structural re-parameterization helps by merging expressive training branches into efficient inference operators [9], [10]. Numerical precision provides a complementary design dimension: low-bit operands reduce tensor storage and simplify arithmetic [11]–[13]. Combining these choices makes full-network ternary weight quantization an opportunity to address the trilemma at both model and circuit levels, provided segmentation accuracy can be retained.

TPQ (Ternary Progressive QAT)

Stage I: Lightweighting

Step 1: BN Fusion with CNN

Step 2: Merge CNN Branches

Figure

TernScope-Net

[Training-Mode]

(FP32-Trained)

SRP

TernScope-Net

[Efficient-Mode]

(FP32-Trained)

Stage II: Progressive Ternary QAT

Figure

Fig. 1. TernScope training-to-deployment pipeline. Branch fusion removes redundant inference paths; TPQ adapts the fused graph to W2A8, including the stem and head.

The central challenge is to make a compact segmentation graph learn effectively under ternary constraints. Learned quantization scales and incremental conversion provide complementary ways to adapt networks to reduced precision [14], [15]. Branch fusion changes the effective kernels, so quantizing separate training branches need not yield the same operator as quantizing their sum. Leaving the stem or prediction head at higher weight precision also retains heterogeneous convolution requirements. We instead adapt the fused deployment graph through Ternary Progressive QAT (TPQ), extending ternary weights to every convolution while retaining 8-bit activations.

TernScope realizes this model-led co-design in three connected steps (Fig. 1). SplitLK allocates large-kernel processing to a channel subset, and a narrow decoder fuses multi-scale

Figure

Fig. 2. TernScope-Net and its main components. SplitLK combines a split-channel large-kernel path with a bypass and pointwise mixing. RepLK training branches are fused into a single deployment convolution. The Nearest Unifier combines projected features from four encoder scales.

features. Branch fusion removes redundant execution paths before TPQ learns the final low-bit operators. A corresponding ternary array then translates the model's numerical representation into simpler computation.

We present TernScope, a fully ternary-weight segmentation framework that jointly addresses model complexity, segmentation accuracy, and hardware efficiency. With 0.2483 M parameters and 0.0949 GMACs, TernScope outperforms its FP32 reference across all three datasets. Using ternary PEs and shared arithmetic resources, it reduces compute-array area, synthesized standard-cell area, and estimated logic power by 88.46%, 70.28%, and 62.82%, respectively, compared with the original Gemmini [7].

References (25)