Abstract:Aiming to address inaccurate maize canopy segmentation and temperature extraction caused by low contrast between canopy and background, scale variation among leaves, and blurred boundaries in thermal infrared images, an improved U-Net-based method was developed. A paired dataset containing 1 108 thermal infrared images, pixel-level semantic labels, and corresponding temperature matrices was constructed and divided into training, validation, and test sets at an approximate ratio of 8∶1∶1. Pixels marked as 255 were excluded from loss and metric calculations. ResNet50-U-Net was selected as the baseline. A multi-scale bottleneck (MSB) module was introduced at the deepest encoder layer to aggregate local, regional, and global contextual information through dilated convolutions and global pooling. An attention skip fusion (ASF) module was inserted into two high-level skip connections to filter background responses by using decoder-side semantic information. The resulting ASMB-UNet was trained with AdamW and evaluated on 115 test images. It attained mIoU, mPA, precision, recall, and F1-score values of 96.06%, 97.91%, 97.08%, 96.71%, and 96.89%, respectively. With the network structure unchanged, replacing Adam with AdamW increased the mIoU of ResNet50-U-Net from 94.01% to 94.64%, an improvement of 0.63 percentage points. Under the same AdamW training conditions, jointly incorporating ASF and MSB increased the mIoU from 94.64% to 96.06%, corresponding to a structural gain of 1.42 percentage points. Compared with the Adam-trained ResNet50—U-Net baseline, ASMB-UNet achieved an overall mIoU improvement of 2.05 percentage points, which reflected the combined effects of optimizer adjustment and structural modification. In addition to the direct ResNet50-U-Net baseline, four external models, i.e., DeepLabV3+, SegFormer, HRNet, and DDRNet, were included for comparison, and ASMB-UNet achieved the highest values for all five segmentation metrics. Ablation results demonstrated the effectiveness of the two modules. Using manually annotated masks as the reference, valid temperature estimates were obtained for all test images, with a temperature extraction MAE of 0.014℃ and RMSE of 0.028℃, indicating lower overall error than the ResNet50-U-Net baseline. The method reduced the influence of segmentation errors on average canopy temperature extraction.