egrace479 commited on
Commit
f67d594
·
verified ·
1 Parent(s): 2f0184d

Update README.md

Browse files

Add in explanation of new EOL Re-align files and the rare-species files, plus links back to original catalogs for TreeOfLife-10M and Rare Species prior to the re-align (as used for v3.3).

Files changed (1) hide show
  1. README.md +35 -6
README.md CHANGED
@@ -10,17 +10,47 @@ This repo contains the analysis of the TreeOfLife10M dataset as it's being craft
10
  ### Data
11
 
12
  The `data` folder contains
13
- - `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.
14
- - `stats_avg_std_byClass.csv`: average and standard distribution of images given by class in `catalog.csv`. This is for both all
15
  images, and images that have labels.
16
- - `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.
17
-
18
  - `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.
19
  - `taxa_counts.csv`: count of distinct lower taxa within each higher taxon from `kingdom` down to
20
  `genus` in `catalog-v1-dev.csv`, though the genus count was interrupted and therefore is incomplete.
21
  - `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.
22
  - `tol_hierarchy_test.csv`: Subset of `catalog-v1-dev.csv` for testing the [`check_taxa` script](https://github.com/Imageomics/open_clip/blob/main/scripts/evobio10m/check_taxa.py) to ensure the hierarchy is properly filled in after data generation.
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  ### Notebooks
26
 
@@ -29,8 +59,7 @@ The `notebooks` folder contains
29
  - `ToL_catalog_EDA.py`: py file paired to `ToL_catalog_EDA.ipynb` to facilitate diff checking in case of cell text changes in notebook.
30
  - `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.
31
  - `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.
32
- - `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`](https://huggingface.co/datasets/imageomics/ToL-EDA/tree/main/visuals).
33
-
34
  - `BioCLIP_data_viz.ipynb`: notebook with quick basic stats for `catalog-v1-dev.csv`, generates `taxa_counts.csv`.
35
  - `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.
36
  - `ToL_EDA.ipynb`: more full EDA of TreeOfLife10M dataset. Explores the labeling inconsistencies for
 
10
  ### Data
11
 
12
  The `data` folder contains
13
+ - `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`](https://huggingface.co/datasets/imageomics/ToL-EDA/blob/d6b583841aed8c0df314e718735756b76164a933/data/catalog.csv) is the version of the catalog that was used for training [BioCLIP v1](https://doi.org/10.57967/hf/1511) (it has the ~30K images we could not re-align).
14
+ - `stats_avg_std_byClass.csv`: average and standard distribution of images given by class in `catalog.csv`. This is for both all
15
  images, and images that have labels.
16
+ - `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.
 
17
  - `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.
18
  - `taxa_counts.csv`: count of distinct lower taxa within each higher taxon from `kingdom` down to
19
  `genus` in `catalog-v1-dev.csv`, though the genus count was interrupted and therefore is incomplete.
20
  - `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.
21
  - `tol_hierarchy_test.csv`: Subset of `catalog-v1-dev.csv` for testing the [`check_taxa` script](https://github.com/Imageomics/open_clip/blob/main/scripts/evobio10m/check_taxa.py) to ensure the hierarchy is properly filled in after data generation.
22
 
23
+ ### Rare Species
24
+ All these files were generated in `eol_realign/notebooks/re-gen_rs_catalog.ipynb`.
25
+ - `licenses.csv`: Licensing information for all rarespecies images (includes MD5s and links to catalog and manifest on `rarespecies_id`).
26
+ - `rarespecies_manifest.csv`: Full manifest information for all images included in rarespecies catalog (may have some extra info from realign).
27
+ - `rarespecies-catalog.csv`: Catalog of all images included in [Rare Species dataset](https://huggingface.co/imageomics/rare-species).
28
+ 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).
29
+
30
+
31
+ ### EOL Re-align
32
+
33
+ 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](https://huggingface.co/datasets/imageomics/ToL-EDA/discussions/5).
34
+ #### Data
35
+ More information on all the datacan be found in the `links_align_reduced` and `links_rs_duplicates` notebooks. Just those of primary import and potential continued use are listed here.
36
+
37
+ - `checksums_media_cargo_archive.csv`: MD5 of all EOL images in our cargo archive.
38
+ - `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`).
39
+ - `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`).
40
+
41
+ #### Notebooks
42
+ - `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).
43
+ - `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`.
44
+ - `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`](https://huggingface.co/datasets/imageomics/ToL-EDA/blob/5db838a9db980f4cf96027b326b06e0f42df0c65/rare_species/data/rarespecies-catalog.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`](https://huggingface.co/datasets/imageomics/eol/blob/main/owners_info_fix/media_manifest_missing_licenses_jul26_owners.csv). Associated `py` file: `links_rs_duplicates.py`.
45
+ - `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_id`s in TreeOfLife-10M. Uses `eol_realign/data/rarespecies_full_manifest.csv`and [`rarespecies-catalog-orig.csv`](https://huggingface.co/datasets/imageomics/ToL-EDA/blob/5db838a9db980f4cf96027b326b06e0f42df0c65/rare_species/data/rarespecies-catalog.csv).
46
+ Outputs: `rare_species/data/rarespecies_manifest.csv`, `rare_species/data/licenses.csv`, and `rare_species/data/rarespecies-catalog.csv`.
47
+ - `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`](https://huggingface.co/datasets/imageomics/ToL-EDA/blob/d6b583841aed8c0df314e718735756b76164a933/data/catalog.csv).
48
+ Outputs: `eol_realign/data/full_owner_manifest.csv`, `data/licenses.csv`, and `data/catalog.csv`.
49
+
50
+ #### Scripts
51
+ Require `pandas`.
52
+ - `make_licenses.py`: Adds license URLs to make the full manifest and license file.
53
+ - `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.
54
 
55
  ### Notebooks
56
 
 
59
  - `ToL_catalog_EDA.py`: py file paired to `ToL_catalog_EDA.ipynb` to facilitate diff checking in case of cell text changes in notebook.
60
  - `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.
61
  - `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.
62
+ - `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`](https://huggingface.co/datasets/imageomics/ToL-EDA/tree/main/visuals).
 
63
  - `BioCLIP_data_viz.ipynb`: notebook with quick basic stats for `catalog-v1-dev.csv`, generates `taxa_counts.csv`.
64
  - `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.
65
  - `ToL_EDA.ipynb`: more full EDA of TreeOfLife10M dataset. Explores the labeling inconsistencies for