Manuscript Offprint

arXiv:2610.06369

Environmental sensor readings in two crop disease image datasets identify the session in which each image was taken

Sungwoo Kang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Introduction: Crop disease studies that fuse images with environmental sensor readings, such as soil chemistry, report higher accuracy than image-only models. In a paired image-sensor dataset, however, one reading can be attached to many images of a session, which is one farm or greenhouse on one day. If disease classes differ between sessions, the reading can predict the class by identifying the session rather than by measuring the plant's environment. Methods: We tested whether the sensor readings of two Korean datasets identify the session, using a diagnostic that reads no image. The datasets are the Crop Disease Diagnosis (CDD) challenge dataset and a subtropical and tropical crop pest and disease dataset from the government portal AI Hub. The diagnostic counts how many images share each sensor reading and compares a classifier given the sensor readings with one given only the date and time that the dataset records. We also re-analyzed a published CDD fusion study and trained its fusion model on the AI Hub dataset. Results: In both datasets, nearly every image shared its sensor reading with other images. On the AI Hub dataset, the date and time alone were comparable to or better than the dataset's soil-chemistry readings at predicting the disease class in all 7 crops that we compared. For 91.9% of the CDD study's test images, a training image carried identical sensor readings. On the study's split, the date and time alone matched the study's reported macro-F1 for its fusion model. Trained for the study's 300 epochs, the fusion model raised macro-F1 slightly relative to an image-only model on a random split of the AI Hub dataset, but whether the gain exceeds zero on held-out dates remained unresolved. Discussion: A fusion gain measured on a split that shares sessions between training and test data cannot be separated from session identity. Fusion studies should therefore report the gain on a split that holds out whole farms or sessions, and should set a sensor-only score beside those of two predictors that read no sensor: one given only the date and time and one that always outputs the most frequent class.

Keywords: plant disease detection, multimodal fusion, environmental sensors, data leakage, shortcut learning, cross-validation, benchmark datasets

1 Introduction

Plant pathogens and pests reduce the yields of the major food crops worldwide [1]. To detect plant diseases, deep convolutional networks have been trained to recognize them in leaf images [2]. Recent studies add environmental sensor readings, such as air temperature, humidity, and soil chemistry recorded by Internet of Things devices, to the image in one multimodal model and report that the fusion model detects diseases and pests more accurately than an image-only model [3–5]. Datasets released for research supply paired images and sensor readings for training fusion models. A dataset of subtropical and tropical crop pests and diseases on AI Hub, the Korean government's

A One sensor reading is attached to many images

B Two parts of the diagnostic

Figure

Every image of the session is labeled disease class A

Farm 2, day 2

Every image of the session is labeled disease class B

Granularity probe

Counts the images and the sessions that share each reading, and the share of each variable's variance that farm identity explains

Sensor reading

Image, filled with the reading it carries

Timestamp baseline

Predicts the label from the timestamp alone and compares the prediction with one made from the sensor readings

Figure 1: How one sensor reading is attached to many images, and the two parts of the diagnostic. (A) A schematic of two sessions, each one farm on one day. Each sensor reading (diamond) is attached to every image (square) taken after it until the next reading, so the images of a session share far fewer readings than there are images. In the schematic, every image of a session carries that session's disease class. (B) The two parts of the diagnostic. The granularity probe counts the images and the sessions that share each reading and measures the share of each variable's variance that farm identity explains. The timestamp baseline compares a classifier given only the timestamp with one given the sensor readings. Neither part reads an image.

data portal, attaches a panel of soil and ambient sensor variables to each image and lists predicting disease from that panel among its intended uses [6]. The Crop Disease Diagnosis (CDD) challenge dataset pairs each labeled image with an environment series, a time series of greenhouse sensor readings [7]. A study on CDD reports that adding the environment series to a ResNet-50 image classifier raises macro-F1 by 2.58 percentage points [8]. Whether such gains come from the plant's environment depends on what the paired sensor readings measure.

A sensor at a farm records a reading at intervals, so a dataset can attach one reading to every image taken at that farm before the next reading (Figure 1A). A reading attached in this way identifies the farm and the day of acquisition. We call one farm or greenhouse on one day a session. If disease classes differ between the sessions of a dataset, a model can predict the class by identifying the session from the readings, without any agronomic signal in them. The readings are then a shortcut, which is a feature that predicts the label in the training data but not under new conditions [9, 10]. A random split, however, tests a model under the conditions of its training data: it places images of one session in both the training and the test data, so a model can learn in training which class goes with the readings of each session and recognize the same readings in the test data. A fusion gain measured on a random split therefore cannot separate an agronomic contribution of the readings from session identity, which makes the session a confound of the gain.

