rohitbalage commited on
Commit
c02ada1
Β·
verified Β·
1 Parent(s): 3ac469f

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +303 -21
README.md CHANGED
@@ -1,54 +1,336 @@
1
- # Rstar Snake Identifier V1
2
 
3
- A lightweight snake species image classification model developed for offline mobile and edge AI applications.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  The model uses EfficientNetB0 transfer learning and fine-tuning on the SnakeCLEF2023 dataset to classify 377 snake species.
6
 
7
- ## Model specifications
 
 
 
 
8
 
9
  | Parameter | Value |
10
  |---|---|
 
 
11
  | Architecture | EfficientNetB0 |
12
  | Framework | TensorFlow / Keras |
13
  | Task | Image Classification |
 
14
  | Training images | 90,498 |
15
  | Validation images | 8,561 |
 
16
  | Supported species | 377 |
17
  | Input resolution | 224 Γ— 224 Γ— 3 |
18
  | Input color format | RGB |
19
  | Pixel range | 0–255 |
 
20
  | Output activation | Softmax |
 
21
  | Available formats | Keras, TFLite Float16, TFLite INT8 |
22
  | Target platforms | Android, mobile and edge devices |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- ## Features
25
 
26
- - Offline snake species classification
27
- - Mobile-optimized model variants
28
- - Scientific species name predictions
29
- - Top-K classification support
30
- - TensorFlow Lite compatibility
31
 
32
- ## Training dataset
33
 
34
- The model was trained using selected species from SnakeCLEF2023, with a pretrained EfficientNetB0 backbone.
35
 
36
- Dataset: https://www.imageclef.org/node/319
37
 
38
- ## Intended use
 
 
 
39
 
40
- Educational applications, wildlife recognition experiments, mobile machine learning development and research.
41
 
42
- ## Limitations
43
 
44
- The model supports a limited number of snake species and cannot reliably reject unfamiliar species or non-snake images.
45
 
46
- Predictions may be incorrect and must not be used to determine whether a snake is safe to approach or handle. This model is not intended for medical or emergency decision-making.
47
 
48
- ## Evaluation
 
 
 
 
 
 
 
49
 
50
- Detailed validation metrics and per-species evaluation reports will be provided.
51
 
52
- ## License
53
 
54
- Pending verification of upstream model and training dataset licensing requirements.
 
 
1
 
2
+ ---
3
+ language:
4
+ - en
5
+ library_name: tensorflow
6
+ pipeline_tag: image-classification
7
+ tags:
8
+ - snake-identification
9
+ - image-classification
10
+ - wildlife
11
+ - biodiversity
12
+ - efficientnet
13
+ - tensorflow
14
+ - keras
15
+ - tflite
16
+ - android
17
+ - mobile-ai
18
+ - edge-ai
19
+ - snakeclef2023
20
+ ---
21
+
22
+ # 🐍 Rstar Snake Identifier V1
23
+
24
+ A lightweight snake species image classification model developed by **Rohit Balage** for offline mobile and edge AI applications.
25
 
26
  The model uses EfficientNetB0 transfer learning and fine-tuning on the SnakeCLEF2023 dataset to classify 377 snake species.
27
 
28
+ This project aims to contribute to the open machine learning community by making mobile-oriented wildlife recognition technology more accessible to developers, researchers and students.
29
+
30
+ ---
31
+
32
+ ## πŸ“Š Model Specifications
33
 
34
  | Parameter | Value |
35
  |---|---|
36
+ | Model name | Rstar Snake Identifier V1 |
37
+ | Developer | Rohit Balage |
38
  | Architecture | EfficientNetB0 |
39
  | Framework | TensorFlow / Keras |
40
  | Task | Image Classification |
41
+ | Training dataset | SnakeCLEF2023 |
42
  | Training images | 90,498 |
43
  | Validation images | 8,561 |
44
+ | Total selected images | 99,059 |
45
  | Supported species | 377 |
46
  | Input resolution | 224 Γ— 224 Γ— 3 |
47
  | Input color format | RGB |
48
  | Pixel range | 0–255 |
49
+ | Image preprocessing | Resize with padding |
50
  | Output activation | Softmax |
51
+ | Output classes | 377 |
52
  | Available formats | Keras, TFLite Float16, TFLite INT8 |
53
  | Target platforms | Android, mobile and edge devices |
