Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,6 +9,60 @@ tags:
|
|
| 9 |
- drone imagery
|
| 10 |
- agriculture
|
| 11 |
- in the wild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
# Wild Berry image dataset collected in Finnish forests and peatlands using drones
|
| 14 |
|
|
@@ -27,31 +81,36 @@ bounding boxes.
|
|
| 27 |
## How to use: an example of visualization
|
| 28 |
```python
|
| 29 |
import json
|
|
|
|
| 30 |
import numpy as np
|
| 31 |
from datasets import load_dataset
|
| 32 |
from PIL import Image, ImageDraw
|
|
|
|
| 33 |
# Color map for classes
|
| 34 |
classes_color_map = {
|
| 35 |
0: (225,15,10),
|
| 36 |
1: (40, 150, 210),
|
| 37 |
-
2: (10,0,210),
|
| 38 |
-
3: (130,5,125),
|
| 39 |
}
|
|
|
|
| 40 |
# Load the dataset
|
| 41 |
dataset = load_dataset("FBK-TeV/WildBe", split="validation")
|
| 42 |
-
|
| 43 |
-
image_bytes = dataset[
|
| 44 |
np_image = np.frombuffer(image_bytes, dtype=np.uint8)
|
| 45 |
-
np_image = np_image.reshape(dataset[
|
|
|
|
| 46 |
image = Image.fromarray(np_image)
|
| 47 |
-
labels = json.loads(dataset[
|
|
|
|
| 48 |
draw = ImageDraw.Draw(image)
|
| 49 |
-
|
| 50 |
for label in labels:
|
| 51 |
-
center_x = label["x"] * dataset[
|
| 52 |
-
center_y = label["y"] * dataset[
|
| 53 |
-
width = label["width"] * dataset[
|
| 54 |
-
height = label["height"] * dataset[
|
| 55 |
draw.rectangle(
|
| 56 |
[
|
| 57 |
(center_x - width / 2, center_y - height / 2),
|
|
@@ -60,6 +119,7 @@ for label in labels:
|
|
| 60 |
outline=classes_color_map[label["class"]],
|
| 61 |
width=2,
|
| 62 |
)
|
|
|
|
| 63 |
image.show()
|
| 64 |
```
|
| 65 |

|
|
|
|
| 9 |
- drone imagery
|
| 10 |
- agriculture
|
| 11 |
- in the wild
|
| 12 |
+
dataset_info:
|
| 13 |
+
features:
|
| 14 |
+
- name: index
|
| 15 |
+
dtype: int64
|
| 16 |
+
- name: image
|
| 17 |
+
dtype: image
|
| 18 |
+
- name: width
|
| 19 |
+
dtype: int64
|
| 20 |
+
- name: height
|
| 21 |
+
dtype: int64
|
| 22 |
+
- name: split
|
| 23 |
+
dtype: str
|
| 24 |
+
- name: altitude
|
| 25 |
+
dtype: float64
|
| 26 |
+
- name: aperture
|
| 27 |
+
dtype: float64
|
| 28 |
+
- name: area
|
| 29 |
+
dtype: float64
|
| 30 |
+
- name: date
|
| 31 |
+
dtype: str
|
| 32 |
+
- name: device
|
| 33 |
+
dtype: str
|
| 34 |
+
- name: exposure
|
| 35 |
+
dtype: float64
|
| 36 |
+
- name: focal
|
| 37 |
+
dtype: float64
|
| 38 |
+
- name: iso
|
| 39 |
+
dtype: float64
|
| 40 |
+
- name: latitude_deg
|
| 41 |
+
dtype: float64
|
| 42 |
+
- name: latitude_dir
|
| 43 |
+
dtype: str
|
| 44 |
+
- name: longitude_deg
|
| 45 |
+
dtype: float64
|
| 46 |
+
- name: longitude_dir
|
| 47 |
+
dtype: str
|
| 48 |
+
- name: source_image_id
|
| 49 |
+
dtype: str
|
| 50 |
+
- name: time
|
| 51 |
+
dtype: str
|
| 52 |
+
- name: labels
|
| 53 |
+
sequence:
|
| 54 |
+
- name: class
|
| 55 |
+
dtype: int64
|
| 56 |
+
- name: label
|
| 57 |
+
dtype: int64
|
| 58 |
+
- name: x
|
| 59 |
+
dtype: float32
|
| 60 |
+
- name: y
|
| 61 |
+
dtype: float32
|
| 62 |
+
- name: width
|
| 63 |
+
dtype: float32
|
| 64 |
+
- name: height
|
| 65 |
+
dtype: float32
|
| 66 |
---
|
| 67 |
# Wild Berry image dataset collected in Finnish forests and peatlands using drones
|
| 68 |
|
|
|
|
| 81 |
## How to use: an example of visualization
|
| 82 |
```python
|
| 83 |
import json
|
| 84 |
+
|
| 85 |
import numpy as np
|
| 86 |
from datasets import load_dataset
|
| 87 |
from PIL import Image, ImageDraw
|
| 88 |
+
|
| 89 |
# Color map for classes
|
| 90 |
classes_color_map = {
|
| 91 |
0: (225,15,10),
|
| 92 |
1: (40, 150, 210),
|
| 93 |
+
2: (10,0,210) ,
|
| 94 |
+
3: (130,5,125) ,
|
| 95 |
}
|
| 96 |
+
|
| 97 |
# Load the dataset
|
| 98 |
dataset = load_dataset("FBK-TeV/WildBe", split="validation")
|
| 99 |
+
|
| 100 |
+
image_bytes = dataset[50]["image"]["bytes"]
|
| 101 |
np_image = np.frombuffer(image_bytes, dtype=np.uint8)
|
| 102 |
+
np_image = np_image.reshape(dataset[50]["height"], dataset[50]["width"], 3)
|
| 103 |
+
|
| 104 |
image = Image.fromarray(np_image)
|
| 105 |
+
labels = json.loads(dataset[50]["labels"])
|
| 106 |
+
|
| 107 |
draw = ImageDraw.Draw(image)
|
| 108 |
+
|
| 109 |
for label in labels:
|
| 110 |
+
center_x = label["x"] * dataset[50]["width"]
|
| 111 |
+
center_y = label["y"] * dataset[50]["height"]
|
| 112 |
+
width = label["width"] * dataset[50]["width"]
|
| 113 |
+
height = label["height"] * dataset[50]["height"]
|
| 114 |
draw.rectangle(
|
| 115 |
[
|
| 116 |
(center_x - width / 2, center_y - height / 2),
|
|
|
|
| 119 |
outline=classes_color_map[label["class"]],
|
| 120 |
width=2,
|
| 121 |
)
|
| 122 |
+
|
| 123 |
image.show()
|
| 124 |
```
|
| 125 |

|