TernScope: Model-Hardware Co-Design for Efficient Ternary Endoscopic Segmentation
Organizations: CyPhi AI Research Lab, School of Information Technology, Monash University Malaysia, Malaysia · Department of Electronic and Computer Engineering, The Hong Kong University of Science and Technology, Hong Kong · School of Computer Science and Engineering, Southeast University, Nanjing, China · Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences, Shenzhen, China
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.2483 M 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.
Figures & tables
| Complexity | Kvasir-SEG | ClinicDB | ColonDB | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Model | Year | Params (M) | GMACs | W/A | Dice | IoU | Dice | IoU | Dice | IoU |
| U-Net [ 17 ] | 2015 | 31.0317 | 48.1670 | 32/32 | 0.8208 | 0.7303 | 0.6791 | 0.5849 | 0.5360 | 0.4471 |
| UNeXt [ 1 ] | 2022 | 1.4719 | 0.5620 | 32/32 | 0.7385 | 0.6435 | 0.5207 | 0.4274 | 0.3785 | 0.2999 |
| Mobile-PolypNet [ 2 ] | 2022 | 0.2239 | 1.1380 | 32/32 | 0.5974 | 0.4720 | 0.4390 | 0.3269 | 0.2711 | 0.1887 |
| EGE-UNet [ 18 ] | 2023 | 0.0534 | 0.0720 | 32/32 | 0.5882 | 0.4611 | 0.4464 | 0.3276 | 0.2804 | 0.1950 |
| CMUNeXt-S [ 4 ] | 2024 | 0.4175 | 1.0120 | 32/32 | 0.7120 | 0.6076 | 0.5029 | 0.3954 | 0.3148 | 0.2436 |
| Configuration | Params (M) | GMACs | Metric | Perf. (A / B / C) |
|---|---|---|---|---|
| Multi-branch | 0.3233 | 0.1064 | Dice | (0.8102 / 0.7142 / 0.5532) |
| FP32 | IoU | (0.7218 / 0.6161 / 0.4630) | ||
| Re-parameterized | 0.2483 | 0.0949 | Dice | (0.8102 / 0.7142 / 0.5532) |
| FP32 | IoU | (0.7218 / 0.6161 / 0.4630) | ||
| Ternary | 0.2483 | 0.0949 | Dice | (0.0002 / 0.0004 / 0.0007) |
| PTQ | IoU | (0.0002 / 0.0004 / 0.0007) |
| Metric | Original Gemmini | TernScope |
|---|---|---|
| Weight/Activation bitwidth (bits) | 8/8 | 2/8 |
| PE array | ||
| Library | Nangate45 | Nangate45 |
| Standard-cell area (mm 2 ) | 1.816 | 0.540 |
| Compute-array area (mm 2 ) | 0.685 | 0.079 |
| SRAM (KiB) | 320 | 344 |
Medical Image Segmentation
Medical image segmentation delineates organs, lesions, and other structures in scans to support measurement, diagnosis, treatment planning, and research.
See all 786 papers