GithubHelp home page GithubHelp logo

cropandweed / cropandweed-dataset Goto Github PK

View Code? Open in Web Editor NEW
64.0 4.0 16.0 7.87 MB

Information and scripts for the CropAndWeed Dataset

License: Other

Python 100.00%
agriculture dataset detection crop weed classification segmentation farming phenotyping plants

cropandweed-dataset's Introduction

The CropAndWeed Dataset

cnw_species_overview.png This repository provides utility scripts for the CropAndWeed dataset, a large-scale dataset for Precision Agriculture, consisting of highly variable real-world images and multi-modal annotations for a rich set of crop and weed categories. A thorough description can be found in the corresponding paper and supplementary material published at WACV 2023.

Annotation Format

The annotations consist of multiple directories for each dataset variant in the following formats:

  • bboxes contains csv-files for each image with object instances defined as: Left, Top, Right, Bottom, Label ID, Stem X, Stem Y
  • labelIds contains semantic masks for each image
  • params contains the following additional parameters for each image:
    • moisture: 0 (dry), 1 (medium) or 2 (wet)
    • soil: 0 (fine), 1 (medium) or 2 (coarse)
    • lighting: 0 (sunny) or 1 (diffuse)
    • separability: 0 (easy), 1 (medium), 2 (hard)

The corresponding label IDs for each datset variant are specified in datasets.py. The names of all image and annotation files are prefixed either with ave or vwg refering to the Application and Experimental Sets, respectively, as described in the paper. The following 4-digit numbers specify the recording session, while the last 4 digits are the image id.

Setup

Run setup.py to download and extract all dataset images and annotations. By default, the script creates mapped annotations for all pre-defined dataset variants.

Dataset Variants

To create a specific dataset variant, use map_dataset.py to map the label IDs of one label specification to another. For instance, the command map_dataset.py --dataset_target CropsOrWeed9 will create new directories for bboxes and labelIds with annotations mapped to the predefined variant CropsOrWeed9. Custom dataset variants can be added to datasets.py and used analogously.

Bounding boxes are created as two distinct sets for training and evaluation purposes with the latter including a fallback Vegetation class containing tiny instances as well as excluded and ambiguous species. Mapped semantic masks include an additional background class and are only stored if they contain any mapped species.

Visualization

Use visualize_annotations.py to create a combined visualization for bounding boxes, stem positions and semantic masks for each annotated image. The dataset variant to be visualized and a filter for included images can be specified as parameters. For instance the command visualize_annotations.py --dataset CropsOrWeed9 --filter vwg-0328 will create visualizations for all images of the CropsOrWeed9 variant containing the relevant classes and matching the recording session vwg-0328. Bounding boxes and masks use the defined colors for each label from datasets.py, the fallback Vegetation class is included in black color. The assigned colors and numbers of occurences for each class are provided below each image.

cnw_sample.png

Licence

The CropAndWeed dataset is released to academic and non-academic entities for non-commercial purposes such as academic research, teaching, scientific publications or personal experimentation (LICENCE).

Citing

If you use the CropAndWeed dataset for your research, please use the following BibTeX entry:

@InProceedings{Steininger_2023_WACV,
    author    = {Steininger, Daniel and Trondl, Andreas and Croonen, Gerardus and Simon, Julia and Widhalm, Verena},
    title     = {The CropAndWeed Dataset: A Multi-Modal Learning Approach for Efficient Crop and Weed Manipulation},
    booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
    month     = {January},
    year      = {2023},
    pages     = {3729-3738}
}

cropandweed-dataset's People

Contributors

steiningerd avatar widhalmv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cropandweed-dataset's Issues

Corrupted Images

Hello,

It seems as though some images are corrupted and have annotations in these problematic regions.
ex: ave-0357-0008.jpg (gray band bottom of image which is displayed below)

Here are some other images which experience similar problems:

  • ave-0506-0007.jpg
  • ave-0527-0009.jpg

It seems like there are quite a few images that have these problems. Is there an updated version or is this to be expected?

ave-0357-0008

while running setup.py, the downloading of dataset is always stuck to the 20%

Hi, i am interested in the area of weed and crop detection. And i found your work very practical and interesting. I want to get access to the CropandWeed dataset. Following the specification, i run the setup.py. But everytime the downloading is stuck to the 20%. The message shown on the console is described as below:

downloading and extracting files: 20%|██ | 1/5 [00:26<01:44, 26.12s/it]

Is that caused by the pool HTTP connection?

Open to having the dataset hosted on Hugging Face Hub?

Hi, I've been looking at vetting and uploaded some interesting image datasets to the Hub for experimentation with timm and other image classification / object detection / segmentation ML frameworks.

Your license states that redistribution is not allowed. I was wondering if you'd reconsider the the repository was behind a gated sign-up with prominent display of license terms and restrictions (requiring acknowledgement with a valid account to access).

See this recent instance of objectnet I uploaded, they have some unique requests associated with their dataset. https://huggingface.co/datasets/timm/objectnet

no access to the dataset

Dear colleagues, we would really like to download your dataset for our educational purposes, but we cannot do this, since the link provided in your dataset downloader (setup.py) is not working (there is no access). Please tell me how we can download your dataset?

could you help me about the issue?

I saw that you used Yolo to test your dataset. when I downloaded your dataset, I found its label format is CSV, I thought it was not supported by yolov5. I tried to calculate these numbers in the label file to convert them to ". txt", but I failed. could you give me some advice about it?

thank you so much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.