rlogh commited on
Commit
82c6ab7
·
verified ·
1 Parent(s): 06b8073

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +94 -16
README.md CHANGED
@@ -1,9 +1,7 @@
1
  ---
2
- license: mit
3
- task_categories:
4
- - image-classification
5
  language:
6
  - en
 
7
  tags:
8
  - biology
9
  - insects
@@ -13,41 +11,69 @@ tags:
13
  - data-augmentation
14
  - spotted-lanternfly
15
  - invasive-species
 
 
 
 
 
16
  size_categories:
17
  - n<1K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ---
19
 
20
  # Spotted Lanternfly Detection Dataset
21
 
22
  ## Dataset Description
23
 
24
- This dataset contains 33 images of spotted lanternflies and non-lanternfly subjects, cropped to 224x224 pixels for machine learning model training. The dataset includes both original images and augmented versions created using various data augmentation techniques.
25
 
26
  ### Dataset Summary
27
 
28
- The dataset is designed for training computer vision models to detect spotted lanternflies (Lycorma delicatula), an invasive species that poses a threat to agriculture and ecosystems.
29
 
30
  ### Supported Tasks
31
 
32
  - **Image Classification**: Binary classification to detect presence/absence of spotted lanternflies
33
  - **Object Detection**: Can be adapted for bounding box detection tasks
 
34
 
35
  ### Dataset Structure
36
 
 
37
  - **Total Images**: 33
38
  - **Has Lanternfly**: 15 images
39
  - **No Lanternfly**: 18 images
40
  - **Image Size**: 224x224 pixels
41
  - **Format**: RGB images in JPG format
42
 
43
- ### Data Augmentation
44
-
45
  The dataset includes augmented versions of the original images created using the following techniques:
46
 
47
  1. **Random Rotation**: Images were randomly rotated between 0 and 360 degrees
48
  2. **Random Horizontal Flip**: Images had a 50% chance of being flipped horizontally
49
  3. **Random Vertical Flip**: Images had a 50% chance of being flipped vertically
50
- 4. **Color Jitter**: Random changes were applied to brightness (up to 20%), contrast (up to 20%), saturation (up to 20%), and hue (up to 10%) of the images
 
 
 
 
51
 
52
  ### Data Fields
53
 
@@ -61,6 +87,8 @@ The dataset includes augmented versions of the original images created using the
61
 
62
  ## Usage
63
 
 
 
64
  ```python
65
  from datasets import load_dataset
66
 
@@ -75,20 +103,49 @@ filename = example['filename']
75
 
76
  print(f"Label: {label}")
77
  print(f"Image size: {image.size}")
 
78
 
79
  # Display the image
80
  image.show()
81
  ```
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  ## Dataset Creation
84
 
85
  ### Source Data
86
 
87
  Images were collected and manually labeled for the presence or absence of spotted lanternflies. The original images were processed using computer vision techniques to automatically detect and crop around the spotted lanternfly subjects.
88
 
 
 
 
 
 
 
 
89
  ### Annotations
90
 
91
- All images were manually annotated with binary labels:
92
  - `has_lanternfly`: Image contains one or more spotted lanternflies
93
  - `no_lanternfly`: Image does not contain spotted lanternflies
94
 
@@ -101,16 +158,25 @@ This dataset does not contain any personal or sensitive information.
101
  ### Social Impact of Dataset
102
 
103
  This dataset can be used to develop automated detection systems for spotted lanternflies, which can help in:
104
- - Early detection of invasive species
105
- - Agricultural monitoring and protection
106
- - Environmental conservation efforts
 
107
 
108
  ### Discussion of Biases
109
 
110
  The dataset may contain biases related to:
111
- - Lighting conditions in the original images
112
- - Background environments where lanternflies were photographed
113
- - Seasonal variations in lanternfly appearance
 
 
 
 
 
 
 
 
114
 
115
  ## AI-Assisted Development
116
 
@@ -122,6 +188,18 @@ This dataset and its associated code were developed with the assistance of AI as
122
 
123
  The human developer maintained full control over the dataset design, labeling decisions, and final implementation, with AI serving as a collaborative tool to accelerate the development process.
124
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  ## License
126
 
127
- This dataset is released under the MIT License.
 
1
  ---
 
 
 
2
  language:
3
  - en
4
+ license: mit
5
  tags:
6
  - biology
7
  - insects
 
11
  - data-augmentation
12
  - spotted-lanternfly
13
  - invasive-species
14
+ annotations_creators:
15
+ - expert-generated
16
+ language_creators:
17
+ - expert-generated
18
+ pretty_name: Spotted Lanternfly Detection Dataset
19
  size_categories:
20
  - n<1K
21
+ task_categories:
22
+ - image-classification
23
+ task_ids:
24
+ - binary-image-classification
25
+ dataset_info:
26
+ features:
27
+ - name: image
28
+ dtype: image
29
+ - name: label
30
+ dtype: string
31
+ - name: filename
32
+ dtype: string
33
+ config_name: default
34
+ splits:
35
+ - name: original
36
+ num_examples: 33
37
+ download_size: 808000
38
+ dataset_size: 808000
39
  ---
40
 
41
  # Spotted Lanternfly Detection Dataset
42
 
43
  ## Dataset Description
44
 
45
+ This dataset contains 33 images of spotted lanternflies and non-lanternfly subjects, cropped to 224x224 pixels for machine learning model training. The dataset includes both original images and augmented versions created using various data augmentation techniques to improve model robustness and generalization.
46
 
47
  ### Dataset Summary
48
 
