📄 IEEE SusTech 2026

XpressWeed: Meta-Inspired Few-Shot Adaptation for Plant Weed Segmentation Using Texture Priors

Kiran K. Kethineni, Rishi Raj Kanukuntla, Saraju P. Mohanty, Elias Kougianos

Department of Computer Science and Engineering & Electrical Engineering · University of North Texas, USA

85%
Validation Accuracy
+37pp
Gain over MAML baseline
80
Training Images
4
Unseen Weed Species
0.962
Micro AUPRC
12
Texture Pre-train Classes

1 Overview

XpressWeed is a texture-prior driven segmentation framework for weed identification in precision agriculture. It reframes the problem: instead of treating plant leaves as rigid objects, XpressWeed models them as textures — leveraging the fact that each species exhibits distinctive vein patterns, surface roughness, and micro-structures that remain stable under deformation, occlusion, and changing illumination.

A Fully Convolutional Network (FCN) is pre-trained on collages from 12 leaf texture classes, building robust and species-agnostic feature representations. A Model-Agnostic Meta-Learning (MAML) strategy then adapts this model to 4 completely unseen weed species using only 80 images — achieving 85% accuracy versus 48% for traditional MAML on the same data.

Feature landscape showing robustness from texture priors and adaptation with MAML
Fig. 1 — Feature landscapes showing how texture priors create well-separated class regions (left), how MAML alone struggles with new data points (top-right), and how XpressWeed efficiently discriminates unseen classes by combining both (bottom-right).

2 The Problem

Weeds compete with primary crops for nutrients, water, and sunlight — causing significant yield loss worldwide. While deep learning has been applied to weed segmentation, two fundamental obstacles remain unsolved:

Challenge: Scale

  • Weed species vary across regions and seasons
  • One large model for all species is impractical
  • Requires exhaustive labeled datasets
  • Computationally infeasible to retrain per region

Challenge: Variation

  • Leaves overlap, twist, and change orientation
  • Lighting shifts color hues dramatically
  • Object-centric CNNs rely on shape — which fails
  • Few-shot methods can't capture this variation

XpressWeed: Texture Priors

  • Leaf textures are stable under deformations
  • Vein patterns invariant to shape changes
  • Pre-training on textures → species-agnostic filters
  • No shape-based assumptions needed

XpressWeed: MAML Adaptation

  • Texture priors = strong initialization for MAML
  • Adapt to new species in 80 images
  • N-way episodic training = implicit contrastive learning
  • No expensive full-pipeline meta-training
💡
Key insight: Unlike color or shape, leaf textures — vein distributions, surface roughness, micro-structure repetition — are comparatively stable under the shape deformations, partial occlusions, and illumination variations pervasive in real farmland. This shift from objects to textures is the foundation of XpressWeed.

3 Proposed Method

XpressWeed combines supervised texture pre-training with MAML-based few-shot adaptation. The two-stage design separates large-scale representation learning from lightweight few-shot adaptation, achieving both robustness and computational efficiency.

XpressWeed two-stage pipeline workflow
Fig. 2 — Workflow of the XpressWeed framework: supervised learning builds robust texture priors, followed by MAML inner/outer loop adaptation to new weed species.

Pipeline Overview

PlantVillage
12 species
Texture Collages
Overlap simulation
FCN Pre-training
Supervised + WCE
Texture Priors
Robust initialization
MAML Inner Loop
Support set update
MAML Outer Loop
Query meta-update
Adapted Model
4 unseen weeds

Stage 1 — Supervised Texture Pre-training

The FCN is trained on texture-prior images constructed from PlantVillage leaf patches arranged into collages. Overlapping leaves and background-removed variants simulate real farmland conditions where boundaries are difficult to separate. Weighted cross-entropy loss handles severe class imbalance. Meta-learning is deliberately not used at this stage — it would require expensive second-order differentiation over thousands of images.

Stage 2 — MAML-Based Adaptation

After pre-training, MAML adapts the model to 4 unseen weed species with only 80 labeled patches. Each episode uses 3-way classification, 12 support samples per class (inner loop update), and 10 query samples per class (outer loop meta-update). The n-way episodic setup implicitly mimics contrastive learning — same-class embeddings cluster together while different classes are pushed apart — without explicit contrastive losses.

