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