SeedSortNet: a rapid and highly effificient lightweight CNN based on visual attention for seed sorting

PeerJ Comput Sci. 2021 Aug 5:7:e639. doi: 10.7717/peerj-cs.639. eCollection 2021.

Abstract

Seed purity directly affects the quality of seed breeding and subsequent processing products. Seed sorting based on machine vision provides an effective solution to this problem. The deep learning technology, particularly convolutional neural networks (CNNs), have exhibited impressive performance in image recognition and classification, and have been proven applicable in seed sorting. However the huge computational complexity and massive storage requirements make it a great challenge to deploy them in real-time applications, especially on devices with limited resources. In this study, a rapid and highly efficient lightweight CNN based on visual attention, namely SeedSortNet, is proposed for seed sorting. First, a dual-branch lightweight feature extraction module Shield-block is elaborately designed by performing identity mapping, spatial transformation at higher dimensions and different receptive field modeling, and thus it can alleviate information loss and effectively characterize the multi-scale feature while utilizing fewer parameters and lower computational complexity. In the down-sampling layer, the traditional MaxPool is replaced as MaxBlurPool to improve the shift-invariant of the network. Also, an extremely lightweight sub-feature space attention module (SFSAM) is presented to selectively emphasize fine-grained features and suppress the interference of complex backgrounds. Experimental results show that SeedSortNet achieves the accuracy rates of 97.33% and 99.56% on the maize seed dataset and sunflower seed dataset, respectively, and outperforms the mainstream lightweight networks (MobileNetv2, ShuffleNetv2, etc.) at similar computational costs, with only 0.400M parameters (vs. 4.06M, 5.40M).

Keywords: Attention mechanism; Computer vision; Lightweight CNN; Seed sorting.

Grants and funding

This work was supported by NSFC (U1804157, No. 61772576, No. 62072489), the Henan Science and Technology Innovation Team (CXTD2017091), IRTSTHN (21IRTSTHN013), the ZhongYuan Science and Technology Innovation Leading Talent Program (14200510013), and the Program for Interdisciplinary Direction Team in Zhongyuan University of Technology. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.