cropandweeddetection

Using YOLOv7 for crop and weed detection

https://github.com/daraan/cropandweeddetection

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary

Keywords

agriculture computer-vision crop-detection object-detection pytorch weed-detection yolo yolov7
Last synced: 6 months ago · JSON representation

Repository

Using YOLOv7 for crop and weed detection

Basic Info
Statistics
  • Stars: 12
  • Watchers: 1
  • Forks: 3
  • Open Issues: 1
  • Releases: 2
Topics
agriculture computer-vision crop-detection object-detection pytorch weed-detection yolo yolov7
Created almost 3 years ago · Last pushed 11 months ago
Metadata Files
Readme License Citation

README.md

Using YOLOv7 for crop and weed detection

Used dataset: The Crop and Weed dataset

Used YOLOv7 version: https://github.com/Chris-hughes10/Yolov7-training/issues

Installation

Clone the repository

You can download the source code including the models from the latest release.

```sh

This prevents downloading the large model files;

optional, skip this line to include them

export GITLFSSKIP_SMUDGE=1

Clone the repository and the two submodules

git clone --recurse-submodules https://github.com/Daraan/CropAndWeedDetection.git ```

If you forgot the --recurse-submodules you can still download the submodules with:

```sh

cd CropAndWeedDetection

git submodule init git submodule update ```

Note: The currently linked Yolov7 variant is not compatible with half precision training. It is possible, however, I probably cannot assist you in this matter anymore.


Create a virtual environment

Choose a python version and set a location for the environment

sh python3.9 -m venv env source env/bin/activate

Optional: Assure there is a pip in the environment. On my HPC-cluster this was wrong in some cases.

sh python3.9 -m pip install -U pip --no-cache-dir --force-reinstall

Requirements

IMPORANT for WINDOWS users : Do not install the cropandweed-dataset and Yolov7-training via pip, use the cloned repositories provided through the submodule.

You can install the module with pip install -e cropandweed-dataset/ from the provided submodule which points to my fork.

PyTorch-Accelerated: is integrated into the YOLOv7 code but not directly used. It is not so well maintained and might downgrade you to a PyTorch version < 2, this installation command prevents the downgrade:

sh pip install pytorch-accelerated==0.1.40 --no-dependencies


Requirements (minimal):

The code was written with Python 3.9.

The CLI requirements where created by pipreqs and tested the last time this in April 2024.

sh pip install -r requirements_CLI.txt

For the notebook or if you encounter problems you can try with a more restrictive installation, acquired through pip freeze:

sh pip install -r requirements_complete.txt

Optional: not needed for this notebook, but optionally for supplementary code. There might be CUDA path problems therefore not putting it into requirements

sh pip install deepspeed

Light version

For the .py files a lighter version

sh pip install -r pipreqs_requirements.txt

Todos

  • Create fork for half precision support of Yolov7 (#wontfix)

Owner

  • Login: Daraan
  • Kind: user

GitHub Events

Total
  • Issues event: 3
  • Watch event: 9
  • Issue comment event: 2
  • Push event: 4
  • Fork event: 1
Last Year
  • Issues event: 3
  • Watch event: 9
  • Issue comment event: 2
  • Push event: 4
  • Fork event: 1