54
+ | Internet required for inference | No |
55
+ | Model version | 1.0.0 |
56
+
57
+ ---
58
+
59
+ ## ✨ Features
60
+
61
+ - Offline snake species classification.
62
+ - Recognition of 377 supported snake species.
63
+ - Mobile-optimized model variants.
64
+ - Scientific species name predictions.
65
+ - Top-K classification support.
66
+ - TensorFlow Lite compatibility.
67
+ - Float16 and INT8 quantization.
68
+ - Support for further training and fine-tuning.
69
+ - Designed for on-device machine learning applications.
70
+
71
+ ---
72
+
73
+ ## πŸ“ Repository Structure
74
+
75
+ | File | Description |
76
+ |---|---|
77
+ | rstar_snake_final.keras | Original trained Keras model |
78
+ | rstar_snake_float16.tflite | Float16 optimized TensorFlow Lite model |
79
+ | rstar_snake_int8.tflite | Integer-quantized TensorFlow Lite model |
80
+ | labels.txt | Ordered list of 377 supported species |
81
+ | class_mapping.json | Species-to-model-index mapping |
82
+ | model_metadata.json | Model configuration and specifications |
83
+ | snake_species_info.json | Species reference metadata |
84
+ | README.md | Model documentation |
85
+
86
+ The Keras model is intended for researchers and developers who wish to further train, evaluate or optimize the model.
87
+
88
+ The TensorFlow Lite variants are intended for mobile and edge AI deployment.
89
+
90
+ ---
91
+
92
+ ## 🧠 Model Architecture
93
+
94
+ The model is based on EfficientNetB0 with pretrained ImageNet weights.
95
+
96
+ The original classification head was replaced with a custom classification head supporting 377 snake species.
97
+
98
+ The training process involved:
99
+
100
+ 1. Dataset collection and extraction.
101
+ 2. Metadata analysis and cleaning.
102
+ 3. Snake species selection.
103
+ 4. Training and validation dataset preparation.
104
+ 5. Image preprocessing and augmentation.
105
+ 6. Transfer learning using EfficientNetB0.
106
+ 7. Fine-tuning selected pretrained layers.
107
+ 8. Model evaluation and checkpoint selection.
108
+ 9. TensorFlow Lite conversion.
109
+ 10. Float16 and INT8 quantization.
110
+
111
+ This model was developed through transfer learning and fine-tuning rather than training the entire neural network from scratch.
112
+
113
+ ---
114
+
115
+ ## πŸ“š Training Dataset
116
+
117
+ This model was trained using selected images and species metadata from the **SnakeCLEF2023 dataset**.
118
+
119
+ SnakeCLEF is a research initiative focused on automatic snake species identification using machine learning and computer vision.
120
+
121
+ ### Dataset Statistics
122
+
123
+ | Dataset | Images |
124
+ |---|---:|
125
+ | Training | 90,498 |
126
+ | Validation | 8,561 |
127
+ | Total | 99,059 |
128
+ | Selected species | 377 |
129
+
130
+ ### Original Dataset
131
+
132
+ - Dataset: SnakeCLEF2023
133
+ - Official website: https://www.imageclef.org/SnakeCLEF2023
134
+ - ImageCLEF: https://www.imageclef.org/
135
+
136
+ The original training images are not included in this model repository.
137
+
138
+ ---
139
+
140
+ ## ❀️ Dataset Credits and Acknowledgements
141
+
142
+ Special thanks and full credit to **Lukas Picek** and the entire **SnakeCLEF2023 research and organizing team** for their work in collecting, organizing and making snake species data available to the machine learning research community.
143
+
144
+ Their contribution provided the foundation for the development of this model.
145
+
146
+ I would also like to acknowledge:
147
+
148
+ - The SnakeCLEF and ImageCLEF research communities.
149
+ - The original wildlife photographers.
150
+ - The iNaturalist community and its contributors.
151
+ - The HerpMapper community and its contributors.
152
+ - Researchers, herpetologists and citizen scientists who contributed species observations and annotations.
153
+ - The original EfficientNet researchers.
154
+ - The TensorFlow and Keras development communities.
155
+
156
+ All original photographs remain the intellectual property of their respective copyright holders and are subject to their applicable licenses.
157
+
158
+ I do not claim ownership or authorship of the original photographs, SnakeCLEF2023 dataset, EfficientNet architecture or upstream pretrained weights.
159
+
160
+ My contribution to this project consists of dataset preparation, species selection, model training, fine-tuning, evaluation, quantization and optimization for mobile deployment.
161
+
162
+ This project is an independent contribution and is not officially affiliated with or endorsed by SnakeCLEF, ImageCLEF, iNaturalist, HerpMapper or Google.
163
+
164
+ ### Original Image Sources
165
+
166
+ - iNaturalist: https://www.inaturalist.org/
167
+ - HerpMapper: https://www.herpmapper.org/
168
+
169
+ ### EfficientNet Reference
170
+
171
+ Tan, M. and Le, Q. V. (2019).
172
+
173
+ EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks.
174
+
175
+ Research paper: https://arxiv.org/abs/1905.11946
176
+
177
+ ---
178
+
179
+ ## βš™οΈ Input and Output
180
+
181
+ ### Model Input
182
+
183
+ | Parameter | Value |
184
+ |---|---|
185
+ | Width | 224 pixels |
186
+ | Height | 224 pixels |
187
+ | Channels | 3 |
188
+ | Color format | RGB |
189
+ | Pixel range | 0–255 |
190
+ | Resize method | Aspect-ratio-preserving resize with padding |
191
+
192
+ The Float16 model uses Float16 weight storage. Its actual input and output tensor types should be inspected before integration.
193
+
194
+ For the INT8 model, use the quantization scale and zero-point values provided by the TensorFlow Lite interpreter.
195
+
196
+ ### Model Output
197
+
198
+ The model produces 377 classification scores corresponding to the species listed in labels.txt.
199
+
200
+ The output indices must remain aligned with the original labels.txt and class_mapping.json files.
201
+
202
+ Model scores should not be interpreted as guaranteed probabilities of correct identification.
203
+
204
+ ---
205
+
206
+ ## πŸ“± Android and Mobile Integration
207
+
208
+ This model is designed for offline inference on Android and other compatible edge devices.
209
+
210
+ Potential integrations include:
211
+
212
+ - TensorFlow Lite / LiteRT.
213
+ - Android CameraX.
214
+ - Live camera image classification.
215
+ - Gallery image classification.
216
+ - Wildlife education applications.
217
+ - Mobile biodiversity research tools.
218
+
219
+ The model can perform inference locally without requiring a cloud inference service.
220
+
221
+ ---
222
+
223
+ ## πŸ“ˆ Model Evaluation
224
+
225
+ The model was evaluated using a validation dataset containing 8,561 images.
226
+
227
+ Evaluation includes:
228
+
229
+ - Top-1 accuracy.
230
+ - Top-5 accuracy.
231
+ - Validation loss.
232
+ - Balanced accuracy.
233
+ - Species-level precision.
234
+ - Species-level recall.
235
+ - F1-score.
236
+ - Confusion matrix analysis.
237
+ - External image testing.
238
+ - TensorFlow Lite model comparison.
239
+
240
+ Detailed numerical evaluation results and species-level performance reports will be added when finalized.
241
+
242
+ Independent test-set performance has not yet been established.
243
+
244
+ ---
245
+
246
+ ## 🎯 Intended Use
247
+
248
+ This model is intended for:
249
+
250
+ - Educational applications.
251
+ - Machine learning research.
252
+ - Wildlife recognition experiments.
253
+ - Biodiversity awareness.
254
+ - Android machine learning development.
255
+ - Computer vision experiments.
256
+ - Mobile and edge AI research.
257
+ - Further model training and optimization.
258
+
259
+ ---
260
+
261
+ ## ⚠️ Limitations
262
+
263
+ - The model supports only 377 selected snake species.
264
+ - It does not cover every snake species in the world.
265
+ - Visually similar species may be incorrectly classified.
266
+ - Performance may vary depending on image quality, lighting, orientation and background.
267
+ - Some species have significantly fewer training images than others.
268
+ - The model cannot reliably reject unfamiliar snake species.
269
+ - Non-snake images may produce incorrect snake predictions.
270
+ - Quantization may affect prediction accuracy.
271
+ - Species reference metadata may be incomplete.
272
+ - The model does not directly detect venom.
273
+
274
+ ---
275
+
276
+ ## 🚨 Safety Disclaimer
277
+
278
+ This model is an experimental machine learning system intended for educational and research purposes.
279
+
280
+ Snake species predictions may be incorrect, even when the model produces a high classification score.
281
+
282
+ Never use this model to determine whether a snake is safe to approach, touch, capture or handle.
283
+
284
+ The model must not be used for medical diagnosis, snakebite treatment, antivenom selection or emergency decision-making.
285
+
286
+ Suspected snakebites require immediate professional medical attention.
287
+
288
+ ---
289
+
290
+ ## πŸ“œ License
291
+
292
+ The licensing status of the trained model weights is pending verification of the applicable upstream model and SnakeCLEF2023 dataset terms.
293
+
294
+ No unrestricted redistribution or commercial-use permission is granted by this README.
295
+
296
+ Original datasets, photographs, pretrained weights and third-party software remain subject to their respective licenses.
297
+
298
+ Dataset attribution does not replace the requirement to comply with applicable licensing conditions.
299
 
