Figure 1.
Cannabis flower maturity indicators. (
a) Macro photograph with stigmas labeled. (
b) Schematic diagram of stigma and trichome locations. (
c) Trichome color progression: clear (immature), milky (peak potency), and amber (degradation). Images adapted from [
5].
Figure 1.
Cannabis flower maturity indicators. (
a) Macro photograph with stigmas labeled. (
b) Schematic diagram of stigma and trichome locations. (
c) Trichome color progression: clear (immature), milky (peak potency), and amber (degradation). Images adapted from [
5].
Figure 2.
Imaging approaches used in this study. (Top row): (left) traditional loupe-based assessment in greenhouse, (right) smartphone-based macro imaging in greenhouse. (Bottom): controlled laboratory imaging setup for post-harvest analysis, showing the LED desk lamp illumination and smartphone with macro lens attachment.
Figure 2.
Imaging approaches used in this study. (Top row): (left) traditional loupe-based assessment in greenhouse, (right) smartphone-based macro imaging in greenhouse. (Bottom): controlled laboratory imaging setup for post-harvest analysis, showing the LED desk lamp illumination and smartphone with macro lens attachment.
Figure 3.
Schematic flowchart of the proposed dual-path pipeline. Images are processed through trichome detection/classification and stigma segmentation paths, with results aggregated at the flower level for HPLC correlation.
Figure 3.
Schematic flowchart of the proposed dual-path pipeline. Images are processed through trichome detection/classification and stigma segmentation paths, with results aggregated at the flower level for HPLC correlation.
Figure 4.
Patch cutting, filtering, and extraction pipeline. Each image is divided into non-overlapping patches, which are filtered for sharpness before extracting high-detail regions for trichome analysis.
Figure 4.
Patch cutting, filtering, and extraction pipeline. Each image is divided into non-overlapping patches, which are filtered for sharpness before extracting high-detail regions for trichome analysis.
Figure 5.
Trichome detection pipeline. High-resolution image patches are analyzed by a fine-tuned Faster R-CNN model to detect and localize trichomes.
Figure 5.
Trichome detection pipeline. High-resolution image patches are analyzed by a fine-tuned Faster R-CNN model to detect and localize trichomes.
Figure 6.
Trichome classification pipeline. Detected trichomes are classified into clear, milky, or amber classes using a fine-tuned YOLOv8 model.
Figure 6.
Trichome classification pipeline. Detected trichomes are classified into clear, milky, or amber classes using a fine-tuned YOLOv8 model.
Figure 7.
Flower-level trichome analysis pipeline. Classification results are aggregated across patches to compute the overall distribution of trichome types at the flower level.
Figure 7.
Flower-level trichome analysis pipeline. Classification results are aggregated across patches to compute the overall distribution of trichome types at the flower level.
Figure 8.
Stigma segmentation and analysis pipeline. Stigmas are segmented from the image, extracted, and classified by color using 1-NN-based pixel-level classification to compute maturity statistics.
Figure 8.
Stigma segmentation and analysis pipeline. Stigmas are segmented from the image, extracted, and classified by color using 1-NN-based pixel-level classification to compute maturity statistics.
Figure 9.
Detailed visualization of the proposed pipeline showing example outputs at each processing stage. (Upper path): trichome detection and classification into clear, milky, and amber categories. (Lower path): stigma segmentation and color ratio computation. Both paths aggregate results to produce flower-level maturity indicators.
Figure 9.
Detailed visualization of the proposed pipeline showing example outputs at each processing stage. (Upper path): trichome detection and classification into clear, milky, and amber categories. (Lower path): stigma segmentation and color ratio computation. Both paths aggregate results to produce flower-level maturity indicators.
Figure 10.
Performance curves for the best YOLO-based model on stigma segmentation. (a) Precision–recall. (b) Recall–confidence. (c) Precision–confidence.
Figure 10.
Performance curves for the best YOLO-based model on stigma segmentation. (a) Precision–recall. (b) Recall–confidence. (c) Precision–confidence.
Figure 11.
Trichome detection results across the flowering period for all six cannabis cultivars in Experiment 1. Columns represent early (DAF 51), mid (DAF 65), and late (DAF 79) flowering stages. Bounding boxes indicate detected trichomes with color-coded classification: blue (clear), orange (milky), and purple (amber).
Figure 11.
Trichome detection results across the flowering period for all six cannabis cultivars in Experiment 1. Columns represent early (DAF 51), mid (DAF 65), and late (DAF 79) flowering stages. Bounding boxes indicate detected trichomes with color-coded classification: blue (clear), orange (milky), and purple (amber).
Figure 12.
Stigma segmentation results across the flowering period for all six cannabis cultivars in Experiment 1. Columns represent early (DAF 51), mid (DAF 65), and late (DAF 79) flowering stages. Blue overlays indicate detected stigma instances (bounding boxes and segmentation masks).
Figure 12.
Stigma segmentation results across the flowering period for all six cannabis cultivars in Experiment 1. Columns represent early (DAF 51), mid (DAF 65), and late (DAF 79) flowering stages. Blue overlays indicate detected stigma instances (bounding boxes and segmentation masks).
Figure 13.
Stigma color classification using 1-NN pixel-level analysis for all six cannabis cultivars in Experiment 1. Each panel shows the original extracted stigma (left) alongside its classified color map (right), where green pixels indicate immature tissue, and orange pixels indicate mature tissue. The progressive shift from green-dominant to orange-dominant classification reflects advancing maturity across DAF 51, 65, and 79.
Figure 13.
Stigma color classification using 1-NN pixel-level analysis for all six cannabis cultivars in Experiment 1. Each panel shows the original extracted stigma (left) alongside its classified color map (right), where green pixels indicate immature tissue, and orange pixels indicate mature tissue. The progressive shift from green-dominant to orange-dominant classification reflects advancing maturity across DAF 51, 65, and 79.
Figure 14.
Normalized ratios of clear (gray), milky (green), and amber (orange) trichomes alongside total cannabinoid levels (purple dashed line) across Days After Flowering (DAF) for six cannabis cultivars. Solid lines represent regression fits; shaded regions indicate 95% confidence intervals.
Figure 14.
Normalized ratios of clear (gray), milky (green), and amber (orange) trichomes alongside total cannabinoid levels (purple dashed line) across Days After Flowering (DAF) for six cannabis cultivars. Solid lines represent regression fits; shaded regions indicate 95% confidence intervals.
Figure 15.
Changes in amber trichome ratios and Total THC concentrations across six cannabis cultivars throughout Experiment 1. Each subplot represents a single cultivar. Solid lines represent regression fits; shaded regions indicate 95% confidence intervals.
Figure 15.
Changes in amber trichome ratios and Total THC concentrations across six cannabis cultivars throughout Experiment 1. Each subplot represents a single cultivar. Solid lines represent regression fits; shaded regions indicate 95% confidence intervals.
Figure 16.
Pearson correlation coefficients between normalized trichome class ratios and cannabinoid concentrations across cannabis cultivars. Each subplot represents a distinct cultivar. Color scale ranges from blue (negative correlation) through white (zero) to red (positive correlation).
Figure 16.
Pearson correlation coefficients between normalized trichome class ratios and cannabinoid concentrations across cannabis cultivars. Each subplot represents a distinct cultivar. Color scale ranges from blue (negative correlation) through white (zero) to red (positive correlation).
Figure 17.
Normalized green (immature) and orange (mature) stigma color ratios across Days After Flowering (DAF). Solid lines represent regression fits; shaded regions indicate 95% confidence intervals. Purple dashed lines represent normalized total cannabinoid levels.
Figure 17.
Normalized green (immature) and orange (mature) stigma color ratios across Days After Flowering (DAF). Solid lines represent regression fits; shaded regions indicate 95% confidence intervals. Purple dashed lines represent normalized total cannabinoid levels.
Figure 18.
Trichome detection results for Experiment 2 (winter growing season; December–January). The extended flowering period resulted in greater amber trichome development compared to Experiment 1. Bounding boxes indicate detected trichomes: blue (clear), orange (milky), and purple (amber).
Figure 18.
Trichome detection results for Experiment 2 (winter growing season; December–January). The extended flowering period resulted in greater amber trichome development compared to Experiment 1. Bounding boxes indicate detected trichomes: blue (clear), orange (milky), and purple (amber).
Figure 19.
Stigma segmentation results for Experiment 2 (winter growing season; December–January). Columns represent early (DAF 45), mid (DAF 57), and late (DAF 84) flowering stages. Blue overlays indicate detected stigma instances (bounding boxes and segmentation masks).
Figure 19.
Stigma segmentation results for Experiment 2 (winter growing season; December–January). Columns represent early (DAF 45), mid (DAF 57), and late (DAF 84) flowering stages. Blue overlays indicate detected stigma instances (bounding boxes and segmentation masks).
Figure 20.
Stigma color classification using 1-NN pixel-level analysis for three cannabis cultivars in Experiment 2. Each panel shows the original extracted stigma (left) alongside its classified color map (right), where green pixels indicate immature tissue, and orange pixels indicate mature tissue. The progressive shift from green-dominant to orange-dominant classification reflects advancing maturity across DAF 45, 57, and 84.
Figure 20.
Stigma color classification using 1-NN pixel-level analysis for three cannabis cultivars in Experiment 2. Each panel shows the original extracted stigma (left) alongside its classified color map (right), where green pixels indicate immature tissue, and orange pixels indicate mature tissue. The progressive shift from green-dominant to orange-dominant classification reflects advancing maturity across DAF 45, 57, and 84.
Figure 21.
Correlation matrices between trichome class ratios and cannabinoid concentrations across three cultivars in Experiment 2. Each subplot represents a distinct cultivar. Color scale ranges from blue (negative correlation) through white (zero) to red (positive correlation).
Figure 21.
Correlation matrices between trichome class ratios and cannabinoid concentrations across three cultivars in Experiment 2. Each subplot represents a distinct cultivar. Color scale ranges from blue (negative correlation) through white (zero) to red (positive correlation).
Figure 22.
Temporal relationship between trichome class ratios and cannabinoid concentrations for each cultivar in Experiment 2. (Left column): milky trichomes vs. total cannabinoids. (Right column): amber trichomes vs. THC. Solid lines represent regression fits; shaded regions indicate 95% confidence intervals.
Figure 22.
Temporal relationship between trichome class ratios and cannabinoid concentrations for each cultivar in Experiment 2. (Left column): milky trichomes vs. total cannabinoids. (Right column): amber trichomes vs. THC. Solid lines represent regression fits; shaded regions indicate 95% confidence intervals.
Figure 23.
Temporal evolution of normalized stigma color ratios and total cannabinoid levels across Days After Flowering (DAF) for three cultivars in Experiment 2. Green and orange lines represent regression fits for green and orange stigma ratios, respectively, while the purple dashed line represents a regression fit for total cannabinoids. Shaded regions indicate 95% confidence intervals.
Figure 23.
Temporal evolution of normalized stigma color ratios and total cannabinoid levels across Days After Flowering (DAF) for three cultivars in Experiment 2. Green and orange lines represent regression fits for green and orange stigma ratios, respectively, while the purple dashed line represents a regression fit for total cannabinoids. Shaded regions indicate 95% confidence intervals.
Figure 24.
Detection failure modes caused primarily by image quality issues. (Top row): (a) Early flowering with immature/sparse trichomes (Cultivar 202, Exp1). (b) Out-of-focus image resulting in zero detections (Cultivar 805, Exp1). (c) Shallow depth of field limiting detections to narrow in-focus band (Cultivar 1416, Exp1). (Bottom row): (d) Motion blur causing detection failure despite late flowering stage (Cultivar 616, Exp2). (e,f) Same plant, same day showing detection variability (110 vs. 4 trichomes) due to imaging angle and focus differences (Cultivar 805, Exp1).
Figure 24.
Detection failure modes caused primarily by image quality issues. (Top row): (a) Early flowering with immature/sparse trichomes (Cultivar 202, Exp1). (b) Out-of-focus image resulting in zero detections (Cultivar 805, Exp1). (c) Shallow depth of field limiting detections to narrow in-focus band (Cultivar 1416, Exp1). (Bottom row): (d) Motion blur causing detection failure despite late flowering stage (Cultivar 616, Exp2). (e,f) Same plant, same day showing detection variability (110 vs. 4 trichomes) due to imaging angle and focus differences (Cultivar 805, Exp1).
Table 1.
Characteristics of cannabis cultivars used in the correlation experiments.
Table 1.
Characteristics of cannabis cultivars used in the correlation experiments.
| Variety | Chemotype | Phenotype | Flower Color |
|---|
| 805-12 | High CBD | Sativa | Green |
| 901-1 | Mid THC | Sativa | Purple |
| 1416-3 | High THC | Indica | Green |
| 202 | Balanced | Indica | Green |
| 611 | High THC | Indica | Green |
| 616 | High THC | Sativa | Green |
Table 2.
Image distribution per cultivar in the correlation experiments.
Table 2.
Image distribution per cultivar in the correlation experiments.
| Experiment | Variety | Images |
|---|
| Experiment 1 | 202 | 941 |
| 611 | 1007 |
| 616 | 950 |
| 805-12 | 966 |
| 901-1 | 902 |
| 1416-3 | 1020 |
| Subtotal | 5786 |
| Experiment 2 | 616 | 2327 |
| 805-12 | 2583 |
| 1416-3 | 2434 |
| Subtotal | 7344 |
| Total | 13,130 |
Table 3.
Summary of datasets created in this study.
Table 3.
Summary of datasets created in this study.
| Dataset | Number of Images |
|---|
| Correlation Experiments |
| Experiment 1 (Late Spring–Early Summer 2024) | 5786 |
| Experiment 2 (Early Winter 2024-25) | 7344 |
| Trichome Datasets |
| Detection (Training + Testing) | 503 |
| Classification (Total) | 492 |
| Amber | 187 |
| Clear | 149 |
| Milky | 156 |
| Stigma segmentation | 115 |
| Overall Total | 14,240 |
Table 4.
Pipeline vs. best single-stage models at IoU = 0.5.
Table 4.
Pipeline vs. best single-stage models at IoU = 0.5.
| Model | Precision | Recall | F1 |
|---|
| Our Approach (FRCNN + YOLOv8 X-Large) | 0.803 | 0.790 | 0.796 |
| YOLOv9 (Compact) | 0.582 | 0.620 | 0.600 |
| Mask R-CNN (ResNeXt-101 FPN, 3x) | 0.668 | 0.603 | 0.634 |
| Faster R-CNN (ResNet-50 DC5, 1x) | 0.623 | 0.678 | 0.649 |
| YOLO-NAS (Large) | 0.454 | 0.551 | 0.498 |
| RT-DETR (X-Large) | 0.480 | 0.706 | 0.572 |
Table 5.
Single-class fine-tuned trichome detection performance at IoU = 0.5.
Table 5.
Single-class fine-tuned trichome detection performance at IoU = 0.5.
| Model | Precision | Recall | F1 |
|---|
| RT-DETR (X-Large) | 0.875 | 0.596 | 0.709 |
| YOLOv5 (X-Large) | 0.741 | 0.759 | 0.750 |
| YOLOv8 (X-Large) | 0.727 | 0.757 | 0.742 |
| YOLOv9 (Compact) | 0.787 | 0.738 | 0.762 |
| Mask R-CNN (ResNet-50 FPN, 3x) | 0.793 | 0.813 | 0.803 |
| Mask R-CNN (ResNeXt-101 FPN, 3x) | 0.757 | 0.838 | 0.795 |
| Faster R-CNN (ResNet-50 C4, 1x) | 0.815 | 0.802 | 0.808 |
| Faster R-CNN (ResNet-50 DC5, 1x) | 0.842 | 0.776 | 0.808 |
Table 6.
Single trichome maturity classification results for classic and YOLO-based models.
Table 6.
Single trichome maturity classification results for classic and YOLO-based models.
| Model | Precision | Recall | Accuracy | F1 |
|---|
| Classic Models |
| AlexNet | 0.9610 | 0.9600 | 0.9600 | 0.9605 |
| ResNet34 | 0.9461 | 0.9461 | 0.9461 | 0.9461 |
| DenseNet169 | 0.9461 | 0.9461 | 0.9461 | 0.9461 |
| DenseNet121 | 0.9455 | 0.9455 | 0.9455 | 0.9455 |
| SqueezeNet1_1 | 0.9416 | 0.9416 | 0.9416 | 0.9416 |
| DenseNet201 | 0.9403 | 0.9403 | 0.9403 | 0.9403 |
| VGG16_bn | 0.9378 | 0.9378 | 0.9378 | 0.9378 |
| ResNeXt101_32 × 8d | 0.9339 | 0.9339 | 0.9339 | 0.9339 |
| VGG19_bn | 0.9166 | 0.9166 | 0.9166 | 0.9166 |
| ResNet50 | 0.9127 | 0.9127 | 0.9127 | 0.9127 |
| ResNeXt50_32 × 4d | 0.8916 | 0.8916 | 0.8916 | 0.8916 |
| ResNet101 | 0.8820 | 0.8820 | 0.8820 | 0.8820 |
| ResNet152 | 0.8788 | 0.8788 | 0.8788 | 0.8788 |
| Wide ResNet101_2 | 0.8762 | 0.8762 | 0.8762 | 0.8762 |
| Wide ResNet50_2 | 0.8537 | 0.8537 | 0.8537 | 0.8537 |
| YOLO-based Models |
| YOLOv8 Nano | 0.9779 | 0.9776 | 0.9776 | 0.9778 |
| YOLOv8 Small | 0.9806 | 0.9801 | 0.9801 | 0.9804 |
| YOLOv8 Medium | 0.9815 | 0.9807 | 0.9807 | 0.9811 |
| YOLOv8 Large | 0.9816 | 0.9814 | 0.9814 | 0.9815 |
| YOLOv8 X-Large | 0.9861 | 0.9859 | 0.9859 | 0.9860 |
| YOLOv11 Nano | 0.9790 | 0.9788 | 0.9788 | 0.9789 |
| YOLOv11 Small | 0.9829 | 0.9827 | 0.9827 | 0.9828 |
| YOLOv11 Medium | 0.9740 | 0.9737 | 0.9737 | 0.9739 |
| YOLOv11 Large | 0.9849 | 0.9846 | 0.9846 | 0.9848 |
| YOLOv11 X-Large | 0.9836 | 0.9833 | 0.9833 | 0.9835 |
Table 7.
Normalized confusion matrix for YOLOv8 X-Large model. Values represent row-normalized percentages, averaged across 5 independent train/validation splits.
Table 7.
Normalized confusion matrix for YOLOv8 X-Large model. Values represent row-normalized percentages, averaged across 5 independent train/validation splits.
| | | Predicted |
|---|
| | | Clear | Milky | Amber |
|---|
| Actual | clear | 99.4% | 0.3% | 0.3% |
| milky | 1.0% | 97.4% | 1.6% |
| amber | 0.0% | 0.6% | 99.4% |
Table 8.
Stigma instance segmentation performance (AP50) for Mask R-CNN and YOLO-based models.
Table 8.
Stigma instance segmentation performance (AP50) for Mask R-CNN and YOLO-based models.
| Model | AP50 (%) |
|---|
| Mask R-CNN Models |
| Mask R-CNN R50-C4 3× | 37.94 |
| Mask R-CNN R50-DC5 3× | 41.33 |
| Mask R-CNN R50-FPN 3× | 40.85 |
| Mask R-CNN R101-FPN 3× | 42.86 |
| Mask R-CNN X101-32 × 8d-FPN 3× | 36.93 |
| YOLO-based Models |
| YOLOv8 Small | 52.20 |
| YOLOv8 Medium | 47.47 |
| YOLOv11 Small | 45.14 |
| YOLOv11 Medium | 44.14 |
Table 9.
Optimal thresholds () and RMSE for single-feature harvest-day estimators, by target.
Table 9.
Optimal thresholds () and RMSE for single-feature harvest-day estimators, by target.
| | Total C | THC | CBD |
|---|
| Predictor Feature | | RMSE | | RMSE | | RMSE |
|---|
| Average Day | – | 3.56 | – | 4.02 | – | 3.56 |
| Orange stigmas | 0.40 | 4.54 | 0.40 | 4.42 | 0.36 | 3.40 |
| Milky Trichomes | 0.57 | 7.76 | 0.55 | 7.94 | 0.74 | 4.24 |
| Amber Trichomes | 0.04 | 8.68 | 0.05 | 7.42 | 0.03 | 10.28 |
Table 10.
Signed errors (days) between the stigma-based peak prediction and the laboratory-determined peak for each flower in Experiment 1.
Table 10.
Signed errors (days) between the stigma-based peak prediction and the laboratory-determined peak for each flower in Experiment 1.
| Variety | Plant 1 | Plant 2 | Plant 3 | Plant 4 | Plant 5 |
|---|
| 805-12 | 0 | −7 | 0 | 0 | −3 |
| 202 | 0 | 4 | 0 | −3 | 14 |
| 616 | −3 | 0 | 0 | −3 | 0 |
| 611 | 0 | 0 | 0 | −7 | −11 |
| 901-1 | 4 | 4 | 0 | 0 | 0 |
| 1416-3 | −11 | 0 | 0 | 0 | 0 |