Dockweed (Rumex spp.) Detection β€” YOLO26

Two YOLO26 models for detecting dockweed (Rumex obtusifolius) in RGB images: an object-detection model producing bounding boxes, and an instance-segmentation model producing pixel-level masks. Both are intended for precision-agriculture use cases such as weed mapping, spot-spraying, and robotic/mechanical weeding.

Model summary

Model file Task Output Base checkpoint
Rumexv8.pt Object detection Bounding boxes yolo26m.pt (YOLO26-medium)
Rumexv8-seg.pt Instance segmentation Bounding boxes + pixel masks yolo26m-seg.pt (YOLO26-medium)

Despite the "v8" in the file names, both models are fine-tuned from Ultralytics YOLO26 (medium size) checkpoints, not YOLOv8.

Intended use

  • Detecting/segmenting dockweed (Rumex obtusifolius) plants in field or grassland imagery for precision agriculture, weed monitoring, and automated weeding systems.
  • Both models were trained only on Rumex obtusifolius. They have not been validated on Rumex crispus (curled dock) or other dock/Rumex species, and may not generalize well to them.
  • Not intended for use outside agricultural weed-detection contexts, and not validated for safety-critical or regulatory decision-making.

Training data

  • Own dataset: 250 images collected and manually annotated by the model author.
  • Public dataset: additional images of Rumex obtusifolius (only this species, Rumex crispus excluded) drawn from a public online source.
  • A subset of the combined dataset is published at JacobsFarmextra/Dockweed on Hugging Face.
  • Split: 2,610 images in the training set, 871 images in the validation set (same dataset.yaml used for both models).

See training_log.txt for the original dataset-preparation log.

Training procedure

Both models were fine-tuned from their respective YOLO26-medium checkpoints using Ultralytics with identical hyperparameters and augmentation settings, image size 640, for up to 100 epochs with early stopping (patience 20).

Setting Value
Base checkpoint yolo26m-seg.pt (seg) / yolo26m.pt (det)
Image size 640
Batch size 8
Epochs 100 (max)
Patience (early stopping) 20
Checkpoint save period every 20 epochs
Device single GPU (device=0)
Dataloader workers 0
Augmentation enabled
Rotation (degrees) 10Β°
Translation (translate) 0.1 (10%)
Scale (scale) 0.5 (0.5–1.5Γ—)
Horizontal flip (fliplr) 0.5 (50% chance)
HSV hue (hsv_h) 0.015
HSV saturation (hsv_s) 0.7
HSV value/brightness (hsv_v) 0.4
Mosaic (mosaic) 1.0

Full training scripts are included in this repository:

  • train_seg.py β€” used to train Rumexv8-seg.pt (this is the original script used, with the local file path anonymized).
  • train_det.py β€” used to train Rumexv8.pt (reconstructed from train_seg.py: identical settings, using the non-segmentation yolo26m.pt base checkpoint).
from ultralytics import YOLO

model = YOLO("yolo26m-seg.pt")  # or "yolo26m.pt" for the detection model

model.train(
    data="dataset.yaml",
    imgsz=640,
    batch=8,
    epochs=100,
    patience=20,
    save_period=20,
    workers=0,
    device=0,
    augment=True,
    degrees=10,
    translate=0.1,
    scale=0.5,
    fliplr=0.5,
    hsv_h=0.015,
    hsv_s=0.7,
    hsv_v=0.4,
    mosaic=1.0,
)

How to use

Requires ultralytics:

pip install ultralytics

Object detection (bounding boxes):

from ultralytics import YOLO

model = YOLO("Rumexv8.pt")
results = model.predict("image.jpg")
results[0].show()

Instance segmentation (masks + boxes):

from ultralytics import YOLO

model = YOLO("Rumexv8-seg.pt")
results = model.predict("image.jpg")
results[0].show()

Limitations

  • Trained on Rumex obtusifolius only β€” accuracy on Rumex crispus or other look-alike species is unknown and likely lower.
  • The own-collected portion of the dataset (250 images) is relatively small; performance may vary with lighting, growth stage, background vegetation, and camera/sensor characteristics not well represented in training.
  • No formal held-out test-set metrics (precision/recall/mAP) are published with this card; users should validate on their own data before deployment.
  • Not evaluated for fairness/bias beyond species coverage, and not intended for any use outside weed detection in agricultural imagery.

License

Released under AGPL-3.0, consistent with the Ultralytics YOLO license terms. See the Ultralytics licensing page for details on AGPL-3.0 vs. Enterprise licensing options.

Citation

If you use these models, please cite Ultralytics YOLO:

@software{yolo26_ultralytics,
  author = {Ultralytics},
  title  = {Ultralytics YOLO26},
  url    = {https://github.com/ultralytics/ultralytics}
}

And, if used, the accompanying dataset:

JacobsFarmextra/Dockweed, https://huggingface.co/datasets/JacobsFarmextra/Dockweed
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train JacobsFarmextra/Dockweed