|
|
--- |
|
|
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. |