v2.5.0
Datasets ⭐
EXAMPLE CODE
PlantVillage Dataset
Load & visualize the PlantVillage dataset fast. Stream while training models in PyTorch & TensorFlow. PlantVillage is made of plant leaves & background images.
Visualization of PlantVillage Dataset on the Activeloop Platform

PlantVillage Dataset

What is PlantVillage Dataset?

The PlantVillage dataset is created to bring efficient solutions in order to detect 39 different plant diseases. It contains 61,486 images of plant leaves and backgrounds. It was created with six different augmentation techniques for creating more diverse datasets with different background conditions. The augmentations used in this process were scaling, rotation, noise injection, gamma correction, image flipping, and PCA color augmentation.

Downloading PlantVillage Dataset in Python

Instead of downloading the PlantVillage in Python, you can effortlessly load it in Python via our open-source package Hub with just one line of code.

Load PlantVillage Dataset without Augmentation Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/plantvillage-without-augmentation')
Copied!

Load PlantVillage Dataset with Augmentation Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/plantvillage-with-augmentation')
Copied!

PlantVillage Dataset Structure

Data Fields

  • images: tensor containing the image
  • labels: tensor containing labels of the corresponding image

How to use PlantVillage Dataset with PyTorch and TensorFlow in Python

Train a model on PlantVillage dataset with PyTorch in Python

Let's use Hub's built-in PyTorch one-line dataloader to connect the data to the compute:
1
dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
Copied!

Train a model on PlantVillage dataset with TensorFlow in Python

1
ds_tensorflow = ds.tensorflow()
Copied!

Additional Information about PlantVillage Dataset

PlantVillage Dataset Description

PlantVillage Dataset Contributors

Arun Pandian J, Geetharamani Gopal

PlantVillage Dataset Licensing Information

Creative Commons CCO 1.0

PlantVillage Dataset Citation Information

1
@article{hughes2015open,
2
title={An open access repository of images on plant health to enable the development of mobile disease diagnostics},
3
author={Hughes, David and Salath{\'e}, Marcel and others},
4
journal={arXiv preprint arXiv:1511.08060},
5
year={2015}
6
}
Copied!

PlantVillage Dataset FAQs

What is the PlantVillage dataset for Python?
The PlantVillage dataset contains 61 486 images of plant leaves and backgrounds. It was made with six augmentation techniques such as scaling, rotation, noise injection, gamma correction, image flipping, and PCA color augmentation. These augmentation techniques were applied to the dataset to create a diverse dataset with different background conditions.
What is the PlantVillage dataset used for?
The PlantVillage dataset may be used for plant disease detection. It can be used to detect the species of the plant and the potential disease that it might have.
What paper was PlantVillage dataset featured in?
The original PlantVillage dataset paper is An open access repository of images on plant health to enable the development of mobile disease diagnostics by Hughes & Salathe (2016). https://arxiv.org/abs/1511.08060
How to download the PlantVillage dataset in Python?
You can load the PlantVillage dataset with one line of code using the open-source package Activeloop Hub. See detailed instructions on how to load the PlantVillage dataset without an augmentation subset in Python or how to load the PlantVillage dataset with an augmentation subset in Python.
How can I use PlantVillage dataset in PyTorch or TensorFlow?
You can stream the PlantVillage dataset while training a model in PyTorch or TensorFlow with one line of code using the open-source package Activeloop Hub in Python. See detailed instructions on training a model on the PlantVillage dataset with PyTorch in Python or training a model on the PlantVillage dataset with TensorFlow in Python.