Session-disjoint splits, which keep all images of a session on one side and so would separate the agronomic contribution from session identity, already exist for image datasets. Image datasets need such splits because the images of one session share the conditions under which they were taken, so images identify their session as well. A classifier's accuracy on the sessions of its training data therefore need not hold on other sessions: classifiers trained on images taken under controlled conditions lose accuracy on images taken under other conditions [2, 11]. The Global Wheat Head Detection benchmark, for example, supplies session-disjoint splits that measure that loss. It divides its images into sub-datasets, each of which holds the images of one experimental unit from one acquisition session [12]. A sub-dataset therefore corresponds to one of our sessions, with its experimental unit as the farm or greenhouse and its acquisition session as the day. The benchmark assigns each sub-dataset to only one of its training, validation, and test sets [12]. Its splits therefore measure accuracy on sessions that the training data do not include. More generally, for data with spatial, temporal, or hierarchical structure, Roberts et al. [13] recommend cross-validation that holds out whole blocks of related observations. Session identity is less apparent in sensor readings than in images, however, because a sensor reading is a physical measurement and so appears to carry agronomic information.

The fusion studies that we cite [3–5, 8, 14–17] apply neither of two checks that would show whether their sensor readings identify the session. A timestamp, which is the date and time that a dataset records for each image or for its sensor reading, identifies the day directly, yet none of the studies compares how well its sensor readings and a timestamp predict the label. None of the studies reports an evaluation on a farm-disjoint or session-disjoint split, which keeps all images of a farm or of a session in either the training or the test data. One of the studies, however, keeps all image and sensor sequences of each plant or each infection event (one occurrence of disease) in only one of its training, validation, and test sets [5]. That study states a temporal separation between its training and test data, but its text does not establish that no session falls on both sides.

We supply a diagnostic that tests whether a dataset’s sensor readings identify the session. The diagnostic reads a dataset’s sensor readings and the metadata that the dataset records for each image, but no image. Testing a fusion model on held-out farms or sessions, by contrast, needs the trained model and needs every class to occur on several farms or sessions, so that each class appears in both the training and the test data. The diagnostic needs neither, so it can run before any fusion model is trained. The diagnostic has two parts (Figure 1B). A granularity probe tests whether the sensor readings describe single images or groups of images: it measures how many images share each sensor reading, how many sessions each reading occurs in, and the share of each sensor variable’s variance that farm identity explains. A timestamp baseline predicts the label from a timestamp alone and compares that prediction with one made from the sensor readings, because a reading that predicts the label no better than the timestamp may only identify the session. The timestamp baseline adapts partial-input baselines, which score a classifier that sees only part of its input and so measure how well that part alone predicts the label [18]. Such baselines have been applied to natural language inference, in which a model decides whether the second sentence of a pair follows from the first. On the benchmarks of that task, classifiers that saw only the second sentence still predicted the label, so the second sentences carried cues to the label [19, 20]. Unlike a partial-input baseline, which keeps part of the model’s input, the timestamp baseline replaces the sensor readings with the timestamp, so the baseline measures how well the timestamp alone predicts the label.

We apply the diagnostic to the AI Hub and CDD datasets and re-analyze the CDD study on its own split, because the CDD study is the only fusion study that we cite whose dataset and split were both released. The CDD study also supplies the fusion model that we train on the AI Hub dataset to test whether the model's gain exceeds zero when whole photo dates are held out. Holding out photo dates keeps the session of most test images out of training, because most images of the AI Hub dataset were photographed on the day on which their panel was measured. The test runs on the AI Hub dataset because, unlike CDD, it can be split by photo date with every class in both the training and the test data. This paper makes five contributions.

  • In both datasets, one sensor reading is shared by many images: the AI Hub dataset carries only 13,150 distinct sets of panel values across a metadata spreadsheet of 274,000 rows, one row per image, and CDD only 780 distinct environment series for its 5,767 images.

  • On the AI Hub dataset, a classifier given only the timestamp is comparable to or better than one given the dataset’s soil-chemistry readings in 7 of the 7 crops compared.

  • On the CDD study’s own split, where 91.9% of the test images share their environment series with training images, a classifier given only the timestamp reaches the macro-F1 that the study reports for its fusion model.

  • On CDD, a classifier given only the environment series falls in macro-F1 from 0.885 on a random split to 0.653 on a split that keeps all images of each series in either the training or the test data, so much of its random-split score comes from recognizing series seen in training. Under either split, we detect no difference in macro-F1 between that classifier and one given only the timestamp.

• Trained for the CDD study’s 300 epochs, the study’s fusion model raises macro-F1 relative to an image-only model on a random split of the AI Hub dataset, but at 5 training runs per model, a test that holds out whole dates gives confidence intervals too wide to settle whether the gain exceeds zero on those dates.

References (27)