smenon8 commited on
Commit
9b01739
Β·
verified Β·
1 Parent(s): 9140f39

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -73
README.md CHANGED
@@ -46,29 +46,40 @@ containing the embeddings for all images in the [imageomics/TreeOfLife-10M](http
46
  - **Paper:**
47
 
48
 
49
- <!-- Provide a longer summary of what this dataset is. -->
50
- [More Information Needed]
51
 
 
 
 
52
 
 
53
 
54
- ## Dataset Structure
55
-
 
56
 
 
57
 
58
- ### Data Fields
59
- [More Information Needed]
60
- <!--
61
- Describe the types of the data files or the columns in a CSV with metadata.
62
-
63
- Ex:
64
- **metadata.csv**:
65
- - `img_id`: Unique identifier for the dataset.
66
- - `specimen_id`: ID of specimen in the image, provided by museum data source. There are multiple images of a single specimen.
67
- - `species`: Species of the specimen in the image. There are N different species of <genus> of <animal>.
68
- - `view`: View of the specimen in the image (e.g., `ventral` or `dorsal` OR `top` or `bottom`, etc.; specify options where reasonable).
69
- - `file_name`: Relative path to image from the root of the directory (`<species>/<img_id>.png`); allows for image to be displayed in the dataset viewer alongside its associated metadata.
70
- -->
71
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  ## Dataset Creation
74
 
@@ -78,16 +89,6 @@ Ex:
78
  [imageomics/TreeOfLife-10M](https://huggingface.co/datasets/imageomics/TreeOfLife-10M) dataset was used as the source to generate all the embeddings in the vector database.
79
 
80
 
81
-
82
- #### Who are the source data producers?
83
- [More Information Needed]
84
- <!-- This section describes the people or systems who originally created the data.
85
-
86
- Ex: This dataset is a collection of images taken of the butterfly collection housed at the Ohio State University Museum of Biological Diversity. The associated labels and metadata are the information provided with the collection from biologists that study butterflies and supplied the specimens to the museum.
87
- -->
88
-
89
-
90
-
91
  ## Citation
92
 
93
  **BibTeX:**
@@ -100,62 +101,20 @@ Ex: This dataset is a collection of images taken of the butterfly collection hou
100
  url = {https://huggingface.co/datasets/imageomics/tree-of-life-vector-db},
101
  }
102
  ```
103
- <!--
104
- If you want to include BibTex, replace "<>"s with your info
105
-
106
- **Data**
107
- ```
108
- @misc{<ref_code>,
109
- author = {sreejithmenon},
110
- title = {<title>},
111
- year = {<year>},
112
- url = {https://huggingface.co/datasets/imageomics/tree-of-life-vector-db},
113
- doi = {<doi once generated>},
114
- publisher = {Hugging Face}
115
- }
116
- ```
117
-
118
- -for an associated paper:
119
- **Paper**
120
- ```
121
- @article{<ref_code>,
122
- title = {<title>},
123
- author = {<author1 and author2>},
124
- journal = {<journal_name>},
125
- year = <year>,
126
- url = {<DOI_URL>},
127
- doi = {<DOI>}
128
- }
129
- ```
130
- -->
131
-
132
- <!---
133
- If the data is modified from another source, add the following.
134
-
135
- Please be sure to also cite the original data source(s):
136
- <citation>
137
- -->
138
 
139
 
140
  ## Acknowledgements
141
 
142
  This work was supported by the [Imageomics Institute](https://imageomics.org), which 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.
143
 
144
- <!-- You may also want to credit the source of your data, i.e., if you went to a museum or nature preserve to collect it. -->
145
-
146
- ## Glossary
147
-
148
- <!-- [optional] If relevant, include terms and calculations in this section that can help readers understand the dataset or dataset card. -->
149
-
150
- ## More Information
151
 
152
- <!-- [optional] Any other relevant information that doesn't fit elsewhere. -->
153
 
154
  ## Dataset Card Authors
155
 
156
- [More Information Needed]
157
 
158
  ## Dataset Card Contact
159
 
160
- [More Information Needed--optional]
161
- <!-- Could include who to contact with questions, but this is also what the "Discussions" tab is for. -->
 
46
  - **Paper:**
47
 
48
 
49
+ This dataset contains the generated vector database built using ChromaDb as the backend vector database solution for the entire TreeOfLife-10M dataset.
 
50
 
51
+ The rationale behind creating a vector database was to enable blazingly fast nearest neighbor search.
52
+ The vector database is loaded into memory and for a given query embedding in the same dimension as the vectors in the database, we calculate the inner product (ip) to calculate distances.
53
+ In this case all vectors are of the same dimension i.e. 512 dims.
54
 
55
+ The files in this dataset are binaries and cannot be read in raw format. The files in this dataset are intended to be used with chromadb.
56
 
57
+ Below is an example usage:
58
+ ```py
59
+ import chromadb
60
 
61
+ client = chromadb.PersistentClient(path=self._collection_dir)
62
 
63
+ collection = client.get_or_create_collection(
64
+ name="imageomics/TreeOfLife-10M",
65
+ metadata={"hnsw:space": "ip", "hnsw:search_ef": 10},
66
+ )
67
+ # returns ID of 10 nearest neighbor. If an exact match exists,
68
+ # that will be the first returned result with a distance of 0.
69
+ collection.query(query_embeddings=[query_embedding], n_results=10)
70
+ ```
 
 
 
 
 
71
 
72
+ ## Dataset Structure
73
+ ```
74
+ tol_vector_db/
75
+ β”œβ”€β”€ 97283350-138c-49b4-a4d4-9b93a33960da/
76
+ β”‚ β”œβ”€β”€ header.bin
77
+ β”‚ β”œβ”€β”€ index_metadata.pickle
78
+ β”‚ β”œβ”€β”€ data_level0.bin
79
+ β”‚ β”œβ”€β”€ link_lists.bin
80
+ β”‚ └── length.bin
81
+ └── chroma.sqlite3
82
+ ```
83
 
84
  ## Dataset Creation
85
 
 
89
  [imageomics/TreeOfLife-10M](https://huggingface.co/datasets/imageomics/TreeOfLife-10M) dataset was used as the source to generate all the embeddings in the vector database.
90
 
91
 
 
 
 
 
 
 
 
 
 
 
92
  ## Citation
93
 
94
  **BibTeX:**
 
101
  url = {https://huggingface.co/datasets/imageomics/tree-of-life-vector-db},
102
  }
103
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
 
106
  ## Acknowledgements
107
 
108
  This work was supported by the [Imageomics Institute](https://imageomics.org), which 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.
109
 
110
+ Speical thanks to:
111
+ * [Matt Thompson](https://github.com/thompsonmj)
 
 
 
 
 
112
 
 
113
 
114
  ## Dataset Card Authors
115
 
116
+ [Sreejith Menon](https://github.com/smenon8)
117
 
118
  ## Dataset Card Contact
119
 
120
+ [Sreejith Menon](https://github.com/smenon8)