Uniplant-CG: Measurement System
Introduction
Uniplant-CG is a unified multi-task framework designed for robust plant disease recognition and severity assessment in open-world environments. It integrates hierarchical contrastive learning with a knowledge-based feature library to enable flexible identification of unseen plant species and novel disease symptoms. A cross-domain adaptation module further aligns visual representations across diverse sources ensuring stable performance under distribution shifts. By jointly modeling species classification, disease detection, and severity estimation within a single pipeline, Uniplant-CG achieves strong generalization and reliability for real-world agricultural applications.
GitHub: https://github.com/GZU-SAMLab/UniPlant-CG
Environment:
You can create a new Conda environment by running the following command:
conda env create -f environment.yml
In the environment, we still use other networks. If it does not work, please configure the environment of other networks first.
Code and Data
The code can be downloaded from there.
The test data are available for download at here, while the training data will be accessible upon public release.
PreTrained Model
The pre-trained PlantDid model is linked below, you can download it.Uniplant-CG: Here are the trained Uniplant-CG weights.
And we use ViT, the download is : Here.
Get Started
Testing
If you want to train and test. You can run the following command:
bash train.sh
bash test.sh
Results
Quantitative Analysis
Uniplant-CG outperforms prior methods in unified plant disease recognition and severity grading, achieving superior accuracy and robustness across domains. By aligning cross-domain features and leveraging prototype-guided learning, it excels in recognizing unseen species and novel symptoms.
Figure 1:Quantitative evaluation results of Uniplant-CG.
Uniplant-CG consistently outperforms baseline models by accurately recognizing plant species, diseases, and severity levels across diverse domains and unseen conditions, demonstrating strong robustness and effectiveness for real-world agricultural diagnostics..
Figure 2: Heatmap visualization of Uniplant-CG and the baseline model. Uniplant-CG exhibits clearer focus on lesion areas and critical leaf regions, highlighting its stronger feature alignment and interpretability across domains..
