The Dataset Viewer has been disabled on this dataset.

TreeOfLife-10M EDA Repo

This repo contains the real-time exploratory data analysis of the TreeOfLife-10M and Rare Species datasets during their creation and refinement. It is not intended for re-use as a dataset, but is shared in the spirit of open-science to provide further insight into the creation of the TreeOfLife-10M dataset and the Rare Species benchmark.

Dataset Details

Dataset Structure

As noted above, this dataset consists primarily of the exploratory data analysis during creation of the TreeOfLife-10M and Rare Species datasets. More detailed descriptions of its contents are provided below.

data/
    taxa_files/
        sample_images/
            20507360_64639770_eol-full-size-copy.jpg
            22255430_64639830_eol-full-size-copy.jpg
            29906970_65415246_eol-full-size-copy.jpg
            29907020_65415246_eol-full-size-copy.jpg
            30038365_65415248_eol-full-size-copy.jpg
            8757019_49951271_eol-full-size-copy.jpg
            8757071_49951271_eol-full-size-copy.jpg
            8757093_49951271_eol-full-size-copy.jpg
            8757102_49951271_eol-full-size-copy.jpg
            8791997_49952170_eol-full-size-copy.jpg
            8792002_49952170_eol-full-size-copy.jpg
            8922943_49955771_eol-full-size-copy.jpg
        ToL_hybrids_Arthropoda.csv
        sample_arthropoda_mislabels.txt
        README.md    # Hemihomonym description and explanation
    avg_std_byClass.csv
    catalog-v1-dev.csv
    catalog.csv
    licenses.csv
    missing_taxa_output.txt
    predicted-catalog.csv
    stats_avg_std_byClass.csv
    taxa_counts.csv
    tol_hierarchy_test.csv
eol_realign/
    data/
        checksums_media_cargo_archive.csv
        combined-manifest-licenses.csv
        combined_manifest.csv
        combined_manifest_with_checksums.csv
        eol-cargo-archive_catalog_combined-manifest-checksums_links.csv
        eol-cargo-archive_combined-manifest-checksums_links.csv
        full_owner_manifest.csv
        links_cargo_manifest_IDmismatch.csv
        links_inner.csv
        links_manifest_cargo_on_md5.csv
        mismatched_rarespecies.csv
        rarespecies_full_manifest.csv
        rs_links.csv
    notebooks/
        catalog-cargo-manifest_test.ipynb
        links_align_reduced.ipynb
        links_align_reduced.py
        links_rs_duplicates.ipynb
        links_rs_duplicates.py
        re-gen_rs_catalog.ipynb
        re-gen_tol_catalog.ipynb
    scripts/
        make_licenses.py
        match_owners.py
notebooks/
    BioCLIP_data_viz.ipynb
    BioCLIP_taxa_viz.ipynb
    BioCLIP_taxa_viz.py
    BioCLIP_taxa_viz_bySource.ipynb
    ToL_EDA.ipynb
    ToL_catalog_EDA.ipynb
    ToL_catalog_EDA.py
    ToL_predicted-catalog_EDA.ipynb
    ToL_predicted-catalog_EDA.py
    make_ToL_hybrids_Arthropoda_EDA.ipynb
    missing_taxa_testGen.ipynb
rare_species/
    data/
        licenses.csv
        rarespecies-catalog.csv
        rarespecies_manifest.csv
visuals/
    category-v1-visuals/    # "catalog v1" visualizations, don't match published dataset
    kingdom_ToL_tree.html
    kingdom_ToL_tree.pdf
    phyla_ToL_tree.html
    phyla_ToL_tree.pdf
requirements.txt    # installation of these packages is sufficient for all code (notebooks & scripts) in this repo

Data

