File size: 5,385 Bytes
7e14cfc
 
 
 
 
 
 
 
 
 
 
 
43a220f
0755ae5
0c4ba67
0755ae5
c7ef01c
7e14cfc
 
 
 
 
 
 
 
 
 
 
4a3cff8
 
 
 
 
 
 
 
 
 
7e14cfc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d07611
7e14cfc
9a30834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
license: cc-by-4.0
task_categories:
- image-classification
tags:
- biology
- climate
- ecology
- species
pretty_name: AquaMonitor
size_categories:
- 1M<n<10M
configs:
- config_name: images
  data_files: "images/*"
- config_name: metadata
  data_files: "aquamonitor.parquet"
---

# Dataset Card for AquaMonitor

## Dataset Details

### Dataset Description

AquaMonitor is a large, multi-modal multi-view image sequence dataset of aquatic invertebrates, collected during two years of operational environmental monitoring. It allows benchmarking computer vision algorithms for fine-grained classification, open-set detection, out-of-distribution detection and domain adaptation, all which are problems encountered in real-life monitoring situations.
The dataset has 2.7M images from 43,189 specimens, DNA sequences for 1358 specimens, and dry mass and size measurements for 1494 specimens, making it also one of the largest biological multi-view and multi-modal datasets collected with an uniform setup.



## Dataset Sources

Dataset handling library: https://github.com/mikkoim/aquamonitor

Dataset repository: https://github.com/mikkoim/aquamonitor-codes

Pretrained models: https://huggingface.co/mikkoim/aquamonitor-baselines

## Uses

### Direct Use

The dataset is intended for benchmarking computer vision methods applied to aquatic invertebrate identification. Specifically, it is used to define and evaluate performance on three benchmark tasks:

1.
Monitoring benchmark: Reflecting real-life deployment challenges, including open-set recognition, out-of-distribution detection, distribution shift, and extreme class imbalance. This benchmark uses data from different years for training and testing (2021 train, 2022 test/val)

2.
Classification benchmark: A standard fine-grained visual categorization task for classes with sufficient data.

3.
Few-shot benchmark: Targeting categories with limited training examples to evaluate methods for learning new classes with few examples.


## Dataset Structure

### Folders

`class_maps`: Contains files that are used for mapping class strings to indices

`dna`: contains metadata files for the DNA subset

`images`: image files in WebDataset format (\~108GB)

`thumbnail`: Resized and contrast-adjusted thumbnail images in the same structure as the main dataset for visualization purposes (\~10GB)

### Files

`aquamonitor.parquet.gzip`: Full dataset metadata, without train-test-splits. Each row corresponds to a single image.

`aquamonitor-individual.parquet.gzip`: Full dataset metadata, aggregated by individual.

`aquamonitor-monitor.parquet.gzip`: Full dataset metadata, with train-test-splits for the monitor task.

`aquamonitor-classif.parquet.gzip`: Full dataset metadata, with train-test-splits for the classification task.

`aquamonitor-fewshot.parquet.gzip`: Full dataset metadata, with train-test-splits for the few-shot task.

`aquamonitor-biomass.parquet.gzip`: Metadata for biomass estimation, with additional columns for biomass-related metadata.


### Columns

See `README-metadata.md` for metadata column descriptions.

## Usage

Using Huggingface `datasets`:
```python
import datasets
ds = datasets.load_dataset("mikkoim/aquamonitor", data_dir="images", split="train", cache_dir="aquamonitor")
```
The full dataset will consume \~100GB of disk space, and it is recommended to cache it to a known location.

For testing, you can use the thumbnail dataset (~10GB):
```python
ds_thumbs = datasets.load_dataset("mikkoim/aquamonitor", data_dir="thumbnail", split="train", cache_dir="aquamonitor")
```

You can also download the raw `.tar` partitions from [here](https://huggingface.co/datasets/mikkoim/aquamonitor/tree/main/images)

The metadata can be accessed straight from Huggingface using pandas:

```python
import pandas as pd
df = pd.read_parquet("https://huggingface.co/datasets/mikkoim/aquamonitor/resolve/main/aquamonitor-monitor.parquet.gzip")
df_train = df.query("fold0 == 'train'")
df_val = df.query("fold0 == 'val'")
```

The benchmark splits are in separate files:

```python
df_classif = pd.read_parquet("https://huggingface.co/datasets/mikkoim/aquamonitor/resolve/main/aquamonitor-classif.parquet.gzip")
df_fewshot = pd.read_parquet("https://huggingface.co/datasets/mikkoim/aquamonitor/resolve/main/aquamonitor-fewshot.parquet.gzip")
```

## Dataset Creation

### Source Data
#### Data Collection and Processing

The samples are from a national monitoring programme for agriculture and forestry diffuse loading impacts on streams and lakes (MaaMet-monitoring) [More information in Finnish](https://www.syke.fi/fi/palvelut/seurannat-ja-inventoinnit/maa-ja-metsatalouden-seurantaohjelma).

The samples imaged are only from lakes and not streams.

Comparing our specimen counts to a national monitoring database, we were able to image 89.58% (out of 25,546) of 2021 specimens and 72.65% (out of 27,952) of 2022 specimens.

Taxonomic coverage is 152 taxa out of 161 taxa encountered during the two monitoring years.

The specimens were imaged using the [BIODISCOVER device](https://github.com/Aarhus-University-MPE/BioDiscover/) and its software.

Detailed code repositories for all phases of dataset processing can be found from https://github.com/mikkoim/aquamonitor-codes

## Bias, Risks, and Limitations

The dataset is limited to Finnish lake invertebrates, collected with kick-sampling methods.