Related Experiment Videos
Compressing Semantic Segmentation Models for Agricultural IoT: A Systematic Study of Pruning Trade-Offs for Crop-Weed
Flora Amato1, Rajib Chandra Ghosh1, Semanto Mondal1
1Department of Electrical Engineering and Information Technology (DIETI), University of Naples Federico II, 80125 Naples, Italy.
Abstract:
Semantic segmentation of crops and weeds is an important component of selective weeding systems, but accurate segmentation networks can impose substantial computational and memory demands on resource-constrained agricultural platforms. This paper presents a systematic study of the accuracy-efficiency trade-offs involved in compressing semantic segmentation networks for agricultural edge computing. Six architectures spanning conventional CNN encoder-decoders, atrous and pyramid-pooling decoders, a mobile-oriented CNN, and two transformer scales are evaluated on the Crop/Weed Field Image Dataset (CWFID), with three random seeds per architecture. The most favourable compact model is subsequently evaluated under unstructured global magnitude pruning and dependency-aware structured channel pruning, using one-shot and iterative prune-and-fine-tune schedules at sparsity levels from 10% to 80%, with three seeds per configuration. Among the dense baselines, U-Net with a MobileNetV3-Large encoder matches the accuracy of the larger SegFormer-B2 model (88.85% versus 88.67% mIoU, a difference of 0.18% across three seeds, p = 0.58) with 3.7× fewer parameters than SegFormer-B2. Iterative unstructured pruning reaches 80% weight sparsity while retaining 89.04% mIoU; however, because the dense tensor dimensions are unchanged, this sparsity does not reduce the parameter count, GFLOPs, or model size on conventional hardware. Structured channel pruning, which does reduce all three, remains viable only up to 30% sparsity, reducing GFLOPs by 2.1× at a cost of 4.21 mIoU points and collapsing beyond 40%. Without fine-tuning, structured pruning causes severe degradation even at 10% channel sparsity. The results show that architecture selection has a major influence on the accuracy-efficiency trade-off, while the effects of pruning depend strongly on the pruning structure and fine-tuning strategy. Crop segmentation consistently degrades before the aggregate mIoU indicates severe failure, highlighting the need for class-wise evaluation when compressing crop-weed segmentation models.