Abstract
Deep learning is making strides in plant phenotyping and agriculture. But pretrained models require significant adaptation to work on new target datasets originating from a different experiment even on the same species. The current solution is to retrain the model on the new target data implying the need for annotated and labelled images. This paper addresses the problem of adapting a previously trained model on new target but unlabelled images. Our method falls in the broad machine learning problem of domain adaptation, where our aim is to reduce the difference between the source and target dataset (domains). Most classical approaches necessitate that both source and target data are simultaneously available to solve the problem. In agriculture it is possible that source data cannot be shared. Hence, we propose to update the model without necessarily sharing the data of the training source to preserve confidentiality. Our major contribution is a model that reduces the domain shift using an unsupervised adversarial adaptation mechanism on statistics of the training (source) data. In addition, we propose a multi-output training process that (i) allows (quasi-)integer leaf counting predictions; and (ii) improves the accuracy on the target domain, by minimising the distance between the counting distributions on the source and target domain. In our experiments we used a reduced version of the CVPPP dataset as source domain. We performed two sets of experiments, showing domain adaptation in the intra- and inter-species case. Using an Arabidopsis dataset as target domain, the prediction results exhibit a mean squared error (MSE) of 2.3. When a different plant species was used (Komatsuna), the MSE was 1.8.
Introduction: The Challenge of Domain Shift
In plant phenotyping, counting leaves is a vital metric for tracking growth and health. While deep learning has made this easier, these models suffer from a "generalization gap." A model trained to count leaves on Arabidopsis plants in one lab often fails when shown plants in another lab due to differences in lighting, camera angles, or plant morphology—a phenomenon known as domain shift.
The standard fix is to label thousands of new images for every new experiment, which is slow and expensive. Furthermore, many research institutions cannot share their raw datasets due to confidentiality agreements. This research tackles the challenge of adapting a pretrained model to a new "target" domain using only unlabelled images and without needing direct access to the original "source" images, thereby preserving privacy.
Methodology: Adversarial Unsupervised Adaptation
The proposed framework is based on the Adversarial Discriminative Domain Adaptation (ADDA) paradigm, executed in three distinct steps:
- Pretraining: A ResNet-50 backbone is trained on a labeled source dataset. Instead of standard single-output regression, a multi-output regression layer followed by a SumLayer is used. This layer outputs a sequence of values between 0 and 1 that are summed to get the final count, encouraging the model to treat leaves as discrete units.
- Adversarial Adaptation: To bridge the gap between domains, a Discriminator is introduced. The goal of the "Generator" (the ResNet backbone) is to extract features from the new, unlabelled target images that are so similar to the source features that the Discriminator cannot distinguish between them.
- Avoiding Posterior Collapse: To prevent the model from predicting the same average number for every image, a Kullback-Leibler (KL) divergence loss is employed. This ensures the distribution of predicted leaf counts in the target dataset matches the distribution seen in the source data.
Experimental Results
The study utilized the CVPPP dataset (Arabidopsis) as the source domain and tested adaptation on two target domains: MM (intra-species Arabidopsis) and Komatsuna (inter-species).
The results demonstrate a dramatic improvement over "naive" models that lack adaptation:
- Intra-species Adaptation: Without adaptation, the model exhibited a Mean Squared Error (MSE) of 211. With the proposed adversarial adaptation, the error dropped significantly to an MSE of 2.36.
- Inter-species Adaptation: Adapting from Arabidopsis to a completely different plant species (Komatsuna) yielded an MSE of 1.84.
- Comparison to Supervised Learning: While supervised "Fine-Tuning" still performs best (MSE ~0.47), this unsupervised method closes a massive portion of the gap without requiring any new human-made labels.
Conclusion
This work proves that adversarial adaptation can effectively handle regression tasks like leaf counting, which are typically more sensitive to feature shifts than classification. By forcing the network to output "quasi-integers" through a SumLayer, the model learns a robust representation of leaves. Furthermore, the privacy-preserving nature of the adaptation process allows labs to share models without compromising raw data. Future work will focus on stabilizing adversarial training across diverse plant architectures.
Summary updated