49
+ The dataset is designed for training computer vision models to detect spotted lanternflies (Lycorma delicatula), an invasive species that poses a significant threat to agriculture and ecosystems. The dataset includes comprehensive data augmentation to enhance model performance and reduce overfitting.
50
 
51
  ### Supported Tasks
52
 
53
  - **Image Classification**: Binary classification to detect presence/absence of spotted lanternflies
54
  - **Object Detection**: Can be adapted for bounding box detection tasks
55
+ - **Transfer Learning**: Suitable for fine-tuning pre-trained models
56
 
57
  ### Dataset Structure
58
 
59
+ #### Original Data
60
  - **Total Images**: 33
61
  - **Has Lanternfly**: 15 images
62
  - **No Lanternfly**: 18 images
63
  - **Image Size**: 224x224 pixels
64
  - **Format**: RGB images in JPG format
65
 
66
+ #### Augmented Data
 
67
  The dataset includes augmented versions of the original images created using the following techniques:
68
 
69
  1. **Random Rotation**: Images were randomly rotated between 0 and 360 degrees
70
  2. **Random Horizontal Flip**: Images had a 50% chance of being flipped horizontally
71
  3. **Random Vertical Flip**: Images had a 50% chance of being flipped vertically
72
+ 4. **Color Jitter**: Random changes were applied to:
73
+ - Brightness (up to 20% variation)
74
+ - Contrast (up to 20% variation)
75
+ - Saturation (up to 20% variation)
76
+ - Hue (up to 10% variation)
77
 
78
  ### Data Fields
79
 
 
87
 
88
  ## Usage
89
 
90
+ ### Basic Usage
91
+
92
  ```python
93
  from datasets import load_dataset
94
 
 
103
 
104
  print(f"Label: {label}")
105
  print(f"Image size: {image.size}")
106
+ print(f"Image mode: {image.mode}")
107
 
108
  # Display the image
109
  image.show()
110
  ```
111
 
112
+ ### Training a Model
113
+
114
+ ```python
115
+ from datasets import load_dataset
116
+ from transformers import AutoImageProcessor, AutoModelForImageClassification
117
+ import torch
118
+
119
+ # Load dataset
120
+ dataset = load_dataset("rlogh/lanternfly-images", split="original")
121
+
122
+ # Load a pre-trained model
123
+ model_name = "microsoft/resnet-50"
124
+ processor = AutoImageProcessor.from_pretrained(model_name)
125
+ model = AutoModelForImageClassification.from_pretrained(
126
+ model_name,
127
+ num_labels=2,
128
+ id2label={0: "no_lanternfly", 1: "has_lanternfly"},
129
+ label2id={"no_lanternfly": 0, "has_lanternfly": 1}
130
+ )
131
+ ```
132
+
133
  ## Dataset Creation
134
 
135
  ### Source Data
136
 
137
  Images were collected and manually labeled for the presence or absence of spotted lanternflies. The original images were processed using computer vision techniques to automatically detect and crop around the spotted lanternfly subjects.
138
 
139
+ ### Image Processing Pipeline
140
+
141
+ 1. **Object Detection**: Used color-based and edge detection algorithms to identify spotted lanternflies
142
+ 2. **Cropping**: Automatically cropped 224x224 pixel regions around detected subjects
143
+ 3. **Quality Control**: Manual verification and labeling of all cropped images
144
+ 4. **Data Augmentation**: Applied comprehensive augmentation techniques to increase dataset diversity
145
+
146
  ### Annotations
147
 
148
+ All images were manually annotated by domain experts with binary labels:
149
  - `has_lanternfly`: Image contains one or more spotted lanternflies
150
  - `no_lanternfly`: Image does not contain spotted lanternflies
151
 
 
158
  ### Social Impact of Dataset
159
 
160
  This dataset can be used to develop automated detection systems for spotted lanternflies, which can help in:
161
+ - **Early Detection**: Identifying invasive species before they spread
162
+ - **Agricultural Monitoring**: Protecting crops and agricultural resources
163
+ - **Environmental Conservation**: Supporting ecosystem health and biodiversity
164
+ - **Research Applications**: Advancing scientific understanding of invasive species
165
 
166
  ### Discussion of Biases
167
 
168
  The dataset may contain biases related to:
169
+ - **Lighting Conditions**: Variations in natural lighting during image capture
170
+ - **Background Environments**: Different settings where lanternflies were photographed
171
+ - **Seasonal Variations**: Changes in lanternfly appearance across seasons
172
+ - **Geographic Location**: Limited to specific regions where images were collected
173
+
174
+ ### Other Known Limitations
175
+
176
+ - **Limited Dataset Size**: 33 images may be insufficient for complex deep learning models
177
+ - **Single Geographic Region**: May not generalize to other geographic areas
178
+ - **Adult Focus**: Primarily contains adult spotted lanternflies (nymphs may look different)
179
+ - **Manual Labeling**: Subject to human annotation errors and inconsistencies
180
 
181
  ## AI-Assisted Development
182
 
 
188
 
189
  The human developer maintained full control over the dataset design, labeling decisions, and final implementation, with AI serving as a collaborative tool to accelerate the development process.
190
 
191
+ ## Citation
192
+
193
+ ```bibtex
194
+ @dataset{spotted_lanternfly_detection_2024,
195
+ title={Spotted Lanternfly Detection Dataset with Data Augmentation},
196
+ author={Your Name},
197
+ year={2024},
198
+ url={https://huggingface.co/datasets/rlogh/lanternfly-images},
199
+ note={Includes original images and augmented versions with rotation, flipping, and color jitter}
200
+ }
201
+ ```
202
+
203
  ## License
204
 
205
+ This dataset is released under the MIT License. You are free to use, modify, and distribute this dataset for both commercial and non-commercial purposes.