# Transfer Learning in Multimodal Sunflower Drought Stress Detection
## 2 Materials and Methods
### Dataset  
There was a total of 584 images in the dataset, which consisted of images from two data sources. The first data source contained a total of 209 non-invasive rhizotron images that give important information about root morphology at different GWC levels from a subsurface perspective, as shown in Figure 2a. Non-invasive rhizotron images were taken on the 14-day-old plant in a box with artificial light and a camera placed at a fixed distance. The rhizotrons had a black square of known size placed on the transparent side of the rhizotron for calibration before using WinRhizo Pro software for measurement. In order to provide a more accurate assessment of the effects of drought stress on the visible plant features, we used the second data source, which included 375 photos of sunflower root parts and shoots that have been manually cleaned to remove extraneous material, as shown in Figure 2b,c. Those images were obtained following the fourteenth day of cultivation, when the plants were removed from rhizotrons, the soil was washed out, and any last bits of soil were carefully cleaned off the roots. Measurement and scanning of the root systems and above-ground parts were performed using WinRhizo Pro software and a scanner by placing the roots directly on the scanner glass. The dataset was divided into training (80% of the dataset), validation (20% of the training subset), and testing sets (20% of the dataset). Data Augmentation Strategies  
The dataset was class imbalanced, with 228 photos of plants experiencing drought stress (42% and 50% GWC) and 356 photos of well-watered plants (70% GWC). The imbalance occurred because a significant number of plants exposed to a drought level of 42% failed to grow, indicating that the drought level was too severe. To address this problem and simplify the classification process, we adapted our experimental design. Instead of categorizing plants into three different groups based on the exact GWC percentages (42%, 50%, and 70%), we grouped them into two broad classification categories: stressed (drought stressed) and non-stressed (well watered). This adjustment not only reflects the practical results of stress levels on plant growth but also helps manage class imbalances within the  
Figure 2: Representative dataset images: (**a**) rhizotron image of sunflower roots; (**b**) scanned root parts; (**c**) scanned shoot parts. dataset by consolidating stress categories. However, the dataset remained imbalanced, so we included data augmentation strategies in our pipeline when using the optimal CNN model. Also, data augmentation techniques were used to strengthen the model's resilience to changes in image orientation, light, scale, and deformation. This could enhance the model's generalization abilities, which are particularly important when dealing with a limited dataset. Instances of the ImageDataGenerator class from the Keras library [26] were used for data augmentation on the training set and for rescaling on both the training and test sets. After several experiments, we discovered that the best parameters for the data augmentation generator are as follows:  
* Horizontal flipping;
* Rotation range: \(\pm 20\) degrees;
* Width shift range: \(\pm 20\%\);
* Height shift range: \(\pm 20\%\);
* Zoom range: \(\pm 20\%\);
* Brightness range: 0.1-0.9. Our second approach to increasing the diversity and representativeness of the dataset was augmenting the data by adding new images based on existing images [27; 28; 29]. This initiative was driven by the need to address inherent limitations in the original dataset, specifically the lack of images that captured partial root views under drought stress. This was explained by the fact that under stress, roots tend to be smaller in size and can usually fit completely inside one image frame, providing no room for partial views. We decided to create new images based on existing ones to close this gap and simulate a wider variety of drought stress scenarios.