Abstract:Cotton pigment glands are rich in gossypol, which holds significant value in agricultural pest control, medical pharmacology research, and other fields. Accurately obtaining information on the area and quantity of pigment glands is the key to evaluating gossypol content. However, pigment glands are small in size, numerous in number, and densely distributed. They account for a very low proportion in the entire leaf image and are easily interfered by leaf veins and background noise. Therefore, the rapid and accurate identification of pigment glands in cotton leaves remains challenging. To address the above problems, a portable field device for acquiring cotton leaf images was developed, which can obtain high-quality images with a simple background without damaging the cotton leaves. Meanwhile, a lightweight semantic segmentation network named Dual-GlandNet was proposed. This model only conducted partial cross-resolution feature interaction for high and low resolution branches. Specifically, the CBAM attention module was introduced into the high resolution branch to enhance the expression ability of fine-grained features. For the low-resolution branch, the CoordAtt coordinate attention module and the three-way separable dilated convolution Lite SepPP were added to strengthen the capability of global semantic feature extraction. Experimental results showed that the proposed Dual-GlandNet model achieved a mean intersection over union (mIoU) of 80.6%, the F1-score of 86.5%, an inference time of approximately 17 ms per image, and a parameter count of only 6.79×10^6. Compared with other mainstream semantic segmentation models, this model achieved a better balance between accuracy and speed, providing a deployable technical solution for real-time and non-destructive detection of pigment glands in cotton leaves. It was of great significance for assessing gossypol content in cotton leaves, breeding high-quality varieties, and implementing precise field management.