300
+ Model binaries should not be publicly distributed until the relevant redistribution permissions have been established.
301
 
302
+ ---
 
 
 
 
303
 
304
+ ## πŸ‘¨β€πŸ’» Developer
305
 
306
+ **Rohit Balage**
307
 
308
+ Mobile Application Developer | Android | Machine Learning | Edge AI
309
 
310
+ - Website: https://rrbofficial.com/
311
+ - GitHub: https://github.com/rohitbalage
312
+ - LinkedIn: https://www.linkedin.com/in/rohitbalage/
313
+ - Hugging Face: https://huggingface.co/rohitbalage
314
 
315
+ ---
316
 
317
+ ## 🀝 Contributions
318
 
319
+ Feedback, research suggestions, performance evaluations and recommendations for improving species recognition are welcome.
320
 
321
+ Future development goals include:
322
 
323
+ - Expanding supported snake species.
324
+ - Improving classification accuracy.
325
+ - Improving recognition of underrepresented species.
326
+ - Adding non-snake image rejection.
327
+ - Adding unknown-species detection.
328
+ - Improving model confidence calibration.
329
+ - Further mobile inference optimization.
330
+ - Improving species reference metadata.
331
 
332
+ ---
333
 
334
+ Developed as part of the Rstar initiative to explore practical, accessible and offline mobile AI technologies.
335
 
336
+ **Built with TensorFlow, Keras, EfficientNet and TensorFlow Lite.**