4 Network Architecture

The backbone is an encoder–decoder design inspired by U-Net, modified to emphasize texture discrimination and multi-scale feature fusion. It is intentionally lightweight — MAML's second-order gradient updates require smaller models to converge efficiently.

Encoder

Progressively downsamples input (512×768×3) through stacked conv blocks to a compact bottleneck (8×12×512). Captures high-level texture features stable under deformation and lighting changes. Skip connections preserve feature maps at each scale.

Decoder

Upsampled feature maps are concatenated with saved encoder maps at matching scales — multi-scale fusion provides both global texture context and fine-grained leaf-edge/venation details. Boundary refinement is achieved implicitly through feature fusion, not expensive deconvolution.

Output Head

A pointwise (1×1) convolution produces dense per-pixel segmentation masks, informed by features across all scales.

Key Design Choices
  • Separable convolutions — reduce parameter count for faster MAML updates
  • Skip connections — fuse global texture + fine-grained edges/venation
  • Feature fusion — not transposed conv; simpler and effective
  • Lightweight bottleneck — 8×12×512 compresses to essential texture features
  • Weighted CE loss — handles severe weed/crop pixel imbalance
XpressWeed CNN architecture diagram
Fig. 3 — Architecture of the proposed CNN model. Input: 512×768×3 → Bottleneck: 8×12×512 → Output: 512×768×N_classes. Scroll to see full architecture.

5 Stage 1: Pre-training Results

The FCN was trained on a PlantVillage-derived dataset of 12 leaf texture classes arranged into collages. The design intentionally introduces challenging conditions — overlapping leaves, background-removed variants, and mixed textures — to simulate real farmland boundaries.

Dataset used for supervised texture pre-training
Fig. 4 — Dataset for supervised texture pre-training: leaf collages from 12 PlantVillage species with overlapping leaves and sharp boundaries.

Pre-training Metrics

Training Accuracy96%
Validation Accuracy92%
Mean IoU92%
mAP@[0.50:0.95]0.90
All 12 texture classes achieve AP ≈ 0.99, confirming the model learns strong, discriminative texture representations before adaptation.
PR curves of the supervised FCN model
Fig. 5 — Per-class Precision–Recall curves for the supervised pre-training model. All 12 classes show AP ≈ 0.99, confirming strong discrimination.
FCN mean average precision
Fig. 5b — Mean Average Precision across IoU thresholds [0.50:0.95] = 0.90.

6 Stage 2: MAML Adaptation Results

The pre-trained model is adapted to 4 unseen weed species using a real Indian farmland dataset. 20 high-resolution (2112×1600) images were cropped into 80 patches (512×768) for MAML training. The task is 3-way classification, 12-shot, over 25 epochs.

Farmland dataset used for MAML adaptation
Fig. 6 — Sample images and pixel-level masks from the farmland dataset. 6 classes: background, soybean (crop), + 4 unseen weed species.
Pixel-wise class distribution in MAML dataset
Fig. 7 — Pixel-wise class distribution in the MAML adaptation dataset — highly imbalanced, mirroring real farmland conditions.

XpressWeed vs. Traditional MAML

Accuracy

XpressWeed (Texture + MAML)85%
Traditional MAML (baseline)48%

Same network · Same 80 images · Different initialization

Mean IoU

XpressWeed66%
Traditional MAML32%

Train set: 92% acc / 72% mIoU  |  Val set: 85% acc / 66% mIoU

Training results: image, ground truth, prediction
Fig. 8 — Training set results: input image · ground truth mask · model prediction. Strong segmentation of soybean (crop) and weed species.
Validation results of the MAML-adapted model
Fig. 9 — Held-out validation results: the adapted model generalises to unseen farmland images with 85% accuracy.

Per-Class Average Precision

