Hass Avocado Leaf Image and Segmentation Mask Dataset from Valle del Cauca, Colombia
Description
This dataset contains 2,097 RGB images of Hass avocado (Persea americana Mill.) leaves collected on thirteen farms in Bolívar, Roldanillo, and Trujillo, Valle del Cauca, Colombia. Images were acquired using handheld smartphones under natural lighting and background conditions, without detaching the leaves from the trees. The dataset includes healthy leaves (264) and visual symptomatic patterns associated with Pecosa/Pseudocercospora (1,038), Boeremia (340), and Diaporthe/Cladosporium (267). An additional 188 images exhibit mixed symptomatic patterns associated with Pecosa/Pseudocercospora and algal leaf spot (Cephaleuros virescens). Labels were assigned through visual assessment by an agronomist experienced in plant health. Images in the three individual symptomatic categories were classified into initial and advanced visual stages using qualitative criteria, whereas the mixed images were not assigned a visual progression stage. These labels describe visible symptoms and do not constitute individual molecular confirmation of the associated organisms. Images are divided into two acquisition subsets: 539 photographs captured using a custom Android application and 1,558 photographs captured using the smartphones' default camera applications. The custom application provided framing guidance and recorded acquisition metadata and optional user-entered information. Metadata availability therefore varies among records. All 188 mixed images belong to the conventional camera subset. Each original JPG image is paired with a binary PNG mask delineating the foreground leaf. Masks were generated through a semi-automatic, interactive procedure based on the Segment Anything Model (SAM) in MATLAB R2025b and subsequently reviewed visually. Original images and masks share a common identifier, allowing users to reconstruct segmented images. The repository also provides a consolidated Excel file (dataset_metadata.xlsx) containing image identifiers, relative file paths, visual labels, available metadata, and 22 calculated features: 11 geometric and dimensional features, six color features in RGB and HSV spaces, and five texture features based on gray-level co-occurrence matrices (GLCM) and entropy. Supporting resources include original acquisition metadata files in TXT format where available, MATLAB scripts for segmentation and feature extraction, an initial test version of the Android application in APK format, and a README describing the organization and use of the files. Farms are identified by codes to preserve their confidentiality. The dataset supports the development and evaluation of leaf segmentation, feature extraction, and foliar symptom recognition methods under field conditions, including applications in computer vision, precision agriculture, and mobile plant health inspection.
Files
Steps to reproduce
1. Sampling and acquisition Images were collected on thirteen Hass avocado farms in Bolívar, Roldanillo, and Trujillo, Valle del Cauca, Colombia, selected through purposive sampling based on visible foliar symptoms, producer participation, and access. Healthy and symptomatic leaves were photographed while attached to productive trees. Images were acquired on April 9–10 and June 10–11, 2026, between 09:00–13:00 and 14:00–17:30, using Honor RKY-LX3 and Xiaomi 2311DRK48G smartphones held approximately 15–30 cm from the leaves. Natural lighting and backgrounds were retained. Of 2,097 JPG images, 539 were captured with a custom Android application providing framing guidance and metadata; 1,558 were acquired using default camera applications, including all 188 mixed-pattern images. Focus, exposure, framing, and leaf visibility were checked; inadequate images were retaken or excluded. 2. Visual labeling An agronomist experienced in plant health assigned five visual categories: healthy (264), Pecosa/Pseudocercospora (1,038), Boeremia (340), Diaporthe/Cladosporium (267), and mixed Pecosa/Pseudocercospora plus algal leaf spot (Cephaleuros virescens) (188). Initial or advanced stages were assigned only to the three individual symptomatic categories based on lesion size, distribution, coalescence, and necrosis. Mixed images received both labels in one record, separated by a semicolon, and the stage not_assessed. Labels represent visual associations, not individual etiological confirmation. 3. Segmentation and review The foreground leaf was segmented in MATLAB R2025b using Segment Anything Model (SAM). Operators selected positive points inside the leaf and, when needed, negative points on unwanted background regions. Masks were refined by retaining the largest connected component, filling internal holes (including enclosed perforations), and applying morphological opening and closing with disk radii of two and three pixels, respectively. Original images, masks, and segmented results were visually reviewed; unsatisfactory masks were regenerated. Accepted binary masks were saved as PNG files sharing the image base name with the suffix _mask. 4. Feature extraction and consolidation A supplied MATLAB script calculated 22 features from each RGB image and binary mask: 11 geometric/dimensional, six mean RGB/HSV color, and five texture features. Symmetric gray-level co-occurrence matrices (GLCMs) used eight gray levels and offsets [0,1], [-1,1], [-1,0], and [-1,-1], with background pixels set to zero. Contrast, homogeneity, energy, and correlation were averaged over four directions; entropy was calculated within the mask using a 256-level histogram. The dataset_metadata.xlsx file consolidates identifiers, relative paths, labels, features, and available metadata in one row per image. Original Android-generated TXT metadata files were retained where available.
Institutions
- Universidad del ValleValle del Cauca Department, Santiago de Cali