license: cc-by-3.0
language:
- en
size_categories:
- 1M<n<10M
pretty_name: BIOSCAN-5M
tags:
- Multimodal_dataset
- Large_dcale_dataset
- Image
- DNA_barcode
- Taxonomy
- Biodiversity
- LLMs
- BERT
- Clustering
- Multimodal_retrieval_learning
- Zero_shot_transfer_learning
- Geo_location
- Specimen_size
- Insect
- Species
Dataset Card for BIOSCAN-5M
Overview
As part of an ongoing worldwide effort to comprehend and monitor insect biodiversity, we present the BIOSCAN-5M Insect dataset to the machine learning community. BIOSCAN-5M is a comprehensive dataset containing multi-modal information for over 5 million insect specimens, and it significantly expands existing image-based biological datasets by including taxonomic labels, raw nucleotide barcode sequences, assigned barcode index numbers, geographical information, and specimen size.
Citation
If you make use of the BIOSCAN-5M dataset and/or its code repository, please cite the following paper:
@inproceedings{gharaee2024bioscan5m,
title={{BIOSCAN-5M}: A Multimodal Dataset for Insect Biodiversity},
booktitle={Advances in Neural Information Processing Systems},
author={Zahra Gharaee and Scott C. Lowe and ZeMing Gong and Pablo Millan Arias
and Nicholas Pellegrino and Austin T. Wang and Joakim Bruslund Haurum
and Iuliia Zarubiieva and Lila Kari and Dirk Steinke and Graham W. Taylor
and Paul Fieguth and Angel X. Chang
},
editor={A. Globerson and L. Mackey and D. Belgrave and A. Fan and U. Paquet and J. Tomczak and C. Zhang},
pages={36285--36313},
publisher={Curran Associates, Inc.},
year={2024},
volume={37},
url={https://proceedings.neurips.cc/paper_files/paper/2024/file/3fdbb472813041c9ecef04c20c2b1e5a-Paper-Datasets_and_Benchmarks_Track.pdf},
}
Dataset Features
Each configuration loads specimen images along with associated metadata fields:
image
RGB JPEG images of individual insect specimens.Metadata fields
- Indexing fields
processid
: A unique number assigned by BOLD (International Barcode of Life Consortium).sampleid
: A unique identifier given by the collector.
- Taxonomic labels
phylum
,class
,order
,family
,subfamily
,genus
,species
: Hierarchical taxonomic classification
- Genetic information
dna_bin
: Barcode Index Numberdna_barcode
: DNA barcode sequence
- Geographic data
country
,province_state
: Collection locationcoord-lat
,coord-lon
: Latitude and longitude coordinates
- Specimen size data
image_measurement_value
: Measured image property (e.g., pixel area)area_fraction
: Fraction of the image occupied by the specimenscale_factor
: Relative size normalization factor
- Split and localization
split
: Data partition label (e.g., train, test, val)chunk
: Subdirectory label for scalable storage
- Indexing fields
Usage
To load the BIOSCAN-5M dataset from dataset.py
from datasets import load_dataset
ds = load_dataset("dataset.py", name="cropped_256_eval", split="validation", trust_remote_code=True)
ℹ️ Note: The CSV metadata and image package associated with the selected configuration will be automatically downloaded and extracted to
~/.cache/huggingface/datasets/downloads/extracted/
.
📑 Configuration Options
name
must be one of:original_256
original_256_pretrain
original_256_train
original_256_eval
cropped_256
cropped_256_pretrain
cropped_256_train
cropped_256_eval
split
must be one of:pretrain
train
validation
test
val_unseen
test_unseen
key_unseen
other_heldout
Sample Usage
The usage_demo_bioscan5m.py
script demonstrates how to load and visualize samples from the BIOSCAN-5M dataset.
To run the script, execute:
python usage_demo_bioscan5m.py
This will display 10 dataset samples, each showing the organism image on the right, and the corresponding metadata fields on the left, including taxonomic, geographic, genetic, and size-related information.

Dataset Access
To clone this dataset repository, use the following command:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/datasets/bioscan-ml/BIOSCAN-5M
Dataset Sources
- Dataset website: https://biodiversitygenomics.net/5M-insects/
- GoogleDrive: https://drive.google.com/drive/u/1/folders/1Jc57eKkeiYrnUBc9WlIp-ZS_L1bVlT-0
- GitHub: https://github.com/zahrag/BIOSCAN-5M
- Zenodo: https://zenodo.org/records/11973457
- Kaggle: https://www.kaggle.com/datasets/zahragharaee/bioscan-5m/data
- Paper: https://arxiv.org/abs/2406.12723
Copyright and License
The images included in the BIOSCAN-5M dataset available through this repository are subject to copyright and licensing restrictions shown in the following:
- Copyright Holder: CBG Photography Group
- Copyright Institution: Centre for Biodiversity Genomics (email:[email protected])
- Photographer: CBG Robotic Imager
- Copyright License: Creative Commons Attribution 3.0 Unported (CC BY 3.0)
- Copyright Contact: [email protected]
- Copyright Year: 2021