Background
0.997
Soybean (Crop)
0.981
Lavhala
0.775
Obscure Morning Glory
0.761
Kena
0.697
Lamber ★ fewest pixels
0.487
Summary MetricValue
Macro mAP0.783
Micro AUPRC0.962
PR curves of the MAML-adapted model
Fig. 10 — Per-class Precision–Recall curves for the MAML-adapted model. Macro mAP = 0.783, Micro AUPRC = 0.962. Background and crop (seen species) near-perfect; Lamber (fewest annotated pixels) is the weakest weed class.
⚠️
Limitation — extreme class imbalance: Lamber (AP = 0.487) has very few annotated pixels. A minimum support set is needed for reliable adaptation of underrepresented classes. The class distribution (Fig. 7) shows how severely imbalanced the real farmland dataset is.

7 Comparison with Related Work

MethodYearApproachLimitation vs XpressWeed
Syed & Suganthi2023Fuzzy active contourNo deep features; poor scalability
Naik / Hu et al.2024/22U-Net / U-Net++Static; requires large labeled datasets
Li et al.2023PSPNetStatic; cannot adapt to new classes
Shorewala et al.2021Semi-supervised ResNet-SVMBinary classification only
Amac et al.2021Self-supervised MAMLDepends on saliency mask quality
Cao et al.2019FCN + Meta-SegFails on plant image variability
Logeshwaran et al.2024Meta-stackingComputationally heavy full-pipeline meta-learning
XpressWeed (Ours)2026Texture pre-training + MAML85% acc · 80 images · 4 unseen species · resource-efficient
🏆
Key advantage: XpressWeed is the only method that combines (1) texture-based pre-training for robustness, (2) MAML only at adaptation (not full pipeline), and (3) real farmland evaluation on unseen weed species with only 80 images. The 37 percentage-point accuracy gain over traditional MAML demonstrates the value of texture priors as initialization for few-shot adaptation.

8 Code & Repository

Class Color Mapping

maml.py — color2class
# RGB mask colors → integer class IDs (farmland adaptation dataset)
color2class = {
    (0,   0,   0):   0,   # Background
    (61,  61,  245): 1,   # Plant data (Soybean — seen in pre-training)
    (28,  101, 232): 2,   # Kena        (unseen weed)
    (255, 53,  94):  3,   # Lavhala     (unseen weed)
    (255, 106, 77):  4,   # Lamber      (unseen weed — fewest pixels)
    (238, 164, 15):  5,   # Obscure Morning Glory (unseen weed)
}

MAML Episode Structure

MAML.ipynb — episode construction
# Episode configuration
N_WAY       = 3      # classes per episode
K_SUPPORT   = 12     # support samples per class (inner loop)
K_QUERY     = 10     # query  samples per class (outer loop)
N_EPOCHS    = 25

for epoch in range(N_EPOCHS):
    for episode in sample_episodes():
        support_x, support_y = episode['support']   # (36, 512, 768, 3)
        query_x,   query_y   = episode['query']     # (30, 512, 768, 3)

        # Inner loop: fast adaptation on support set
        fast_weights = inner_loop_update(model, support_x, support_y)

        # Outer loop: meta-gradient update on query set
        meta_loss = compute_loss(fast_weights, query_x, query_y)
        meta_update(model, meta_loss)

Data Augmentation

maml.py — augment_images_and_masks()
# Augmentations applied consistently to both images AND masks:
#  1. Random horizontal flip           (p = 0.5)
#  2. Random zoom  0.9× – 1.1×         → crop-centre or reflect-pad
#  3. Random shadow / highlight (RSH)  (p = 0.85, triangular regions)
#  4. Color jitter                     → hue, saturation, brightness
#  5. Gaussian blur                    → simulates out-of-focus leaves
#  6. Gaussian noise                   → simulates sensor noise

aug_imgs, aug_masks = augment_images_and_masks(
    images_batch, masks_batch,
    target_size=(512, 768),
    rsh_prob=0.85
)

9 Citation

If you use XpressWeed in your research, please cite:

BibTeX
@inproceedings{kethineni2026xpressweed,
  title     = {XpressWeed: Meta-Inspired Few-Shot Adaptation for
               Plant Weed Segmentation Using Texture Priors},
  author    = {Kethineni, Kiran K. and Kanukuntla, Rishi Raj and
               Mohanty, Saraju P. and Kougianos, Elias},
  booktitle = {Proceedings of the IEEE SusTech 2026},
  year      = {2026},
  institution = {University of North Texas}
}

Related Work from Our Group