The data folder contains

  • catalog.csv: the metadata and identifiers for all images in the dataset. This includes original data source, unique identifier within TreeOfLife10M, and the associated taxa information for the image. This is the file that will be updated, while preserving the catalog-v1-dev.csv file for ease of comparison. v3.3 is the version of the catalog that was used for training BioCLIP v1 (it has the ~30K images we could not re-align).
  • stats_avg_std_byClass.csv: average and standard distribution of images given by class in catalog.csv. This is for both all images, and images that have labels.
  • predicted-catalog.csv: the metadata and identifiers for all entries expected in the dataset, prior to webdataset creation. This includes original data source, unique identifier within TreeOfLife10M, and the associated taxa information. In version 3.3 (first time it was generated), it showed 27K more entries than in the webdataset and they all had full taxonomic rank filled.
  • catalog-v1-dev.csv: the metadata and identifiers for all images in the dataset. This includes original data source, unique identifier within TreeOfLife10M, and the associated taxa information for the image. This file will be maintained for v1 reference, and as such will not be updated.
  • taxa_counts.csv: count of distinct lower taxa within each higher taxon from kingdom down to genus in catalog-v1-dev.csv, though the genus count was interrupted and therefore is incomplete.
  • missing_taxa_output.txt: output from the check taxa script, record of versions of catalog checked are indicated before the printout (text was copied from the terminal).
  • avg_std_byClass.csv: average and standard distribution of images in catalog-v1-dev.csv given by class (taxonomic rank). This is for both all images, and images that have labels. Note that kingdoms had not been merged and no standardization was performed on the taxonomic hierarchy prior to creation of this file.
  • tol_hierarchy_test.csv: Subset of catalog-v1-dev.csv for testing the check_taxa script to ensure the hierarchy is properly filled in after data generation.
  • licenses.csv: licensing information for all images in the catalog. This should match the published licenses.csv (SHA256 match), described in the metadata section of the TreeOfLife-10M Dataset Card.

Taxa Files

This subfolder of data/ explores instances of hemihomonyms (taxa in different kingdoms with matching Genus-species) in the dataset. One thought is that this may be part of the reason we had so many misclassifications into Arthropoda. There is a notebook that partially explores this (notebooks/make_ToL_hybrids_Arthropoda_EDA.ipynb) and two associated files (data/taxa_files/ToL_hybrids_Arthropoda.csv and data/taxa_files/sample_arthropoda_mislabels.txt which is a list of filenames for the sample images in data/taxa_files/sample_images/). More details are provided in the taxa_files README. This discovery lead to the re-resolution of the TreeOfLife-10M taxonomy from the original published dataset (TreeOfLife-10M (Revision 69ca82e), DOI: 10.57967/hf/1972, the reproducibility + embeddings update to the original is Revision ffa2a31, DOI: 10.57967/hf/7542).

Rare Species

All these files were generated in eol_realign/notebooks/re-gen_rs_catalog.ipynb.

  • licenses.csv: Licensing information for all rarespecies images (includes MD5s and links to catalog and manifest on rarespecies_id).
  • rarespecies_manifest.csv: Full manifest information for all images included in rarespecies catalog (may have some extra info from realign).
  • rarespecies-catalog.csv: Catalog of all images included in Rare Species dataset. For evaluation, Lisa generated a metadata.csv that cut the rarespecies-catalog.csv down to just the taxonomic columns with index, changing class to cls, common to common_name, and creating a filepath column ("2024-03-20/" + <eol_content_id> + "_" + <eol_page_id> + "_eol-full-size-copy.jpg"), with a class column indicating the sciName (though this could use a different ID depending on the evaluation).

EOL Re-align

