egrace479 commited on
Commit
b19ef89
·
verified ·
1 Parent(s): 0f81549

Add metadata file for the Separate segmented split subset of the data (#18)

Browse files

- Add metadata file for the Separate segmented split subset of the data (29d450bafed2877b1da6f0bd9c61d9e17a73f391)
- Add description of segmented individuals image subset (c53bbaeec8ffb283fee283212174ab05ded0e9fa)
- clarify individual images in the dataset and point to the code used to create them (71b0d989f924adab0b4961328719913a0d9ecf6f)
- add clarification on species/subspecies in segmentation split and reference to genera list (c16940b7c9e3e360f977bed5df1f0914dbb84034)

README.md CHANGED
@@ -27,6 +27,10 @@ configs:
27
  - config_name: resized_images
28
  data_files:
29
  - "beetle_images_resized/*.jpg"
 
 
 
 
30
  ---
31
  <!-- - config_name: individual_images
32
  data_files:
@@ -71,9 +75,17 @@ The individual images were segemented out based on scaling the elytra measuremen
71
 
72
  In `group_images` we have 577 images of multiple beetles in a reasonably regular pattern (see sample image below). Each of these images contains a centimeter-based scalebar and a barcode representing the sample (collection of beetles in the image). Each row in `BeetleMeasurements.csv` corresponds to a measurement of the elytra (length or width) of an individual beetle.
73
 
74
- The `individual_images` directory contains images of each individual segmented from the group images. These connect back to their group image based on the `individualID`.
75
 
 
 
76
 
 
 
 
 
 
 
77
  ```
78
  /dataset/
79
  group_images/
@@ -86,11 +98,22 @@ The `individual_images` directory contains images of each individual segmented f
86
  <pictureID 2>.jpg
87
  ...
88
  <pictureID 577>.jpg
89
- individual_images/
90
- <individualID 1>.jpg
91
- <individualID 2>.jpg
 
 
 
 
 
 
 
 
 
 
 
 
92
  ...
93
- <individualID 11459>.jpg
94
  BeetleMeasurements.csv
95
  BeetleMeasurements_resized.csv
96
  individual_metadata.csv
@@ -103,8 +126,11 @@ The `individual_images` directory contains images of each individual segmented f
103
 
104
  The `group_images` folder has all 577 orignal full size images. The `beetle_images_resized` folder has the resized (approximately 1MB) images used for annotation in Zooniverse (1MB was the size limitation imposed by the software); aspect ratio was maintained in the resize. <!-- >, and the code used can be found [here](). -->
105
 
106
- Segmentation was completed by adapting the elytra length and width annotations to generate the xy point input for the [Segment Anything (SAM)]() model. [Segment Anything (SAM)]() was then used to segment the individual beetles. More information and the code for this process is provided in the [Imageomics/2018-NEON-beetles-processing repo](https://github.com/Imageomics/2018-NEON-beetles-processing).
107
 
 
 
 
108
 
109
  |![picture of beetles in A00000046094](https://huggingface.co/datasets/imageomics/BeetlePalooza/resolve/main/group_images/A00000046094.jpg)|
110
  |:--|
@@ -145,8 +171,15 @@ Segmentation was completed by adapting the elytra length and width annotations t
145
  - See notebooks in the [Beetle Processing Repository](https://github.com/Imageomics/2018-NEON-beetles-processing) for more information and analyses of these values, addition and renaming of the above columns from the [original measurement CSV](https://huggingface.co/datasets/imageomics/2018-NEON-beetles/blob/bbefad05d50ed55da82e99bd330afe12a5fd1d97/BeetleMeasurements.csv), and the creation of the individual metadata CSV.
146
  - `BeetleMeasurements_resized.csv` has `pictureID`, `scientificName`, `genus`, `species`, `NEON_sampleID`, `siteID`, and `file_name` columns to display the resized images in the dataset viewer with some group image-level information. It will match up to information from `BeetleMeasurments.csv` on `pictureID`, though this is _not_ a unique alignment since it's not a unique ID for `BeetleMeasurements.csv`, but is for the resize.
147
 
 
 
 
 
 
 
 
148
 
149
- **individual_metadata.csv**:
150
  - `individualID`: ID of beetle in the individual image (`<measureID_length>_<measureID_width>`). This is a unique identifier for this CSV.
151
  - `combinedID`: Generated from `PictureID` (minus the `.jpg`) plus `_<individual>`. (Matches `combinedID` in `BeetleMeasurements.csv`.)
152
  - `lying_flat`: Whether or not the beetle is lying _flat_ in the image (`Yes` or `No`). This does _NOT_ correlate to vertical or horizontal alignment; it is whether the individual is twisted to one side or not--a side effect of how they died. Generally, the measured width will be shorter than the true width if this is `No`.
@@ -166,7 +199,7 @@ Segmentation was completed by adapting the elytra length and width annotations t
166
 
167
 
168
  ### Data Splits
169
- This dataset does not have train-test splits.
170
 
171
  ## Dataset Creation
172
 
 
27
  - config_name: resized_images
28
  data_files:
29
  - "beetle_images_resized/*.jpg"
30
+ - config_name: "separate segmented splits"
31
+ data_files:
32
+ - "Separate_segmented_train_test_splits_80_20/*/*/*.jpg"
33
+ - "metadata.csv"
34
  ---
35
  <!-- - config_name: individual_images
36
  data_files:
 
75
 
76
  In `group_images` we have 577 images of multiple beetles in a reasonably regular pattern (see sample image below). Each of these images contains a centimeter-based scalebar and a barcode representing the sample (collection of beetles in the image). Each row in `BeetleMeasurements.csv` corresponds to a measurement of the elytra (length or width) of an individual beetle.
77
 
78
+ `Separate_segmented_train_test_splits_80_20` contains individual images of 11 different species of beetles. There are 12 folders, but melanarius melanarius is a subspecies designation for melanarius, so it should not be considered a species distinction. These images are divided into an 80-20 train-test split, and further separated into subfolders based on their species (as shown below).
79
 
80
+ <!-- Still to be added:
81
+ The `individual_images` directory contains images of each individual segmented from the group images. These connect back to their group image based on the `individualID`.
82
 
83
+ individual_images/
84
+ <individualID 1>.jpg
85
+ <individualID 2>.jpg
86
+ ...
87
+ <individualID 11459>.jpg
88
+ -->
89
  ```
90
  /dataset/
91
  group_images/
 
98
  <pictureID 2>.jpg
99
  ...
100
  <pictureID 577>.jpg
101
+ Separate_segmented_train_test_splits_80_20
102
+ test/
103
+ <species 1>/
104
+ <species 2>/
105
+ ...
106
+ <species 12>/
107
+ train/
108
+ <species 1>/
109
+ <species 2>/
110
+ ...
111
+ <species 12>/
112
+ metadata.csv
113
+ separate_segmented_beetle_images/
114
+ <pictureID 1>.jpg
115
+ <pictureID 2>.jpg
116
  ...
 
117
  BeetleMeasurements.csv
118
  BeetleMeasurements_resized.csv
119
  individual_metadata.csv
 
126
 
127
  The `group_images` folder has all 577 orignal full size images. The `beetle_images_resized` folder has the resized (approximately 1MB) images used for annotation in Zooniverse (1MB was the size limitation imposed by the software); aspect ratio was maintained in the resize. <!-- >, and the code used can be found [here](). -->
128
 
129
+ The code used to produce the images and splits in `Separate_segmented_train_test_splits_80_20/` is provided [here](https://github.com/Imageomics/2018-NEON-beetles-processing/blob/main/notebooks/Beetle_Palooza_image_separation.ipynb).
130
 
131
+ <!-- images not provided here
132
+ Segmentation was completed by adapting the elytra length and width annotations to generate the xy point input for the [Segment Anything (SAM)]() model. [Segment Anything (SAM)]() was then used to segment the individual beetles. More information and the code for this process is provided in the [Imageomics/2018-NEON-beetles-processing repo](https://github.com/Imageomics/2018-NEON-beetles-processing).
133
+ -->
134
 
135
  |![picture of beetles in A00000046094](https://huggingface.co/datasets/imageomics/BeetlePalooza/resolve/main/group_images/A00000046094.jpg)|
136
  |:--|
 
171
  - See notebooks in the [Beetle Processing Repository](https://github.com/Imageomics/2018-NEON-beetles-processing) for more information and analyses of these values, addition and renaming of the above columns from the [original measurement CSV](https://huggingface.co/datasets/imageomics/2018-NEON-beetles/blob/bbefad05d50ed55da82e99bd330afe12a5fd1d97/BeetleMeasurements.csv), and the creation of the individual metadata CSV.
172
  - `BeetleMeasurements_resized.csv` has `pictureID`, `scientificName`, `genus`, `species`, `NEON_sampleID`, `siteID`, and `file_name` columns to display the resized images in the dataset viewer with some group image-level information. It will match up to information from `BeetleMeasurments.csv` on `pictureID`, though this is _not_ a unique alignment since it's not a unique ID for `BeetleMeasurements.csv`, but is for the resize.
173
 
174
+ **Separate_segmented_train_test_splits_80_20/metadata.csv**: metadata file for the segmented individuals in the `Separate_segmented_train_test_splits_80_20` folder.
175
+ - `filename`: name of image file (`beetle_<number code>.png`).
176
+ - `md5`: MD5 hash of the image (unique identifier).
177
+ - `species`: species epithet of the beetle in the image. _Note:_ melanarius melanarius is a subspecies designation of melanarius. Genera are as described [here](https://huggingface.co/datasets/imageomics/2018-NEON-beetles/discussions/18#67bcabad85e7281434139a8a), re-alignment is pending.
178
+ - `split`: `train` or `test`, 80\% of the images are in the training set.
179
+ - `file_name`: path to the image from the `Separate_segmented_train_test_splits_80_20` folder to display in the dataset viewer.
180
+ - `subset`: label given to this subset of the full image dataset (as selected in the viewer): `separate segmented splits`.
181
 
182
+ **individual_metadata.csv**: This CSV was created for individual images that have not yet been added to this repository.
183
  - `individualID`: ID of beetle in the individual image (`<measureID_length>_<measureID_width>`). This is a unique identifier for this CSV.
184
  - `combinedID`: Generated from `PictureID` (minus the `.jpg`) plus `_<individual>`. (Matches `combinedID` in `BeetleMeasurements.csv`.)
185
  - `lying_flat`: Whether or not the beetle is lying _flat_ in the image (`Yes` or `No`). This does _NOT_ correlate to vertical or horizontal alignment; it is whether the individual is twisted to one side or not--a side effect of how they died. Generally, the measured width will be shorter than the true width if this is `No`.
 
199
 
200
 
201
  ### Data Splits
202
+ This dataset has a subset of the group images segmented to individuals and divided into an 80-20 train-test split in `Separate_segmented_train_test_splits_80_20/`.
203
 
204
  ## Dataset Creation
205
 
Separate_segmented_train_test_splits_80_20/metadata.csv ADDED
The diff for this file is too large to render. See raw diff