File size: 3,419 Bytes
f6a9332 9b671fd f6a9332 9b671fd f6a9332 9b671fd f6a9332 |
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 |
---
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
```python
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 |
## Model Plot
<details>
<summary>View Model Plot</summary>
![Model Image](./model.png)
</details> |