More detail on the background of this process can be found in the links_align_reduced and links_rs_duplicates notebooks, as well as PR #5.

  • Data: More information on all the data can be found in the links_align_reduced and links_rs_duplicates notebooks. Just those of primary import and potential continued use are listed here.

    • checksums_media_cargo_archive.csv: MD5 of all EOL images in our cargo archive.
    • full_owner_manifset.csv: Record of all images from EOL that could potentially be used in the TreeOfLife-10M dataset, this has all the non-taxonomic EOL metadata for the EOL images included in the TreeOfLife-10M catalog (12,330,062 entries, gets reduced down during catalog re-generation), with MD5s aligned to filename (<eol_content_id>_<eol_page_id>_eol-full-size-copy.jpg).
    • rarespecies_full_manifest.csv: Record of all images from EOL that could potentially be used in the Rare Species dataset, i.e., manifest of all images from EOL of the 400 selected species, with MD5s aligned to filename (<eol_content_id>_<eol_page_id>_eol-full-size-copy.jpg).
  • Notebooks: (Require pandas).

    • catalog-cargo-manifest_test.ipynb: Generates eol_realign/data/full_owner_manifest.csv, this has all the non-taxonomic EOL metadata for the EOL images included in the TreeOfLife-10M catalog (12,330,062 entries, gets reduced down during catalog re-generation).
    • links_align_reduced.ipynb: Exploration of the degree to which we could realign the EOL files in our TreeOfLife-10M catalog to their associated metadata. There was some recovery from our original loss. Associated py file: links_align_reduced.py.
    • links_rs_duplicates.ipynb: Documentation of mismatches in the Rare Species dataset and suggestion for fixing them. Saves these in eol_realign/data/archive_mismatched_rarespecies.csv, and generates eol_realign/data/rarespecies_full_manifest.csv. Uses eol_realign/data/eol-cargo-archive_combined-manifest-checksums_links.csv, rarespecies-catalog-orig.csv, eol_realign/data/rarespecies_missing_pages_md5s.csv, eol_realign/data/eol_media_manifest_2024-03-11.csv, and media_manifest_missing_licenses_jul26_owners.csv. Associated py file: links_rs_duplicates.py.
    • re-gen_rs_catalog.ipynb: Notebook generating the updated rare species catalog, lisences, and manifest files. Generates new rarespecies_id; these are still distinct from treeoflife_ids in TreeOfLife-10M. Uses eol_realign/data/rarespecies_full_manifest.csvand rarespecies-catalog-orig.csv. Outputs: rare_species/data/rarespecies_manifest.csv, rare_species/data/licenses.csv, and rare_species/data/rarespecies-catalog.csv.
    • re-gen_tol_catalog.ipynb: Notebook updating catalog for TreeOfLife-10M (all EOL entries we could realign), along with the corresponding license file, and manifest with full information for the realigned entries. Uses eol_realign/data/combined-manifest-licenses.csv, catalog-orig-v3-3.csv. Outputs: eol_realign/data/full_owner_manifest.csv, data/licenses.csv, and data/catalog.csv.
  • Scripts: (Require pandas).

    • make_licenses.py: Adds license URLs to make the full manifest and license file.
    • match_owners.py: Adds extra licensing information toward making the full manifest. Uses eol_realign/data/eol-cargo-archive_catalog_combined-manifest-checksums_links.csv, makes eol_realign/data/combined_manifest.csv for generating final catalog.

Notebooks

The notebooks folder contains

  • ToL_catalog_EDA.ipynb: more full EDA of TreeOfLife10M dataset using catalog.csv. To be updated as catalog.csv is updated, i.e., as the dataset is updated.
  • ToL_catalog_EDA.py: py file paired to ToL_catalog_EDA.ipynb to facilitate diff checking in case of cell text changes in notebook.
  • ToL_predicted-catalog_EDA.ipynb: more full EDA of TreeOfLife10M dataset using predicted-catalog.csv. To be updated as predicted-catalog.csv is updated, i.e., as the dataset is updated.
  • ToL_predicted-catalog_EDA.py: py file paired to ToL_predicted-catalog_EDA.ipynb to facilitate diff checking in case of cell text changes in notebook.
  • BioCLIP_taxa_viz.ipynb: generates data visualizations, in particular, the generation of treemaps in visuals folder; also includes a histogram of kingdoms. The treemaps produced in the notebook are interactive and HTML interactive versions can also be found in visuals.
  • BioCLIP_data_viz.ipynb: notebook with quick basic stats for catalog-v1-dev.csv, generates taxa_counts.csv.
  • BioCLIP_taxa_viz_bySource.ipynb: generates data visualizations, in particular, the generation of visualizations in visuals folder and some histograms. The treemaps produced in the notebook are interactive.
  • ToL_EDA.ipynb: more full EDA of TreeOfLife10M dataset. Explores the labeling inconsistencies for direction of standardization efforts. Maintained for v1 reference, should not be updated.
  • make_ToL_hybrids_Arthropoda_EDA.ipynb:
  • missing_taxa_testGen.ipynb: generates tol_hierarchy_test.csv to test check_taxa script. Also observes species labeled as (unidentified) in EOL data.

