Snake_Identifier / README.md
rohitbalage's picture
Upload README.md with huggingface_hub
c02ada1 verified
|
Raw History Blame Contribute Delete
10.9 kB
metadata
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

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

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


🀝 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.