Welcome to Smart Agriculture 中文

Smart Agriculture ›› 2025, Vol. 7 ›› Issue (1): 124-135.doi: 10.12133/j.smartag.SA202411016

• Topic--Intelligent Agricultural Knowledge Services and Smart Unmanned Farms (Part 2) • Previous Articles     Next Articles

Domain Generalization Method of Strawberry Disease Recognition Based on Instance Whitening and Restitution

HU Xiaobo1, XU Taosheng2(), WANG Chengjun1, ZHU Hongbo1, GAN Lei1   

  1. 1. School of Artificial Intelligence, Anhui University of Science and Technology, Huainan 232001, China
    2. Hefei Institutes of Physical Science, Chinese Academy of Science, Hefei 230031, China
  • Received:2024-10-30 Online:2025-01-30
  • Foundation items:
    Scientific Research Foundation for High-level Talents of Anhui University of Science and Technology(2024yjrc05); National Natural Science Foundation of China(62003001); University-Level Key Projects of Anhui University of Science and Technology(XCZX2021-01)
  • About author:

    HU Xiaobo, E-mail:

  • corresponding author:
    XU Taosheng, E-mail:

Abstract:

[Objective] Strawberry disease recognition models based on deep neural networks generally assume that the training (source domain) and the test (target domain) datasets are identically and independently distributed. However, in practical applications, due to the influence of illumination, background and strawberry variety, the target domain often exhibits significant domain shift from the source domain. The domain shift result in accuracy decline of the models in target domain. To address this problem, a domain generalization method based on instant whitening and restitution (IWR) was proposed to improve the generalization performance of strawberry disease identification models in this research. [Methods] Samples from different source often exhibit great domain shift due to variations in strawberry varieties, regional climate, and photography methods. Therefore, a dataset was constructed for domain generalization research on strawberry disease using two distinct approaches. The first dataset was acquired using a Nikon D810 camera at multiple strawberry farms in Changfeng county, Anhui province, with a fixed sampling schedule and fixed camera distance. In contrast, the second dataset was an open-source collection, primarily comprising images captured using smartphones in multiple strawberry greenhouses in Korea, with varied and random shooting distances and angles. The IWR module mitigated style variations (e.g., illumination, color) through instance whitening, where features were normalized to reduce domain discrepancies between the datasets. However, such operation was task-ignorant and inevitable removed some task-relevant information, which may be harmful to classification performance of the models. To remedy this, the removed task-relevant features were attempted to recover. Specifically, two modules were designed to extract task-relevant and task-irrelevant feature from the filtered style features, respectively. A dual restitution loss was utilized to constraint the modules' feature correlation between the task and a mutual loss was used to ensure the independence of the features. In addition, a separation optimization strategy was adopted to further enhance the feature separation effect of the two modules. [Results and Discussions] The F1-Score was adopted as evaluation metrics. A series of ablations studies and comparative experiments were conducted to demonstrate the effectiveness of the proposed IWR. The ablation experiments proved that the IWR could effectively eliminate the style variations between different datasets and separate task-relevant feature from the filtered style features, which could simultaneously enhance model generalization and discrimination capabilities. The recognition accuracy increased when IWR pluged to AlexNet, GoogLeNet, ResNet-18, ResNet-50, MobileNetV2 and MobileNetV3. It demonstrated that the proposed IWR was an effective way to improve the generalization of the models. Compared with other domain generalization methods such as IBNNet, SW and SNR, the generalization performance of the proposed algorithm on test datasets could be improved by 2.63%, 2.35% and 1.14%, respectively. To better understand how IWR works, the intermediate feature maps of ResNet-50 without and with IWR were compared. The visualization result showed that the model with IWR was more robust when the image style changed. These results indicated that the proposed IWR achieves high classification accuracy and boosts the generalization performance of the models. [Conclusions] An instance whitening and restitution module was presented, which aimed to learn generalizable and discriminative feature representations for effective domain generalization. The IWR was a plug-and-play module, it could be inserted into existing convolutional networks for strawberry disease recognition. Style normalization and restitution (SNR) reduced the style information through instance whitening operation and then restitutes the task-relevant discriminative features caused by instance whitening. The introduced dual restitution loss and mutual loss further facilitate the separation of task-relevant and task-irrelevant feature. The schemes powered by IWR achieves the state-of-the-art performance on strawberry disease identification.

Key words: deep neural networks, strawberry disease recognition, instant whitening, feature restitution, domain generalization

CLC Number: