library_name: keras
tags:
- burmese
- burma
- myanmar
- snake
- classifier
Model description
MM DeepSnake is an artificial intelligence project to classify snake species in Myanmar. We collect images all around Myanmar for training our model.
Current Version - Alpha - 1.0.0
Currently our model can understand 10 species of snakes. Some of the snakes are very much in species and hard to classify individual species. Therefore, we took genus as a categories.
At the moment, we support
- Trimeresurus_sp (Asian Palm Pit vipers) - မြွေစိမ်းမြီးခြောက်
- Rhadophis helleri (Heller Red necked keelback) - လည်ပင်းနီမြွေ
- Lycodon aulicus (Wolf Snake) - မြွေဝံပုလွေ
- Fowlea piscator (Checkered Keelback) - ရေမြွေဗျောက်မ
- Daboia siamensis (Eastern Russell's viper) - မြွေပွေး
- Chrysopelea ornata (Golden Tree Snake) - ထန်းမြွေ
- Bungarus fasciatus (Banded Krait) - ငန်းတော်ကြား
- Ophiophagus hannah(King Cobra) - တောကြီးမြွေဟောက်
- Laticauda colubrina (Sea Snake) - ဂျက်မြွေ
- Naja kaouthia (Cobra) - မြွေဟောက်
Here is sample code to use burmese_snake_classifier
import numpy as np
import tensorflow as tf
from huggingface_hub import from_pretrained_keras
pretrained_model = from_pretrained_keras('jojo-ai-mst/burmese_snake_classifier')
class_names = ['Bungarus fasciatus (Banded Krait)', 'Chrysopelea ornata (Golden Tree Snake)', "Daboia siamensis (Eastern Russell's viper)", 'Fowlea piscator (Checkered Keelback)', 'Laticauda colubrina (Sea Snake)', 'Lycodon aulicus (Wolf Snake)', 'Naja kaouthia(Cobra)', 'Ophiophagus_hannah(King Cobra)', 'Rhadophis helleri (Heller Red necked keelback)', 'Trimeresurus_sp (Asian Palm Pit vipers)']
def softmax_stable(x):
return(np.exp(x - np.max(x)) / np.exp(x - np.max(x)).sum())
def predict_img(input_img):
img_array = np.expand_dims(input_img, 0)
predictions = pretrained_model.predict(img_array)
score = tf.nn.softmax(predictions[0])
result = "This image most likely belongs to {} with a {:.2f} percent confidence.".format(class_names[np.argmax(score)], 100 * np.max(score))
return result
Intended uses & limitations
This model is open source for open source projects. Project that modifies, extends, derives from this model must mention the original model jojo-ai-mst/burmese_snake_classifier. Commercial use needs to be requested to the model contributor jojo-ai-mst.
We strongly alert that every snake bite case should go to professional medical staffs.
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
Hyperparameters | Value |
---|---|
name | Adam |
weight_decay | None |
clipnorm | None |
global_clipnorm | None |
clipvalue | None |
use_ema | False |
ema_momentum | 0.99 |
ema_overwrite_frequency | None |
jit_compile | False |
is_legacy_optimizer | False |
learning_rate | 9.999999747378752e-06 |
beta_1 | 0.9 |
beta_2 | 0.999 |
epsilon | 1e-07 |
amsgrad | False |
training_precision | float32 |