Auto-Labeled Weed Detection and Species Classification
An HQ-SAM and EVA-CLIP labeling workflow generates weed boxes, species labels, and masks for lawn-care datasets and a compact YOLOv11n detector.

Tools & Skills
- Auto-Labeling
- HQ-SAM
- EVA-CLIP
- Weed Detection
- YOLOv11
- Instance Segmentation
- Vision-Language Models
- Image Processing
- My contribution
- HQ-SAM and EVA-CLIP annotation pipeline, species-label generation, and compact YOLOv11n detector training.
- Outcome
- Reusable weed annotations and a compact detector for the lawn-care robot.
Foundation models for lawn-care data
I built an offline annotation workflow to extract weed regions from unlabeled lawn imagery. HQ-SAM proposes and refines masks, while EVA-CLIP uses text prompts to classify the corresponding image regions. The project connects these richer annotations with a compact YOLOv11n weed detector for the robot.
The heavier annotation models run during dataset preparation. Species labeling is an offline branch; the compact detector does not need HQ-SAM or EVA-CLIP at runtime.
Propose, classify, and refine
- Generate candidate regions. Automatic HQ-SAM masks provide potential objects across the image.
- Clean the geometry. Contour filtering, merging of small regions, dilation, and bounding-box suppression reduce fragmented or overlapping candidates. The cleanup also excludes unsuitable border and oversized regions.
- Classify the crops. Coarse text prompts distinguish weed, grass, dry leaf, soil, and unknown regions.
- Refine and classify again. Candidate boxes prompt HQ-SAM for new masks. The corresponding regions are scored again before accepted weeds are exported.
The simpler entry point writes image-wise weed bounding boxes to JSON. Intermediate visualizations expose the masks and classification decisions so annotation quality can be reviewed before training.
Species labels and mask export
The extended workflow applies a second set of text prompts to accepted weed crops to assign fine-grained species labels. Selected boxes are passed through another mask-generation stage.
Its JSON output includes bounding boxes, species names, scores, and run-length-encoded masks. These fields support richer dataset inspection than a detection box alone. The prompt vocabulary includes an unknown category, and the configured scores are model outputs rather than verified species-identification accuracy.
Compact detection
The deployment side of the project uses a small YOLOv11n detector trained from task-specific annotations. Mask generation and species classification remain separate dataset-building capabilities; they should not be read as additional output heads of the deployed detector.
This separation lets the annotation workflow evolve without increasing the robot model’s inference cost. It also complements the grass-quality heatmap project, which estimates local lawn appearance rather than weed identity.
The linked demonstration shows the broader autonomous lawn-care robot in which this perception work was used.
Evidence & demonstration
Demos & project media

The weed-detection pipeline operating within the autonomous lawn-care robot.


