How Much Segmentation Can Be Pruned Before Structure Is Lost?¶
Completed
Motivation¶
Edge segmentation is a constrained optimization problem: removing computation matters only while the model still resolves the scene. Segmentic was built to measure that boundary instead of treating pruning as an automatic improvement.
Problem¶
The useful pruning level was unknown. Accuracy, mean intersection over union, and throughput had to be evaluated together at each sparsity setting.
Architecture¶
A MobileNetV3 backbone feeds a DeepLabV3+ decoder trained on Pascal VOC 2012. Structured pruning is applied at levels from 0.1 through 0.4. Each variant is measured for pixel accuracy, mIoU, and FPS, then exported to ONNX for cross-platform execution.
Post-training quantization was also applied, but it was not benchmarked separately; no speed or accuracy claim is attached to that variant.
Implementation¶
PyTorch Lightning manages training and evaluation. The pipeline records the same metrics for the baseline and each pruned model so that the trade-off remains directly comparable.
Results¶
| Model | Pixel accuracy | mIoU | FPS |
|---|---|---|---|
| FP32 baseline | 91.59% | 0.6609 | 32.57 |
| Pruned 0.2 | 90.83% | 0.5794 | 37.96 |
| Pruned 0.3 | 88.39% | — | 37.28 |
The 0.2 configuration provided the recorded best trade-off: about 16% more FPS for roughly one percentage point less pixel accuracy, with a larger decline in mIoU.
Lessons Learned¶
Pixel accuracy alone can hide structural degradation. At pruning level 0.2 it moved little while mIoU fell more clearly, so deployment decisions need both measures.
Quantization without a separate benchmark is an implementation fact, not a performance result. Keeping that distinction prevents expected gains from turning into reported gains.
Future Work¶
A future evaluation should benchmark the quantized export independently and report the target hardware, latency distribution, and accuracy change.