Datasets:

Modalities:
Image
Text
Languages:
English
DOI:
Libraries:
Datasets
License:
kdoherty commited on
Commit
cf12b0d
·
verified ·
1 Parent(s): 794ccae

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +28 -1
README.md CHANGED
@@ -41,4 +41,31 @@ configs:
41
  ---
42
  # Background
43
 
44
- Leafy spurge dataset is a collection of top-down aerial images of grasslands in western Montana, USA. A drone surveyed a 150 hectare study area from 50m above the ground surface and the images it accquired were assembled into a contiguous orthomosaic using Drone Deploy software. Many scenes in the study area contain a weed plant, leafy spurge (*Euphorbia esula*). Botanists visited 1000 sites in the study area and gathered ground truth labels of leafy spurge presence/absence within 0.5 x 0.5 m plots. The position of these plots was referenced within the orthomosaic and these areas were cropped from the larger image. The resulting processed data are 1024 x 1024 pixel .tif files, though note the labelled areas correspond to the 39 x 39 pixel square (half-meter side length) found at the center of these crops. We include the context around the ground truth areas for experimental purposes.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  ---
42
  # Background
43
 
44
+ Leafy Spurge Dataset is a collection of top-down aerial images of grasslands in western Montana, USA. A drone surveyed a 150 hectare study area from 50m above the ground surface and the images it accquired were assembled into a contiguous orthomosaic using Drone Deploy software. Many scenes in the study area contain a weed plant, leafy spurge (*Euphorbia esula*). Botanists visited 1000 sites in the study area and gathered ground truth labels of leafy spurge presence/absence within 0.5 x 0.5 m plots. The position of these plots was referenced within the orthomosaic and these areas were cropped from the larger image. The resulting processed data are 1024 x 1024 pixel .tif files, though note the labelled areas correspond to the 39 x 39 pixel square (half-meter side length) found at the center of these crops. We include the context around the ground truth areas for experimental purposes. Our primary objective in serving these data is to invite the research community to develop effective early warning systems of spurge invasion at the highest spatial resolution possible.
45
+
46
+ # Data loading and pre-processing
47
+
48
+ As a Hugging Face dataset, you may load Leafy Spurge training set as follows:
49
+ ```python
50
+ from datasets import load_dataset
51
+
52
+ ds = load_dataset('mpg-ranch/leafy_spurge', 'labelled', split='train')
53
+ ds['image'][100]
54
+ ```
55
+
56
+ We will now center crop the image to the size of the ground truth:
57
+
58
+ ```python
59
+ from torchvision.transforms import CenterCrop, Compose
60
+
61
+ ground_truth_sz = 39
62
+
63
+ ccrop = Compose([CenterCrop(ground_truth_sz)])
64
+
65
+ def preproc_transforms(examples):
66
+ examples["pixel_values"] = [ccrop(image.convert("RGB")) for image in examples["image"]]
67
+ return examples
68
+
69
+ ds = ds.map(preprocess, batched=True)
70
+ ds['pixel_values'][100]
71
+ ```