Note: run pip install -r requirements.txt before starting the visualization notebooks. EDA notebooks only require pandas and seaborn.

Visuals

Visualizations generated to demonstrate the distribution and diversity within the phyla of TreeOfLife10M. These were created using the taxa_viz script.

  • category-v1-visuals: visualizations made for the original catalog-v1-dev.csv using BioCLIP_taxa_viz_bySource.ipynb. There is also one for just the iNat21 data included.
  • kingdom_ToL_tree.html: interactive treemap from kingdom to family to demonstrate the distribution of the data. 2:1 aspect ratio.
  • kingdom_ToL_tree.pdf: static treemap from kingdom to family to demonstrate the distribution of the data. 2:1 aspect ratio.
  • phyla_ToL_tree.html: interactive treemap from phylum to family to demonstrate the distribution of the data. 2:1 aspect ratio.
  • kingdom_ToL_tree.pdf: static treemap from phylum to family to demonstrate the distribution of the data. 2:1 aspect ratio.

Licensing Information

The images shared in this repository (data/taxa_files/sample_images/) are shared under their original licenses as indicated in data/taxa_files/metadata.csv.

The code in this repository is shared under an MIT license.

For more information on the dataset licensing and that of images mentioned or referenced throughout this repository, please see the TreeOfLife-10M license files. The data (images and text) contain a variety of licensing restrictions mostly within the CC family. Each image and text in this dataset is provided under the least restrictive terms allowed by its licensing requirements as provided to us (i.e, we impose no additional restrictions past those specified by licenses in the license file).

Please see the iNat21 terms of use for full information on use of their images.

All BIOSCAN-1M images are licensed under CC BY-NC-SA 4.0.

EOL images contain a variety of licenses ranging from CC0 to CC BY-NC-SA. For license and citation information by image, see the associated license files.

Acknowledgements

This work was supported by the Imageomics Institute, which is funded by the US National Science Foundation's Harnessing the Data Revolution (HDR) program under Award #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.

Citation

As noted in the description of this dataset, it is not a finished product intended for re-use, but is provided in as an act of open-science. If the exploration or scripts are re-used, please cite our paper:

@inproceedings{stevens2024bioclip,
  title = {{B}io{CLIP}: A Vision Foundation Model for the Tree of Life}, 
  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},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year = {2024},
  pages = {19412-19424}
}

See also the citation instructions for TreeOfLife-10M and the Rare Species Benchmark, and please be sure to also cite the original data sources and all constituent parts as appropriate.

  • iNat21:
@misc{inat2021,
  author={Van Horn, Grant and Mac Aodha, Oisin},
  title={iNat Challenge 2021 - FGVC8},
  publisher={Kaggle},
  year={2021},
  url={https://kaggle.com/competitions/inaturalist-2021}
}
  • BIOSCAN-1M:
@inproceedings{gharaee2023step,
    title={A Step Towards Worldwide Biodiversity Assessment: The {BIOSCAN-1M} Insect Dataset},
    booktitle = {Advances in Neural Information Processing Systems ({NeurIPS}) Datasets \& Benchmarks Track},
    author={Gharaee, Z. and Gong, Z. and Pellegrino, N. and Zarubiieva, I. and Haurum, J. B. and Lowe, S. C. and McKeown, J. T. A. and Ho, C. Y. and McLeod, J. and Wei, Y. C. and Agda, J. and Ratnasingham, S. and Steinke, D. and Chang, A. X. and Taylor, G. W. and Fieguth, P.},
    year={2023},
}

Dataset Card Author

Elizabeth G. Campolongo

Dataset Card Contact

Please use the Community Tab for questions. More information on the published project is available on our project website and at the references therein.

Downloads last month
5

Collection including imageomics/ToL-EDA

Paper for imageomics/ToL-EDA