Taxonomic update with TaxonoPy

#13
.gitattributes CHANGED
@@ -61,3 +61,5 @@ metadata/** filter=lfs diff=lfs merge=lfs -text
61
  # Full dataset
62
  dataset/** filter=lfs diff=lfs merge=lfs -text
63
  embeddings/txt_emb_species.json filter=lfs diff=lfs merge=lfs -text
 
 
 
61
  # Full dataset
62
  dataset/** filter=lfs diff=lfs merge=lfs -text
63
  embeddings/txt_emb_species.json filter=lfs diff=lfs merge=lfs -text
64
+ embeddings/txt_emb_biocap.json filter=lfs diff=lfs merge=lfs -text
65
+ embeddings/txt_emb_bioclip.json filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -4,7 +4,7 @@ language:
4
  - en
5
  - la
6
  pretty_name: TreeOfLife-10M
7
- description: Over 10 million images covering 454 thousand taxa in the tree of life used to train BioCLIP. This dataset of images of biological organisms paired with their associated taxonomic labels expands on the foundation established by existing high-quality datasets, such as iNat21 and BIOSCAN-1M, by further incorporating newly curated images from the Encyclopedia of Life (eol.org), which supplies most of TreeOfLife-10M’s data diversity.
8
  task_categories:
9
  - image-classification
10
  - zero-shot-classification
@@ -12,6 +12,8 @@ tags:
12
  - biology
13
  - images
14
  - animals
 
 
15
  - evolutionary biology
16
  - CV
17
  - multimodal
@@ -29,19 +31,24 @@ size_categories: 10M<n<100M
29
  ## Dataset Description
30
 
31
  - **Homepage:** [BioCLIP Page](https://imageomics.github.io/bioclip/)
 
32
  - **Repository:** [Imageomics/bioclip](https://github.com/Imageomics/bioclip)
33
  - **Paper:** [BioCLIP: A Vision Foundation Model for the Tree of Life](https://openaccess.thecvf.com/content/CVPR2024/papers/Stevens_BioCLIP_A_Vision_Foundation_Model_for_the_Tree_of_Life_CVPR_2024_paper.pdf)
34
  <!-- [arXiv](https://doi.org/10.48550/arXiv.2311.18803) -->
35
 
 
 
36
  ### Dataset Summary
37
 
38
- With over 10 million images covering 454 thousand taxa in the tree of life, TreeOfLife-10M is the largest-to-date ML-ready dataset of images of biological organisms paired with their associated taxonomic labels. It expands on the foundation established by existing high-quality datasets, such as iNat21 and BIOSCAN-1M, by further incorporating newly curated images from the Encyclopedia of Life (eol.org), which supplies most of TreeOfLife-10M’s data diversity. Every image in TreeOfLife-10M is labeled to the most specific taxonomic level possible, as well as higher taxonomic ranks in the tree of life (see [Text Types](#text-types) for examples of taxonomic ranks and labels). TreeOfLife-10M was generated for the purpose of training [BioCLIP](https://huggingface.co/imageomics/bioclip) and future biology foundation models.
 
 
39
 
40
  <!--This dataset card aims to be a base template for new datasets. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/datasetcard_template.md?plain=1). And further altered to suit Imageomics Institute needs. -->
41
 
42
  |![treemap from phyla down to family](https://huggingface.co/datasets/imageomics/treeoflife-10m/resolve/main/visuals/phyla_ToL_tree.png)|
43
  |:--|
44
- |**Figure 1.** Treemap from phyla down to family for TreeOfLife-10M. Interactive version available in [`visuals`](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/main/visuals) folder.|
45
 
46
 
47
  ### Supported Tasks and Leaderboards
@@ -62,6 +69,11 @@ dataset/
62
  ...
63
  image_set_63.tar.gz
64
  embeddings/
 
 
 
 
 
65
  txt_emb_species.json
66
  txt_emb_species.npy
67
  metadata/
@@ -81,7 +93,7 @@ visuals/
81
  phyla_ToL_tree.png
82
  ```
83
 
84
- The `embeddings/` directory contains the [BioCLIP](https://huggingface.co/imageomics/bioclip) text embeddings for all 8,455,243 images with full taxonomic labels in the TreeOfLife-10M dataset.
85
 
86
  Each `image_set` is approximately 30GB and contains 100 thousand images, each named `<treeoflife_id>.jpg`.
87
  We cannot reproduce the `iNat21` data, but step-by-step [***reproduction instructions***](https://github.com/Imageomics/bioclip/blob/main/docs/imageomics/treeoflife10m.md#reproduce-treeoflife-10m) are provided on the BioCLIP GitHub repository to recreate the proper webdataset structure. This process will produce a collection of files named `shard-######.tar` in a `train`, `val`, and `train_small` folder with which to work.
@@ -106,7 +118,7 @@ Inside each shard is a collection of images (named `<treeoflife_id>.jpg`), for w
106
  ### Data Instances
107
 
108
 
109
- This dataset is a collection of images with associated text. The text matched to images contains both [Linnaean taxonomy](https://www.britannica.com/science/taxonomy/The-objectives-of-biological-classification) (kingdom through species) for the particular subject of the image and its common (or vernacular) name where available. There are 8,455,243 images with full taxonomic labels.
110
 
111
 
112
  ### Data Fields
@@ -125,16 +137,17 @@ This dataset is a collection of images with associated text. The text matched to
125
  - `inat21_cls_name`: `<Kingdom>_<Phylum>_<Class>_<Order>_<Family>_<Genus>_<species>` as labeled by iNaturalist.
126
  - `inat21_cls_num`: Number assigned by iNat21 to the given species (unique identifier for that species within iNat21 dataset).
127
  The remaining terms describe the _Linnaean taxonomy_ of the subject of the image; they are sourced as described in [Annotation Process, below](#annotation-process).
128
- - `kingdom`: kingdom to which the subject of the image belongs (`Animalia`, `Plantae`, `Fungi`, `Chromista`, `Protozoa`, `Bacteria`, `Viridiplantae`, `Protista`, `Orthornavirae`, `Bamfordvirae`, `Archaea`, or `Shotokuvirae`). Note: this large number of kingdoms are considered in recognition of the fact that there is not agreement on merging them.
129
- - `phylum`: phylum to which the subject of the image belongs.
130
- - `class`: class to which the subject of the image belongs.
131
- - `order`: order to which the subject of the image belongs.
132
- - `family`: family to which the subject of the image belongs.
133
- - `genus`: genus to which the subject of the image belongs.
134
- - `species`: species to which the subject of the image belongs.
135
- - `common`: common name associated with the subject of the image where available. Otherwise, this is the scientific name (`genus-species`), else whatever subset of the taxonomic hierarchy is available (eg., `kingdom-phylum-class-order` or `kingdom-phylum-class-order-family`). All images have a non-null entry for this column.
136
-
137
- Note that the `species` column occasionally has entries such as "sp. ___(get ex)" with some string following. This seems to be used to indicate the species is unknown, but various specimens/images are known to be the same species. Additionally, for `species` values containing an `x` between names, this is indicative of a hybrid that is a cross of the two species listed on either side of the `x`.
 
138
 
139
  ##### Text Types
140
 
@@ -148,7 +161,7 @@ Note that the `species` column occasionally has entries such as "sp. ___(get ex)
148
  `naming/`: these files provide the taxonomic name lookup for each data source in the reconstruction of the dataset.
149
 
150
 
151
- `species_level_taxonomy_chains.csv`: CSV with the ITIS taxonomic hierarchy, indicated as follows:
152
  - `hierarchy_string_tsn`: string of Taxonomic Serial Numbers (TSN)* for the names of the ranks provided from highest to lowest, connected by dashes (eg., `202422-846491-660046-846497-846508-846553-954935-5549-5550`).
153
  - `hierarchy_string_names`: string of the names of the ranks provided from highest to lowest, connected by arrows (eg., `Plantae->Biliphyta->Rhodophyta->Cyanidiophytina->Cyanidiophyceae->Cyanidiales->Cyanidiaceae->Cyanidium->Cyanidium caldarium`).
154
  - `terminal_tsn`: Taxonomic Serial Number (TSN)* of designated species (eg., `5550`).
@@ -171,7 +184,7 @@ Note that the `species` column occasionally has entries such as "sp. ___(get ex)
171
  - `taxonRank`: lowest rank of the taxonomic tree indicated (eg., `genus` or `species`), occasionally not indicated, even for accepted names.
172
  - `taxonomicStatus`: whether the name is accepted by EOL or not (`accepted` or `not accepted`, correspond to existence of non-null `eolID` or `acceptedNameUsageID` entry, respectively).
173
  - `datasetID`: generally corresponds to the source identified in `source` column.
174
- - `canonicalName`: the name(s) associate with the `taxonRank` (eg., `<Genus> <species>` for species).
175
  - `authority`: usually name of person who assigned the name, with the year as available.
176
  - `eolID`: the EOL page ID (only non-null when `taxonomicStatus` is accepted by EOL).
177
  - `Landmark`: numeric values, meaning unknown, mostly null.
@@ -200,21 +213,24 @@ As noted above, the `split` column of `catalog.csv` indicates to which split eac
200
 
201
  - [Meta-Album](https://paperswithcode.com/dataset/meta-album): Specifically, we used the Plankton, Insects, Insects 2, PlantNet, Fungi, PlantVillage, Medicinal Leaf, and PlantDoc datasets from Set-0 through Set-2 (Set-3 was still not released as of our publication/evaluation (Nov. 2023).
202
  - [Birds 525](https://www.kaggle.com/datasets/gpiosenka/100-bird-species): We evaluated on the 2,625 test images provided with the dataset.
203
- - [Rare Species](https://huggingface.co/datasets/imageomics/rare-species): A new dataset we curated for the purpose of testing this model and to contribute to the ML for Conservation community. It consists of 400 species labeled Near Threatened through Extinct in the Wild by the [IUCN Red List](https://www.iucnredlist.org/), with 30 images per species. For more information, see our dataset, [Rare Species](https://huggingface.co/datasets/imageomics/rare-species).
204
 
205
- For more information about the contents of these datasets, see Table 2 and associated sections of [our paper](https://doi.org/10.48550/arXiv.2311.18803).
206
 
207
  ## Dataset Creation
208
 
209
  ### Curation Rationale
210
 
211
- Previously, the largest ML-ready biology image dataset was [iNat21](https://github.com/visipedia/inat_comp/tree/master/2021), which consists of 2.7M images of 10K species. This is significant breadth when comparing to popular general-domain datasets, such as [ImageNet-1K](https://huggingface.co/datasets/imagenet-1k); 10K species are rather limited when considering the vast scope of biology. For context, in 2022, [The International Union for Conservation of Nature (IUCN)](https://www.iucnredlist.org/) reported over 2M total described species, with over 10K distinct species of birds and reptiles alone. Thus, the lesser species diversity of iNat21 limits its potential for pre-training a foundation model for the entire tree of life.
 
 
212
 
213
- With this focus on species diversity and the need for high-quality images of biological organisms, we looked to the [Encyclopedia of Life Project (EOL)](https://eol.org/). EOL is an image aggregator that collaborates with a variety of institutions to source and label millions of images. After downloading 6.6M images from EOL, we were able to expand our dataset to cover an additional 440K taxa.
214
 
215
- Insects (of the class Insecta with 1M+ species), birds (of the class Aves with 10K+ species) and reptiles (of the class Reptilia with 10K+ species) are examples of highly diverse subtrees with many more species than other taxonomic classes. This imbalance among subtrees in the tree of life present challenges in training a foundation model that can recognize extremely fine-grained visual representations of these classes. To help address this challenge for insects, we incorporated [BIOSCAN-1M](https://zenodo.org/doi/10.5281/zenodo.8030064), a recent dataset of 1M expert-labeled lab images of insects, covering 494 different families. The added variety of lab images, rather than in situ images (as in iNat21), further diversifies the _image_ distribution of TreeOfLife-10M.
216
 
217
- Overall, this dataset contains approximately 454K unique taxonomic labels of the more than 2M recorded by [IUCN](iucnredlist.org) in 2022. To the best of our knowledge, this is still the most diverse and largest such ML-ready dataset available, hence our curation.
 
218
 
219
 
220
  ### Source Data
@@ -240,16 +256,9 @@ Species selected for the Rare Species dataset were removed from this dataset (se
240
 
241
  #### Annotation Process
242
 
243
- Annotations were primarily sourced from image source providers.
244
-
245
- For iNat21 and BIOSCAN-1M images, the labels provided by those sources were used.
246
- - iNat21: iNaturalist English vernacular names and taxa were used.
247
- - BIOSCAN-1M: Linnaean taxonomic rankings were applied as labeled in the [BIOSCAN-1M dataset](https://zenodo.org/doi/10.5281/zenodo.8030064), which is all hand-labeled by experts. Note that the dataset provides other ranks (not considered in the 7-rank Linnaean taxonomy), such as tribe, which were not included in this dataset.
248
-
249
- For images from EOL, the scientific name (`genus-species`) was used to look up the higher-order taxa from the following sources as listed: BIOSCAN-1M metadata, EOL aggregate datasets (described below), then match this against the ITIS hierarchy for the higher-order taxa standardization. A small number of these are [homonyms](https://en.wikipedia.org/wiki/Homonym_(biology)), for which a list was generated to ensure proper matching of higher-order taxa (manual homonym resolution is in class `NameUpgrader` in the [naming script](https://github.com/Imageomics/bioclip/blob/main/src/imageomics/naming.py)). After these resources were exhausted, any remaining unresolved taxa were fed through the [Global Names Resolver (GNR) API](https://resolver.globalnames.org/api). Despite our efforts, we discovered after training that some hemihomonyms were mislabeled at higher-level taxa (family up to kingdom). This impacts approximately 0.1-0.2% of our data. We are in the process of developing a more robust solution to taxonomic labeling which will also account for re-naming (as is currently in process for many bird species). We intend to release a patch alongside the solution.
250
-
251
- This process allowed us to reach full taxa labels for 84% of images. To put this in perspective, 10% of images in TreeOfLife-10M are only labeled to the `family` level (no `genus-species` designations) as part of BIOSCAN-1M, so this places a cap on the taxa coverage. Taxonomic ranking also is not entirely standardized and agreed-upon throughout the biology community, so most gaps are more indicative of lack of consensus on label than missing information.
252
 
 
253
 
254
  #### Who are the annotators?
255
 
@@ -268,10 +277,9 @@ The hope is that this dataset could be helpful in conservation efforts or biodiv
268
 
269
  This dataset is imbalanced in its representation of various species with the greatest representation available for those in the phyla _Arthropoda_, _Tracheophyta_, and _Chordata_ (see our [interactive treemap from phylum to family](https://huggingface.co/imageomics/treeoflife-10m/raw/main/phyla_ToL_tree.html) for further details of this distribution). This class imbalance is both a result of availability of images and actual variance in class diversity. Additionally, as noted above, there are 2M+ estimated species according to [IUCN](iucnredlist.org), so overall taxonomic coverage is still limited (though it far surpasses the species diversity of other well-known animal datasets).
270
 
271
- Not all data is labeled to the species level, and some entries are more or less precise. For instance, the `species` column occasionally has entries such as "sp. ___(get ex)" with some string following. This seems to be used to indicate the species is unknown, but various specimens/images are known to be the same species. Additionally, for `species` values containing an `x` between names, this is indicative of a hybrid that is a cross of the two species listed on either side of the `x`. Due to the additional information provided about the higher order taxa, these labeling anomalies still present valuable information providing links between these classes.
272
 
273
-
274
- As stated above, 84% of images have full taxa labels. However, due to the incomplete standardization and agreement on the taxonomic hierarchy throughout the biology community, most gaps are more indicative of lack of consensus on label than missing information.
275
 
276
  Note that BIOSCAN-1M’s label granularity may still be limited for insects, as 98.6% of BIOSCAN-1M’s images are labeled to the family level but only 22.5% and 7.5% of the images have genus or species indicated, respectively. Lack of label granularity is an inherent challenge.
277
 
@@ -293,7 +301,7 @@ All BIOSCAN-1M images are licensed under [CC BY-NC-SA 4.0](https://creativecommo
293
  EOL images contain a variety of licenses ranging from [CC0](https://creativecommons.org/publicdomain/zero/1.0/) to [CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/).
294
  For license and citation information by image, see our [license file](https://huggingface.co/datasets/imageomics/treeoflife-10m/blob/main/metadata/licenses.csv).
295
 
296
- **Note**: Due to licensing restrictions discovered after training, approximately 30K of the images used to train BioCLIP (about 0.3%) cannot be republished here and links to original content are no longer available. Overall, 14 families that were included in training BioCLIP are not republished in this dataset, a loss of 0.38% of the taxa diversity.
297
 
298
  This dataset (the compilation) has been marked as dedicated to the public domain by applying the [CC0 Public Domain Waiver](https://creativecommons.org/publicdomain/zero/1.0/). However, images may be licensed under different terms (as noted above).
299
 
@@ -303,15 +311,17 @@ This dataset (the compilation) has been marked as dedicated to the public domain
303
  ```
304
  @dataset{treeoflife_10m,
305
  author = {Samuel Stevens and Jiaman Wu and Matthew J Thompson and Elizabeth G Campolongo and Chan Hee Song and David Edward Carlyn and Li Dong and Wasila M Dahdul and Charles Stewart and Tanya Berger-Wolf and Wei-Lun Chao and Yu Su},
306
- title = {{TreeOfLife-10M (Revision ffa2a31)}},
307
  year = {2026},
308
  url = {https://huggingface.co/datasets/imageomics/TreeOfLife-10M},
309
- doi = {10.57967/hf/7542},
310
  publisher = {Hugging Face}
311
  }
312
  ```
313
 
314
- Note that this version is updated from [Revision 69ca82e](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/69ca82e7481dcae0764f7c5452ea32b3a41cf620), which is the version used for the original BioCLIP model training ([BioCLIP Revision 7b4abf1](https://huggingface.co/imageomics/bioclip/tree/7b4abf1f6ee747c15de00c7d28a5e62990b5dabc)). There are **no substantial differences to the dataset itself**; this version simply adds extra [files](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/commit/5f1c0c80a94da39b7e84024d34f9b936db9f7ae1) and [instructions](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/commit/343c36b9b362494065ac427ac1da989b834b22cf) required for reproducibility of the dataset, as well as the [BioCLIP text embeddings](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/commit/4e719078e4cab104a0b631c0fd724ba9ee02411b) (from BioCLIP Revision 7b4abf1).
 
 
315
 
316
  Please also cite our paper:
317
  ```
@@ -352,11 +362,21 @@ Please be sure to also cite the original data sources and all constituent parts
352
 
353
  For license and citation information by image, see our [license file](https://huggingface.co/datasets/imageomics/treeoflife-10m/blob/main/metadata/licenses.csv).
354
 
355
-
356
- - ITIS: Retrieved July, 20 2023, from the Integrated Taxonomic Information System (ITIS) on-line database, www.itis.gov, CC0
357
- https://doi.org/10.5066/F7KH0KBK
358
-
 
 
 
 
 
 
 
 
 
 
359
 
360
  ### Contributions
361
 
362
- The [Imageomics Institute](https://imageomics.org) is funded by the US National Science Foundation's Harnessing the Data Revolution (HDR) program under [Award #2118240](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2118240) (Imageomics: A New Frontier of Biological Information Powered by Knowledge-Guided Machine Learning). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
 
4
  - en
5
  - la
6
  pretty_name: TreeOfLife-10M
7
+ description: Over 10 million images covering 394 thousand taxa in the tree of life used to train BioCLIP. This dataset of images of biological organisms paired with their associated taxonomic labels expands on the foundation established by existing high-quality datasets, such as iNat21 and BIOSCAN-1M, by further incorporating newly curated images from the Encyclopedia of Life (eol.org), which supplies most of TreeOfLife-10M’s data diversity.
8
  task_categories:
9
  - image-classification
10
  - zero-shot-classification
 
12
  - biology
13
  - images
14
  - animals
15
+ - plants
16
+ - fungi
17
  - evolutionary biology
18
  - CV
19
  - multimodal
 
31
  ## Dataset Description
32
 
33
  - **Homepage:** [BioCLIP Page](https://imageomics.github.io/bioclip/)
34
+ - **Homepage:** [BioCLIP Ecosystem Site](https://imageomics.github.io/bioclip-ecosystem/)
35
  - **Repository:** [Imageomics/bioclip](https://github.com/Imageomics/bioclip)
36
  - **Paper:** [BioCLIP: A Vision Foundation Model for the Tree of Life](https://openaccess.thecvf.com/content/CVPR2024/papers/Stevens_BioCLIP_A_Vision_Foundation_Model_for_the_Tree_of_Life_CVPR_2024_paper.pdf)
37
  <!-- [arXiv](https://doi.org/10.48550/arXiv.2311.18803) -->
38
 
39
+ If you are looking for the original release TreeOfLife-10M dataset, as used in training the original BioCLIP presented the paper, please see [Revision ffa2a31](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/ffa2a318a1396f2f9e456ba171d3b5b5d8b4f051), which includes all files to reproduce the dataset as presented in the original BioCLIP paper. The dataset, as presented here, has had known taxonomic naming issues resolved and been used to update the original BioCLIP ViT-14/B model ([BioCLIP Revision 7b4abf1](https://huggingface.co/imageomics/bioclip/tree/7b4abf1f6ee747c15de00c7d28a5e62990b5dabc)).
40
+
41
  ### Dataset Summary
42
 
43
+ With over 10 million images covering 394 thousand taxa in the tree of life, TreeOfLife-10M was, at its creation, the largest ML-ready dataset of images of biological organisms paired with their associated taxonomic labels. It expands on the foundation established by existing high-quality datasets, such as iNat21 and BIOSCAN-1M, by further incorporating newly curated images from the Encyclopedia of Life (eol.org), which supplies most of TreeOfLife-10M’s data diversity. Every image in TreeOfLife-10M is labeled to the most specific taxonomic level possible, as well as higher taxonomic ranks in the tree of life (see [Text Types](#text-types) for examples of taxonomic ranks and labels). TreeOfLife-10M was generated for the purpose of training [BioCLIP](https://huggingface.co/imageomics/bioclip) and future biology foundation models.
44
+
45
+ Note that 220,339 of the images' taxa were not able to be resolved due to a lack of taxonomic labels provided by the source. However, they are labeled with 21,610 unique common (vernacular names); it is just the taxonomic rank columns that are empty.
46
 
47
  <!--This dataset card aims to be a base template for new datasets. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/datasetcard_template.md?plain=1). And further altered to suit Imageomics Institute needs. -->
48
 
49
  |![treemap from phyla down to family](https://huggingface.co/datasets/imageomics/treeoflife-10m/resolve/main/visuals/phyla_ToL_tree.png)|
50
  |:--|
51
+ |**Figure 1.** Treemap from phyla down to family for TreeOfLife-10M. Interactive version available in [`visuals`](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/main/visuals) folder. The "unknown" taxonomic class in _Chordata_ represents the class that was previously _Reptilia_, but have not been resolved into other classes (more information in [Curation Rationale](#curation-rationale), below.|
52
 
53
 
54
  ### Supported Tasks and Leaderboards
 
69
  ...
70
  image_set_63.tar.gz
71
  embeddings/
72
+ txt_emb_biocap.json
73
+ txt_emb_biocap.npy
74
+ txt_emb_bioclip.json
75
+ txt_emb_bioclip.npy
76
+ # generic 'species' emb files are duplicates of bioclip versions for pybioclip backward-compatibility
77
  txt_emb_species.json
78
  txt_emb_species.npy
79
  metadata/
 
93
  phyla_ToL_tree.png
94
  ```
95
 
96
+ [BioCLIP](https://huggingface.co/imageomics/bioclip) and [BioCAP](https://huggingface.co/imageomics/biocap) text embeddings for TreeOfLife-10M images are provided under `embeddings/txt_emb_<model-name>.npy` with associated labels `embeddings/txt_emb_<model-name>.json`. The BioCLIP text embeddings and labels are duplicated as `txt_emb_species.npy` and `txt_emb_species.json` to maintain [`pybioclip`](http://github.com/Imageomics/pybioclip) functionality for versions 2.1.x and earlier, which do not incorporate BioCAP as a "Tree of Life Model". All three `embeddings/*.json` files are the same, since each model used the same label set; they are duplicated under the model-specific naming convention for [consistent by-model access by pybioclip](https://github.com/Imageomics/pybioclip/pull/171).
97
 
98
  Each `image_set` is approximately 30GB and contains 100 thousand images, each named `<treeoflife_id>.jpg`.
99
  We cannot reproduce the `iNat21` data, but step-by-step [***reproduction instructions***](https://github.com/Imageomics/bioclip/blob/main/docs/imageomics/treeoflife10m.md#reproduce-treeoflife-10m) are provided on the BioCLIP GitHub repository to recreate the proper webdataset structure. This process will produce a collection of files named `shard-######.tar` in a `train`, `val`, and `train_small` folder with which to work.
 
118
  ### Data Instances
119
 
120
 
121
+ This dataset is a collection of images with associated text. The text matched to images contains both [Linnaean taxonomy](https://www.britannica.com/science/taxonomy/The-objectives-of-biological-classification) (kingdom through species) for the particular subject of the image and its common (or vernacular) name where available. There are 7,836,751 images with full taxonomic labels, primarily sourced from the [GBIF Backbone Taxonomy](https://doi.org/10.15468/39omei); more details on taxonomic sourcing are available in the [TaxonoPy](https://github.com/Imageomics/TaxonoPy) docs. This resolution provides a more faithful taxonomic representation from the original, as discussed throughout this dataset card.
122
 
123
 
124
  ### Data Fields
 
137
  - `inat21_cls_name`: `<Kingdom>_<Phylum>_<Class>_<Order>_<Family>_<Genus>_<species>` as labeled by iNaturalist.
138
  - `inat21_cls_num`: Number assigned by iNat21 to the given species (unique identifier for that species within iNat21 dataset).
139
  The remaining terms describe the _Linnaean taxonomy_ of the subject of the image; they are sourced as described in [Annotation Process, below](#annotation-process).
140
+ - `scientific_name`: scientific name of the subject of the image. This is the Latin term from the most specific available rank, e.g., `<Genus> <species>`. If only down to "family" is available, it uses that term for scientific name.) There are 394,139 unique scientific names. Unresolved scientific names are left null; these entries have common names only.
141
+ - `kingdom`: kingdom to which the subject of the image belongs (`Animalia`, `Plantae`, `Fungi`, `Chromista`, `Protozoa`, `Bacteria`, `Viridiplantae`, `Protista`, `Orthornavirae`, `Bamfordvirae`, `Archaea`, or `Shotokuvirae`). Note: this large number of kingdoms (12) are considered in recognition of the fact that there is not agreement on merging them. Unresolved kingdoms are denoted `' '`.
142
+ - `phylum`: phylum to which the subject of the image belongs. There are 127 unique phyla.
143
+ - `class`: class to which the subject of the image belongs. There are 368 unique classes; due to the change in taxonomic reference for more faithful representation, as discussed in [Curation Rationale](#curation-rationale), some classes (e.g., _Reptilia_) are no longer included.
144
+ - `order`: order to which the subject of the image belongs. There are 1,398 unique orders.
145
+ - `family`: family to which the subject of the image belongs. There are 8,248 unique families.
146
+ - `genus`: genus to which the subject of the image belongs. There are 73,537 unique genera -- this is _not_ an indicator of the number of genera actually represented in this dataset due to the presence of hemihomonyms.
147
+ - `species`: species to which the subject of the image belongs, specifically, this is the "species epithet". There are 351,248 unique species strings -- this is _not_ an indicator of the number of species actually represented in this dataset due to the presence of hemihomonyms.
148
+ - `common`: common name associated with the subject of the image where available. Common names were selected by mapping the GBIF taxonomic ID of the entry to the corresponding terms in the `VernacularName.tsv` file from the [GBIF Backbone Taxonomy](https://hosted-datasets.gbif.org/datasets/backbone/2023-08-28/) (latest available at time of alignment). Where multiple common names are available, the first available English language entry is used. If no English is available, the first available entry of any language is used. **Difference from original version:** There are 5,108 images that have a null entry for this column, but all have a scientific name, allowing for the same label scheme from the original. There are 123,441 unique common names.
149
+
150
+ Note that the `species` column occasionally has entries such as "sp. ___(get ex)" with some string following. This seems to be used to indicate the species is unknown, but various specimens/images are known to be the same species. Additionally, for `species` values containing an `x` between names, this is indicative of a hybrid that is a cross of the two species listed on either side of the `x`. Most, if not all, of these inconsistencies should have been resolved in the latest version. However, where a profile was not found to fit an entry and the taxonomic data was passed through from the source verbatim, such entries may occur.
151
 
152
  ##### Text Types
153
 
 
161
  `naming/`: these files provide the taxonomic name lookup for each data source in the reconstruction of the dataset.
162
 
163
 
164
+ `species_level_taxonomy_chains.csv`: CSV with the ITIS taxonomic hierarchy, indicated as follows. Note that the ITIS taxonomy was _not_ used for the latest version, only for the original, [Revision ffa2a31](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/ffa2a318a1396f2f9e456ba171d3b5b5d8b4f051).
165
  - `hierarchy_string_tsn`: string of Taxonomic Serial Numbers (TSN)* for the names of the ranks provided from highest to lowest, connected by dashes (eg., `202422-846491-660046-846497-846508-846553-954935-5549-5550`).
166
  - `hierarchy_string_names`: string of the names of the ranks provided from highest to lowest, connected by arrows (eg., `Plantae->Biliphyta->Rhodophyta->Cyanidiophytina->Cyanidiophyceae->Cyanidiales->Cyanidiaceae->Cyanidium->Cyanidium caldarium`).
167
  - `terminal_tsn`: Taxonomic Serial Number (TSN)* of designated species (eg., `5550`).
 
184
  - `taxonRank`: lowest rank of the taxonomic tree indicated (eg., `genus` or `species`), occasionally not indicated, even for accepted names.
185
  - `taxonomicStatus`: whether the name is accepted by EOL or not (`accepted` or `not accepted`, correspond to existence of non-null `eolID` or `acceptedNameUsageID` entry, respectively).
186
  - `datasetID`: generally corresponds to the source identified in `source` column.
187
+ - `canonicalName`: the name(s) associated with the `taxonRank` (eg., `<Genus> <species>` for species).
188
  - `authority`: usually name of person who assigned the name, with the year as available.
189
  - `eolID`: the EOL page ID (only non-null when `taxonomicStatus` is accepted by EOL).
190
  - `Landmark`: numeric values, meaning unknown, mostly null.
 
213
 
214
  - [Meta-Album](https://paperswithcode.com/dataset/meta-album): Specifically, we used the Plankton, Insects, Insects 2, PlantNet, Fungi, PlantVillage, Medicinal Leaf, and PlantDoc datasets from Set-0 through Set-2 (Set-3 was still not released as of our publication/evaluation (Nov. 2023).
215
  - [Birds 525](https://www.kaggle.com/datasets/gpiosenka/100-bird-species): We evaluated on the 2,625 test images provided with the dataset.
216
+ - [Rare Species](https://huggingface.co/datasets/imageomics/rare-species): A new benchmark we curated for the purpose of testing this model and to contribute to the ML for Conservation community. It consists of 400 species labeled Near Threatened through Extinct in the Wild by the [IUCN Red List](https://www.iucnredlist.org/), with 30 images per species. For more information, see our dataset, [Rare Species](https://huggingface.co/datasets/imageomics/rare-species).
217
 
218
+ For more information about the contents of these datasets, see Table 2 and associated sections of [our paper](https://openaccess.thecvf.com/content/CVPR2024/html/Stevens_BioCLIP_A_Vision_Foundation_Model_for_the_Tree_of_Life_CVPR_2024_paper.html).
219
 
220
  ## Dataset Creation
221
 
222
  ### Curation Rationale
223
 
224
+ Previously, the largest ML-ready biology image dataset was [iNat21](https://github.com/visipedia/inat_comp/tree/master/2021), which consists of 2.7M images of 10K species. This is significant breadth when comparing to popular general-domain datasets, such as [ImageNet-1K](https://huggingface.co/datasets/imagenet-1k); 10K species are rather limited when considering the vast scope of biology. For context, in 2022, [The International Union for Conservation of Nature (IUCN)](https://www.iucnredlist.org/) reported over 2M total described species, with over 10K distinct species of birds and reptiles alone. Thus, the lesser species diversity of iNat21 limits its potential for pre-training a foundation model for the entire tree of life.
225
+
226
+ With this focus on species diversity and the need for high-quality images of biological organisms, we looked to the [Encyclopedia of Life Project (EOL)](https://eol.org/). EOL is an image aggregator that collaborates with a variety of institutions to source and label millions of images. After downloading 6.6M images from EOL, we were able to expand our dataset to cover an additional 440K taxa*.
227
 
228
+ Insects (of the class Insecta with 1M+ species), birds (of the class Aves with 10K+ species) and reptiles (of the class Reptilia** with 10K+ species) are examples of highly diverse subtrees with many more species than other taxonomic classes. This imbalance among subtrees in the tree of life present challenges in training a foundation model that can recognize extremely fine-grained visual representations of these classes. To help address this challenge for insects, we incorporated [BIOSCAN-1M](https://zenodo.org/doi/10.5281/zenodo.8030064), a recent dataset of 1M expert-labeled lab images of insects, covering 494 different families. The added variety of lab images, rather than in situ images (as in iNat21), further diversifies the _image_ distribution of TreeOfLife-10M.
229
 
230
+ Overall, this dataset contains approximately 394K unique taxonomic labels of the more than 2M recorded by [IUCN](iucnredlist.org) in 2022. To the best of our knowledge, this was still the most diverse and largest such ML-ready dataset available at the time of creation, hence our curation.
231
 
232
+ *<small>The updated taxonomic resolution with TaxonoPy reduced the overall number of distinct taxa, but EOL still contributed the vast majority of the taxonomic diversity.</small>
233
+ **<small>Note on Reptilia in the latest update: where a resolution was applied, Reptilia will _not_ show up. Where a profile was not found to fit an entry and the taxonomic data was passed through from the source verbatim, there are entries with class Reptilia. This affects approximately 1,207 records in the re-resolved 10M dataset.</small>
234
 
235
 
236
  ### Source Data
 
256
 
257
  #### Annotation Process
258
 
259
+ Annotations were initially sourced from the image providers, then their full 7-rank Linnean taxonomies were fed into [TaxonoPy](https://github.com/Imageomics/TaxonoPy) for alignment.
 
 
 
 
 
 
 
 
260
 
261
+ This process allowed us to reach full taxa labels for 78.1% of images. To put this in perspective, 10% of images in TreeOfLife-10M are only labeled to the `family` level (no `genus-species` designations) as part of BIOSCAN-1M, so this places a cap on the taxa coverage. Taxonomic ranking also is not entirely standardized and agreed-upon throughout the biology community, so most gaps are more indicative of lack of consensus on label than missing information.
262
 
263
  #### Who are the annotators?
264
 
 
277
 
278
  This dataset is imbalanced in its representation of various species with the greatest representation available for those in the phyla _Arthropoda_, _Tracheophyta_, and _Chordata_ (see our [interactive treemap from phylum to family](https://huggingface.co/imageomics/treeoflife-10m/raw/main/phyla_ToL_tree.html) for further details of this distribution). This class imbalance is both a result of availability of images and actual variance in class diversity. Additionally, as noted above, there are 2M+ estimated species according to [IUCN](iucnredlist.org), so overall taxonomic coverage is still limited (though it far surpasses the species diversity of other well-known animal datasets).
279
 
280
+ Not all data is labeled to the species level, and some entries are more or less precise. For instance, for `species` values containing an `x` between names, this is indicative of a hybrid that is a cross of the two species listed on either side of the `x`. Due to the additional information provided about the higher order taxa, these labeling anomalies still present valuable information providing links between these classes.
281
 
282
+ As stated above, 78.1% of images have full taxa labels. However, due to the incomplete standardization and agreement on the taxonomic hierarchy throughout the biology community, most gaps are more indicative of lack of consensus on label than missing information. There are 99 images with `scientific_name` "Giant stick insect", due to an error in the source data. This is an example of the `"ForceAcceptedLastResort"` resolution strategy implemented in TaxonoPy version [0.2.0](https://github.com/Imageomics/TaxonoPy/releases/tag/v0.2.0).
 
283
 
284
  Note that BIOSCAN-1M’s label granularity may still be limited for insects, as 98.6% of BIOSCAN-1M’s images are labeled to the family level but only 22.5% and 7.5% of the images have genus or species indicated, respectively. Lack of label granularity is an inherent challenge.
285
 
 
301
  EOL images contain a variety of licenses ranging from [CC0](https://creativecommons.org/publicdomain/zero/1.0/) to [CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/).
302
  For license and citation information by image, see our [license file](https://huggingface.co/datasets/imageomics/treeoflife-10m/blob/main/metadata/licenses.csv).
303
 
304
+ **Note**: Due to licensing restrictions discovered after training, approximately 30K of the images used to train BioCLIP (about 0.3%) cannot be republished here and links to original content are no longer available. Overall, 14 families that were included in training BioCLIP are not republished in this dataset, a loss of 0.38% of the taxa diversity. (These numbers/percentages have not been checked post taxonomic update.)
305
 
306
  This dataset (the compilation) has been marked as dedicated to the public domain by applying the [CC0 Public Domain Waiver](https://creativecommons.org/publicdomain/zero/1.0/). However, images may be licensed under different terms (as noted above).
307
 
 
311
  ```
312
  @dataset{treeoflife_10m,
313
  author = {Samuel Stevens and Jiaman Wu and Matthew J Thompson and Elizabeth G Campolongo and Chan Hee Song and David Edward Carlyn and Li Dong and Wasila M Dahdul and Charles Stewart and Tanya Berger-Wolf and Wei-Lun Chao and Yu Su},
314
+ title = {{TreeOfLife-10M (Revision )}},
315
  year = {2026},
316
  url = {https://huggingface.co/datasets/imageomics/TreeOfLife-10M},
317
+ doi = {<update on new generation>},
318
  publisher = {Hugging Face}
319
  }
320
  ```
321
 
322
+ Note that this version is updated from [Revision ffa2a31](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/ffa2a318a1396f2f9e456ba171d3b5b5d8b4f051). This updated version resolves taxonomic alignment issues discovered in the first version. The taxonomic resolution was completed using [TaxonoPy](https://github.com/Imageomics/TaxonoPy), which was developed for [TreeOfLife-200M](https://huggingface.co/datasets/imageomics/TreeOfLife-200M). Additionally, it adds the [BioCAP](https://huggingface.co/imageomics/biocap) text embeddings.
323
+
324
+ [Revision 69ca82e](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/69ca82e7481dcae0764f7c5452ea32b3a41cf620) is the version used for the original BioCLIP model training ([BioCLIP Revision 7b4abf1](https://huggingface.co/imageomics/bioclip/tree/7b4abf1f6ee747c15de00c7d28a5e62990b5dabc)), presented in the paper. There are **no substantial differences to the dataset itself between that and Revision ffa2a31**; Revision ffa2a31 simply added extra [files](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/commit/5f1c0c80a94da39b7e84024d34f9b936db9f7ae1) and [instructions](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/commit/343c36b9b362494065ac427ac1da989b834b22cf) required for reproducibility of the dataset, as well as the [BioCLIP text embeddings](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/commit/4e719078e4cab104a0b631c0fd724ba9ee02411b) (from BioCLIP Revision 7b4abf1).
325
 
326
  Please also cite our paper:
327
  ```
 
362
 
363
  For license and citation information by image, see our [license file](https://huggingface.co/datasets/imageomics/treeoflife-10m/blob/main/metadata/licenses.csv).
364
 
365
+ Note that this version is updated from [Revision ffa2a31](https://huggingface.co/datasets/imageomics/TreeOfLife-10M/tree/ffa2a318a1396f2f9e456ba171d3b5b5d8b4f051), which is the version used for the original BioCLIP model training (reproducibility + embedding update to [BioCLIP Revision 7b4abf1](https://huggingface.co/imageomics/bioclip/tree/7b4abf1f6ee747c15de00c7d28a5e62990b5dabc)); it used ITIS for taxonomic resolution (Retrieved July, 20 2023, from the Integrated Taxonomic Information System (ITIS) on-line database, www.itis.gov, CC0 https://doi.org/10.5066/F7KH0KBK). This update used [TaxonoPy](https://github.com/Imageomics/TaxonoPy):
366
+
367
+ ```bibtex
368
+ @software{Thompson_TaxonoPy_2025,
369
+ author = {Thompson, Matthew J. and Campolongo, Elizabeth G. and Gu, Jianyang and Lapp, Hilmar},
370
+ doi = {10.5281/zenodo.15499454},
371
+ license = {MIT},
372
+ month = feb,
373
+ title = {{TaxonoPy}},
374
+ url = {https://github.com/Imageomics/TaxonoPy},
375
+ version = {0.2.0},
376
+ year = {2026}
377
+ }
378
+ ```
379
 
380
  ### Contributions
381
 
382
+ The [Imageomics Institute](https://imageomics.org) is funded by the US National Science Foundation's Harnessing the Data Revolution (HDR) program under [Award #2118240](https://www.nsf.gov/awardsearch/showAward?AWD_ID=2118240) (Imageomics: A New Frontier of Biological Information Powered by Knowledge-Guided Machine Learning). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
embeddings/txt_emb_biocap.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:658dba6afe89767cd9575dad59c41764dfa51f7e82c94e5cbf2a89017e3b65a6
3
+ size 40854648
embeddings/txt_emb_biocap.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:486b0fd0743472efa791f3278cc7cd4da62b691c7cae41584ee94400a0950d9c
3
+ size 717000832
embeddings/txt_emb_bioclip.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:658dba6afe89767cd9575dad59c41764dfa51f7e82c94e5cbf2a89017e3b65a6
3
+ size 40854648
embeddings/txt_emb_bioclip.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbb10d2cd7c2eb72c0334a1947dfd96c4b5ebf87164594effaf4dd79d2f4bada
3
+ size 717000832
embeddings/txt_emb_species.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:844e6fabc06cac072214d566b78f40825b154efa9479eb11285030ca038b2ece
3
- size 65731052
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:658dba6afe89767cd9575dad59c41764dfa51f7e82c94e5cbf2a89017e3b65a6
3
+ size 40854648
embeddings/txt_emb_species.npy CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:91ce02dff2433222e3138b8bf7eefa1dd74b30f4d406c16cd3301f66d65ab4ed
3
- size 787435648
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbb10d2cd7c2eb72c0334a1947dfd96c4b5ebf87164594effaf4dd79d2f4bada
3
+ size 717000832
metadata/catalog.csv CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:215d0080ebf9016e0f471aa037b4201b5a611c2675c85dfec02a23dae03bbaee
3
- size 2043627688
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8f437c66a952b7d6c58f9efbbd9eb7b1f1a2b9e596066c20e9bc33703cd378b
3
+ size 2158782626
visuals/kingdom_ToL_tree.html CHANGED
The diff for this file is too large to render. See raw diff
 
visuals/kingdom_ToL_tree.pdf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:68df18d4984fdac00ab5373e3c460784093e6a057410bedb60d2a454e5817f5e
3
- size 1187148
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2c79cc938f4791628792462a2b63a4865b14f6b1f3e9ea16d2eb059f8403891
3
+ size 34355
visuals/phyla_ToL_tree.html CHANGED
The diff for this file is too large to render. See raw diff
 
visuals/phyla_ToL_tree.pdf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:06e80b5ca147c493383554ce5fb2b23c0ec0b691c46c4d99475563a3a79b3a9a
3
- size 1076084
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf138b04387119c98155eb4d757fea211ec732df15df686dffc94c9a1d5ee8b5
3
+ size 38472
visuals/phyla_ToL_tree.png CHANGED

Git LFS Details

  • SHA256: 8e8c67418a65251756aefcc143fb7702446d39bc01b8132edd9f215422d4747f
  • Pointer size: 131 Bytes
  • Size of remote file: 763 kB

Git LFS Details

  • SHA256: 205cbbfee4a009e8ae5e47d4e1daf71c84eba2a40ba22c2859b54f8c5574c3a9
  • Pointer size: 131 Bytes
  • Size of remote file: 326 kB