egrace479 commited on
Commit
e570b24
1 Parent(s): ba3ca2d

Update README stats following deduplication

Browse files
Files changed (1) hide show
  1. README.md +33 -27
README.md CHANGED
@@ -51,11 +51,11 @@ configs:
51
  ### Dataset Summary
52
 
53
  Subset of the collection records from Chris Jiggins' research group at the University of Cambridge, collection covers nearly 20 years of field studies.
54
- This subset contains approximately 44,809 RGB images of 11,991 specimens (34,265 images of 10,109 specimens across all Heliconius). Many records have both images and locality data.
55
 
56
  Most images were photographed with a DSLR camera with a 100 mm macro-lens in standardized conditions.
57
  More information can be found at the individual Zenodo record pages.
58
- Images and full records with data are stored in the [EarthCape database](https://heliconius.ecdb.io/default.aspx) and on [Zenodo](https://zenodo.org/communities/butterfly?q=&l=list&p=1&s=10&sort=newest) (across 31 records from the Butterfly Genetics Group).
59
 
60
  Both dorsal and ventral images available. Contains both whole butterfly, and 4 wings separate. Large variation in image content.
61
 
@@ -73,11 +73,11 @@ English, Latin
73
 
74
  ## Dataset Structure
75
 
76
- * **Jiggins_Zenodo_Img_Master.csv:** Information for the approximately 45,0000 unprocessed image files included in the Jiggins Heliconius Collection. Image types are `jpg`, `raw` (.CR2) and `tif`. `genus`, `species`, and `subspecies` are included columns.
77
 
78
- * **Jiggins_Zenodo_dorsal_Img_Master.csv:** Subset of 22,175 images from `Jiggins_Zenodo_Img_Master.csv` with a dorsal view of the butterflies (note that some have both dorsal and ventral). This subset includes 12,296 unique specimens. Image types and columns are the same as for the Master file.
79
 
80
- * **Jiggins_Heliconius_Master.csv:** The 34,265-image subset of all Heliconius images from `Jiggins_Zenodo_Img_Master.csv`. This subset includes 10,109 unique specimens. IImage types and columns are the same as for the Master file.
81
 
82
 
83
  **Notes:**
@@ -87,7 +87,7 @@ English, Latin
87
  - Be advised that there may be overlap between images in [record 2548678](https://zenodo.org/records/2548678) and [record 3082688](https://zenodo.org/records/3082688).
88
  - The `scripts` folder has a download and checksum script.
89
  - Images are downloaded to the provided images directory with subfolders labeled by the `Taxonomic_Name`, with filenames `<X>_<Image_name>`.
90
- - The checksum script is called by `download_jiggins_subset.py` to generate an MD5 for all download images and creates a CSV with `filepath`, `filename`, and `md5` columns in the same folder as the source CSV (named `<source CSV>_checksums.csv`). This helps to ensure FAIR and Reproducible results, though this will _**not**_ distinguish between the raw and jpg versions of the same image.
91
  - A log of the download is also generated in the same folder as the source CSV (named `<source CSV>_log.json`).
92
  - `metadata/Missing_taxa_Jiggins_Zenodo_Master.csv` contains a record of the images that did not have easily reconcilable taxonomic information (see `notebooks/standardize_datasets.ipynb` for more information on this data). There are 1,630 such images distributed across 18 records.
93
 
@@ -95,15 +95,15 @@ English, Latin
95
 
96
  `Jiggins_Heliconius_Master.csv` contains multiple species of Heliconius (including erato and melpomene), most are labeled down to the subspecies level. The `Jiggins_Zenodo_Img_Master.csv` also contains species from other genera, with just over half labeled to the subspecies level (these are predominantly Heliconius subspecies).
97
 
98
- Detached wings in four quadrants (generally).
99
  Some subspecies may be photographed differently, needs segmentation preprocessing.
100
 
101
- * **Type:** JPG/jpg/tif(very few)
102
  * **Size (x pixels by y pixels):** Unknown yet
103
  * **Background (color or none):** multiple (needs to be normalized, often grey or lime green)
104
- * **Fit in frame:**
105
  * **Ruler or Scale:** Some with Ruler
106
- * **Color (ColorChecker, white-balance, None):** None
107
 
108
  #### Preprocessing steps (to be done):
109
  1. Hybrid separation - some images labeled as _H. erato_ and _H. melpomene_ without subspecies names are hybrids and need to be determined what subspecies they are.
@@ -119,9 +119,9 @@ CSV Columns are as follows:
119
 
120
  - `CAMID`: Unique identifier for each specimen that was photographed. Each `CAMID` corresponds to multiple images (based on factors such as `View` and `file_type`).
121
  - `X`: Unique identifier for each line in the master CSV.
122
- - `Image_name`: Filename of image (not unique, often `CAM<CAMID>_<v or d>`).
123
- - `View`: View of the butterfly in the image: `dorsal`, `ventral`, `forewing dorsal`, `hindwing dorsal`, `forewing ventral`, `hindwing ventral`, `dorsal and ventral`.
124
- - `zenodo_name`: Name of the CSV file with metadata used to populate this file from the associated Zenodo record.
125
  - `zenodo_link`: URL for the Zenodo record of the image.
126
  - `Sequence`: Mostly numeric IDs, not unique, please see the associated Zenodo record for more information on the meaning of these designations.
127
  - `Taxonomic_Name`: Indication of the Genus, species, and possibly, subspecies, of the specimen. For Cross Types, the hybrid names are reduced to just the two subspecies (from the `Cross_Type` column) and non-specified crosses are labeled `<Genus> <species> cross hybrid`.
@@ -133,9 +133,9 @@ CSV Columns are as follows:
133
  - `Dataset`: Overall collection the images belong to: `Heliconiine Butterfly Collection Records from University of Cambridge` (largely, but not entirely Heliconius), `Patricio Salazar`, `Nadeau Sheffield`, `Bogota Collection (Camilo Salazar)`, `Cambridge Collection`, `Mallet`, `Merril_Gamboa`, `STRI Collection (Owen)`. Please see the associated Zenodo record for more information on the meaning of these designations.
134
  - `Store`: Storage location for specimen (`Box ###`).
135
  - `Brood`: Likely indicator of batch of butterflies. Please see the associated Zenodo record for more information on the meaning of these designations.
136
- - `Death_Date`: Date of specimen death. Only noted for 318 images.
137
- - `Cross_Type`: Laboratory cross breeding information. There is a mix of F1 (subspecies x subspecies), F2 (F1 x F1), and backcross (F1 x subspecies) hybrids. Generally, the order of the subspecies listed in the cross corresponds to the sexes of the parents (Maternal x Paternal). There are approximately 5,000 such images; on average, there are both raw and jpg images of the specimens for each view, so this covers 820 unique specimens.
138
- - `Stage`: Life stage of the specimen. Only 15 specimens have a non-null value for this feature, and they are all labeled as `Adult`.
139
  - `Sex`: Sex of the specimen: `Male`, `Female`, or `Unknown`.
140
  - `Unit_Type`: Type of the specimen: `wild`, `reared`, `Mutant`, `Wild`, `e11`, or `e12`. Please see the associated Zenodo record for more information on the meaning of these designations.
141
  - `file_type`: Image type: `jpg`, `raw` (.CR2), or `tif`.
@@ -145,12 +145,15 @@ CSV Columns are as follows:
145
  - `genus`: Genus of the specimen. There are 94 unique genera represented in the full collection.
146
  - `file_url`: URL to download image from Zenodo: `zenodo_link + "/files/" + Image_name`. Allows for sample image display in [data dashboard](https://huggingface.co/spaces/imageomics/dashboard-prototype).
147
  - `hybrid_stat`: Hybrid status of the sample: `hybrid`, `non-hybrid`, or `None`. Hybrids are determined by an ` x ` or `hybrid` in the `Taxonomic_Name` column, all other images classified to the _subspecies_ level are labeled as `non-hybrid`, and the parent species of the one species-level hybrid is labeled as `non-hybrid` (only one of them is present in the dataset).
 
 
 
148
 
149
  **Note:**
150
- - `Jiggins_Zenodo_dorsal_Img_Master.csv` also has a column `CAM_dupe` indicating whether the `CAMID` has multiple images within this subset.
151
- - We do not leave the first instance as a non-duplicate, so to have a clear assessment of all duplication (eg., is it just across a couple records, file types, etc).
152
- - `CAMID`s are necessarily duplicated for the images that are of just a dorsal forewing or hindwing, so we label those as `single_wing`.
153
- - There are multiple jpg images & multiple raw images of the same specimen. Note that this does not necessarily mean these are duplicates of the same images. There are also jpg copies provided alongside raw images.
154
 
155
  <!--
156
  ### Data Splits
@@ -162,7 +165,7 @@ CSV Columns are as follows:
162
 
163
  ### Curation Rationale
164
 
165
- The Butterfly Genetics Group has a large collection of butterfly images distributed across 31 Zenodo records. They do not all have the same information, and it is sometimes only provided in the record, but not the metadata. With this collection, we combine the provided information (metadata) into a shared format that is easily ingested into ML pipelines. We also add some other labels of interest (based on identification determined by the Butterfly Genetics Group), and endeavor to remove duplication, noting potential points of duplication and providing some assessment tools to help prevent data leakage.
166
 
167
  Additionally, these datasets are prepared in a format that allows for easy integration with the Imageomics Institute's [Data Dashboard](https://huggingface.co/spaces/imageomics/dashboard-prototype) for distribution statistics and easy sampling of images by taxonomic information and view.
168
 
@@ -187,9 +190,12 @@ None
187
  ### Discussion of Biases and Other Known Limitations
188
 
189
  - This dataset is imbalanced. Even among the Heliconius subset, some subspecies are more heavily represented than others.
190
- - There are a mix of valid subspecies and hybrids that are labeled as such, but there are also images of butterflies classified only to the genus or species level, for which such a designation may not be clearly made (there are also instances of "_Heliconius <species> hybrid_", where the parent subspecies are not indicated.
191
  - There may be overlap between images in [record 2548678](https://zenodo.org/records/2548678) and [record 3082688](https://zenodo.org/records/3082688).
192
- - There are multiple images of the same specimen for many specimens; sometimes this is due to different views (eg., dorsal or ventral side), sometimes it is due to JPG copies of the RAW photos, though it is also sometimes that new photos were taken of the same specimen at a different times.
 
 
 
193
 
194
 
195
  ## Additional Information
@@ -199,19 +205,19 @@ None
199
  * Christopher Lawrence (Princeton University) - ORCID: 0000-0002-3846-5968
200
  * Chris Jiggins (University of Cambridge) - ORCID: 0000-0002-7809-062X
201
  * Butterfly Genetics Group (University of Cambridge)
202
- * Elizabeth G. Campolongo - ORCID: 0000-0003-0846-2413
203
 
204
  ### Licensing Information
205
 
206
  The data (images and text) are all licensed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). 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 this license on the original source files). Modified images are only restricted by this original license.
207
 
208
- Images can be matched to their source record through the `zenodo_link` column in the Master CSVs to the `url` in the licenses.json file.
209
 
210
  ### Citation Information
211
 
212
- Christopher Lawrence, Chris Jiggins, Butterfly Genetics Group (University of Cambridge), Elizabeth Campolongo. (2024). Jiggins Heliconius Collection. Hugging Face. https://huggingface.co/datasets/imageomics/Jiggins_Heliconius_Collection.
213
 
214
- If you use this dataset, please cite the original datasets (citations for all 31 Zenodo records are in licenses.json) as well as this curated subset.
215
 
216
  ### Contributions
217
 
 
51
  ### Dataset Summary
52
 
53
  Subset of the collection records from Chris Jiggins' research group at the University of Cambridge, collection covers nearly 20 years of field studies.
54
+ This subset contains approximately 36,211 RGB images of 11,968 specimens (29,134 images of 10,086 specimens across all Heliconius). Many records have both images and locality data.
55
 
56
  Most images were photographed with a DSLR camera with a 100 mm macro-lens in standardized conditions.
57
  More information can be found at the individual Zenodo record pages.
58
+ Images and full records with data are stored in the [EarthCape database](https://heliconius.ecdb.io/default.aspx) and on [Zenodo](https://zenodo.org/communities/butterfly?q=&l=list&p=1&s=10&sort=newest) (across 29 records from the Butterfly Genetics Group).
59
 
60
  Both dorsal and ventral images available. Contains both whole butterfly, and 4 wings separate. Large variation in image content.
61
 
 
73
 
74
  ## Dataset Structure
75
 
76
+ * **Jiggins_Zenodo_Img_Master.csv:** Information for the approximately 36,0000 unprocessed image files included in the Jiggins Heliconius Collection. Image types are `jpg`, `raw` (.CR2) and `tif`. `genus`, `species`, and `subspecies` are included columns.
77
 
78
+ * **Jiggins_Zenodo_dorsal_Img_Master.csv:** Subset of 17,759 images from `Jiggins_Zenodo_Img_Master.csv` with a dorsal view of the butterflies (note that some have both dorsal and ventral). This subset includes 11,752 unique specimens. Image types and columns are the same as for the Master file.
79
 
80
+ * **Jiggins_Heliconius_Master.csv:** The 29,134-image subset of all Heliconius images from `Jiggins_Zenodo_Img_Master.csv`. This subset includes 10,086 unique specimens. Image types and columns are the same as for the Master file.
81
 
82
 
83
  **Notes:**
 
87
  - Be advised that there may be overlap between images in [record 2548678](https://zenodo.org/records/2548678) and [record 3082688](https://zenodo.org/records/3082688).
88
  - The `scripts` folder has a download and checksum script.
89
  - Images are downloaded to the provided images directory with subfolders labeled by the `Taxonomic_Name`, with filenames `<X>_<Image_name>`.
90
+ - The checksum script is called by `download_jiggins_subset.py` to generate an MD5 for all downloaded images and creates a CSV with `filepath`, `filename`, and `md5` columns in the same folder as the source CSV (named `<source CSV>_checksums.csv`). This helps to ensure FAIR and Reproducible results, though this will _**not**_ distinguish between RAW and JPG versions of the same image.
91
  - A log of the download is also generated in the same folder as the source CSV (named `<source CSV>_log.json`).
92
  - `metadata/Missing_taxa_Jiggins_Zenodo_Master.csv` contains a record of the images that did not have easily reconcilable taxonomic information (see `notebooks/standardize_datasets.ipynb` for more information on this data). There are 1,630 such images distributed across 18 records.
93
 
 
95
 
96
  `Jiggins_Heliconius_Master.csv` contains multiple species of Heliconius (including erato and melpomene), most are labeled down to the subspecies level. The `Jiggins_Zenodo_Img_Master.csv` also contains species from other genera, with just over half labeled to the subspecies level (these are predominantly Heliconius subspecies).
97
 
98
+ Detached wings in four quadrants (generally). Many include a label indicating the specimen ID (`CAMID`). There is variation in formatting both across and within records, but overall setup is relatively consistent.
99
  Some subspecies may be photographed differently, needs segmentation preprocessing.
100
 
101
+ * **Type:** RAW (`.CR2`), JPG, and TIFF (very few)
102
  * **Size (x pixels by y pixels):** Unknown yet
103
  * **Background (color or none):** multiple (needs to be normalized, often grey or lime green)
104
+ * **Fit in frame:** varies
105
  * **Ruler or Scale:** Some with Ruler
106
+ * **Color (ColorChecker, white-balance, None):** some with ColorChecker, many with white reflectance standard in the bottom right corner.
107
 
108
  #### Preprocessing steps (to be done):
109
  1. Hybrid separation - some images labeled as _H. erato_ and _H. melpomene_ without subspecies names are hybrids and need to be determined what subspecies they are.
 
119
 
120
  - `CAMID`: Unique identifier for each specimen that was photographed. Each `CAMID` corresponds to multiple images (based on factors such as `View` and `file_type`).
121
  - `X`: Unique identifier for each line in the master CSV.
122
+ - `Image_name`: Filename of image (unique, often `CAM<CAMID>_<v or d>`).
123
+ - `View`: View of the butterfly in the image: `dorsal`, `ventral`, `forewing dorsal`, `hindwing dorsal`, `forewing ventral`, `hindwing ventral`, or `dorsal and ventral`.
124
+ - `zenodo_name`: Name of the CSV file with metadata from the associated Zenodo record used to populate the information about this image.
125
  - `zenodo_link`: URL for the Zenodo record of the image.
126
  - `Sequence`: Mostly numeric IDs, not unique, please see the associated Zenodo record for more information on the meaning of these designations.
127
  - `Taxonomic_Name`: Indication of the Genus, species, and possibly, subspecies, of the specimen. For Cross Types, the hybrid names are reduced to just the two subspecies (from the `Cross_Type` column) and non-specified crosses are labeled `<Genus> <species> cross hybrid`.
 
133
  - `Dataset`: Overall collection the images belong to: `Heliconiine Butterfly Collection Records from University of Cambridge` (largely, but not entirely Heliconius), `Patricio Salazar`, `Nadeau Sheffield`, `Bogota Collection (Camilo Salazar)`, `Cambridge Collection`, `Mallet`, `Merril_Gamboa`, `STRI Collection (Owen)`. Please see the associated Zenodo record for more information on the meaning of these designations.
134
  - `Store`: Storage location for specimen (`Box ###`).
135
  - `Brood`: Likely indicator of batch of butterflies. Please see the associated Zenodo record for more information on the meaning of these designations.
136
+ - `Death_Date`: Date of specimen death. Only noted for 269 images.
137
+ - `Cross_Type`: Laboratory cross breeding information. There is a mix of F1 (subspecies x subspecies), F2 (F1 x F1), and backcross (F1 x subspecies) hybrids; these are all crosses of _Heliconius erato_ and _Heliconius melpomene_ subspecies. Generally, the order of the subspecies listed in the cross corresponds to the sexes of the parents (Maternal x Paternal). There are approximately 4,400 such images; on average, there are both raw and jpg images of the specimens for each view, so this covers 820 unique specimens.
138
+ - `Stage`: Life stage of the specimen. Only 6 images (3 specimens) have a non-null value for this feature, and they are all labeled as `Adult`.
139
  - `Sex`: Sex of the specimen: `Male`, `Female`, or `Unknown`.
140
  - `Unit_Type`: Type of the specimen: `wild`, `reared`, `Mutant`, `Wild`, `e11`, or `e12`. Please see the associated Zenodo record for more information on the meaning of these designations.
141
  - `file_type`: Image type: `jpg`, `raw` (.CR2), or `tif`.
 
145
  - `genus`: Genus of the specimen. There are 94 unique genera represented in the full collection.
146
  - `file_url`: URL to download image from Zenodo: `zenodo_link + "/files/" + Image_name`. Allows for sample image display in [data dashboard](https://huggingface.co/spaces/imageomics/dashboard-prototype).
147
  - `hybrid_stat`: Hybrid status of the sample: `hybrid`, `non-hybrid`, or `None`. Hybrids are determined by an ` x ` or `hybrid` in the `Taxonomic_Name` column, all other images classified to the _subspecies_ level are labeled as `non-hybrid`, and the parent species of the one species-level hybrid is labeled as `non-hybrid` (only one of them is present in the dataset).
148
+ - `filename`: Unique filename assigned to image at download (`<X>_<Image_name>.<jpg/tif/CR2>`) using `scripts/download_jiggins_subset.py`.
149
+ - `filepath`: Filepath of the downloaded image (`<image_folder>/<Taxonomic_Name>/<filename>`) using `scripts/download_jiggins_subset.py`.
150
+ - `md5`: MD5 of the downloaded image. This was used as the measure of uniqueness (at the pixel level) to address duplication of images across Zenodo records.
151
 
152
  **Note:**
153
+ - `Jiggins_Zenodo_dorsal_Img_Master.csv` also has a column `CAM_dupe` indicating whether the `CAMID` has multiple images of the same file type within this subset. Most (11,452) specimens have only one dorsal image per file type.
154
+ - `CAMID`s are necessarily duplicated for the images that are of just a dorsal forewing or hindwing, so we label those as `single_wing`. There are one RAW and one JPG image for each single wing. None of these are Heliconius butterflies.
155
+ - Instances of both dorsal and ventral wings in the same image are labeled `both-wings`; there are 18 such images, all of Heliconius butterflies.
156
+ - There are multiple JPG images with the same `CAMID`. Note that this does not necessarily mean these are duplicates of the same images; check the views to confirm. There are also JPG copies provided alongside RAW images. Generally, RAW images will be unique up to `View`, as there is only one CAMID with two RAW images that aren't of just a single wing.
157
 
158
  <!--
159
  ### Data Splits
 
165
 
166
  ### Curation Rationale
167
 
168
+ The Butterfly Genetics Group has a large collection of butterfly images distributed across 31 Zenodo records. They do not all have the same information, and it is sometimes only provided in the record, but not the metadata. With this collection, we combine the provided information (metadata) into a shared format that is easily ingested into ML pipelines. We also add some other labels of interest (based on identification determined by the Butterfly Genetics Group), and endeavor to remove duplication, noting potential points of duplication and providing some assessment tools to help prevent data leakage. This de-duplication effort reduced the overall dataset to covering only 29 of these records, and it is documented in the `deduplication_process` directory.
169
 
170
  Additionally, these datasets are prepared in a format that allows for easy integration with the Imageomics Institute's [Data Dashboard](https://huggingface.co/spaces/imageomics/dashboard-prototype) for distribution statistics and easy sampling of images by taxonomic information and view.
171
 
 
190
  ### Discussion of Biases and Other Known Limitations
191
 
192
  - This dataset is imbalanced. Even among the Heliconius subset, some subspecies are more heavily represented than others.
193
+ - Not all images are labeled with the same detail. There are a mix of valid subspecies and hybrids that are labeled as such, but there are also images of butterflies classified only to the genus or species level, for which such a designation may not be clearly made. These images are limited to classification tasks only down to the level of their label. There are also instances of "_Heliconius <species> hybrid_", where the parent subspecies are not indicated because it was labeled only as a hybrid of that species.
194
  - There may be overlap between images in [record 2548678](https://zenodo.org/records/2548678) and [record 3082688](https://zenodo.org/records/3082688).
195
+ - There are multiple images of the same specimen for many specimens; sometimes this is due to different views (eg., dorsal or ventral side), sometimes it is due to JPG copies of the RAW photos, though it seems it is also sometimes that new photos were taken of the same specimen at a different times.
196
+ - The master files contain only images that were determined to be unique (at the pixel level) through MD5 checksum. This does _**not**_ guarantee that there are not images that are cropped copies of other photos. For instance, [record 2553977](https://zenodo.org/records/2553977) has a number of images with `_cut_` in their name, some of which are close-up crops of the butterfly wings (though not all, some are just close-ups of the full butterfly).
197
+
198
+ Please see the [`deduplication_process/README.md`]() for more details on the deduplication process and recommendations on how to split this data effectively without data leakage.
199
 
200
 
201
  ## Additional Information
 
205
  * Christopher Lawrence (Princeton University) - ORCID: 0000-0002-3846-5968
206
  * Chris Jiggins (University of Cambridge) - ORCID: 0000-0002-7809-062X
207
  * Butterfly Genetics Group (University of Cambridge)
208
+ * Elizabeth G. Campolongo (Imageomics Institute, The Ohio State University) - ORCID: 0000-0003-0846-2413
209
 
210
  ### Licensing Information
211
 
212
  The data (images and text) are all licensed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/). 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 this license on the original source files). Modified images are only restricted by this original license.
213
 
214
+ Images can be matched to their source record through the `zenodo_link` or `record_number` column in the Master CSVs to the `url` or `record_number` in the licenses.json file, respectively.
215
 
216
  ### Citation Information
217
 
218
+ Christopher Lawrence, Chris Jiggins, Butterfly Genetics Group (University of Cambridge), Elizabeth G. Campolongo. (2024). Jiggins Heliconius Collection. Hugging Face. https://huggingface.co/datasets/imageomics/Jiggins_Heliconius_Collection.
219
 
220
+ If you use this dataset, please cite the original datasets (citations for all 29 included Zenodo records are in [jiggins.bib]()) as well as this curated subset.
221
 
222
  ### Contributions
223