Sovereign 8s.is mirror of standardgalactic/sugarcane-weed-detection
  • Jupyter Notebook 85.6%
  • Python 14.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-02-27 16:54:45 -03:00
classification first commit 2025-12-05 19:57:04 -05:00
detection first commit 2025-12-05 19:57:04 -05:00
segmentation Add scripts for segmentation metric evaluation 2026-02-27 16:54:45 -03:00
utils first commit 2025-12-05 19:57:04 -05:00
.gitignore first commit 2025-12-05 19:57:04 -05:00
README.MD first commit 2025-12-05 19:57:04 -05:00

Weed Detection in Perennial Crops

This repository contains the implementation of various deep learning models for weed detection in perennial fields, specifically sugarcane crops. The project explores three key computer vision tasks:

  1. Classification: Identifying whether an image contains weeds or not
  2. Detection: Localizing and detecting weed instances in field images
  3. Segmentation: Creating pixel-level masks of weed regions

Repository Structure

.
├── classification/
│   ├── um-mae/         # Code adapted from UM-MAE repository
│   └── mmpretrain/     # Implementation using MMPretrain framework
├── detection/
│   └── mmdetection/    # Implementation using MMDetection framework
├── segmentation/       # Implementations and results for segmentation
│   └── S2C_agri/       # Weakly supervised segmentation based on S2C
└── utils/              # Helper scripts and miscellaneous utilities

Key Features

  • Multiple CNN and Transformer architectures evaluated for classification
  • Novel detection approaches incorporating feature fusion techniques
  • Multiple segmentation methods including bounding-box guided and weakly supervised approaches
  • Preprocessing techniques including CLAHE and ExGR for improved performance

Installation and Setup

Classification

For the UM-MAE implementation:

git clone https://github.com/implus/UM-MAE/
# Replace modified files from this repository's classification/um-mae/ folder

For MMPretrain implementation: https://github.com/open-mmlab/mmpretrain/

Detection

For MMDetection implementation: https://github.com/open-mmlab/mmdetection/

Weakly Supervised Segmentation

Our weakly supervised approach is based on the S2C framework. The code, adapted for our agricultural dataset, is located in the segmentation/S2C_agri/ folder. For the original implementation, please refer to the S2C GitHub repository.

Results Overview

Our comprehensive evaluation demonstrates state-of-the-art performance in weed detection tasks:

  • Classification: Achieved 99.06% accuracy using SwinViT-B with MAE pretraining
  • Detection: Reached 44.2 AP50 with RTMDeT + CIoU Loss using ConvNeXt backbone
  • Segmentation: Qualitatively evaluated SAM, EXGR-enhanced Otsu thresholding, and weakly supervised (S2C) approaches

Citation

If you use this code or models in your research, please cite our work:

[Citation information to be added]