Commit
·
41a82a8
1
Parent(s):
9b671fd
Push Keras model using huggingface_hub.
Browse files- README.md +2 -55
- fingerprint.pb +1 -1
- saved_model.pb +2 -2
- variables/variables.data-00000-of-00001 +1 -1
- variables/variables.index +0 -0
README.md
CHANGED
@@ -1,67 +1,14 @@
|
|
1 |
---
|
2 |
library_name: keras
|
3 |
-
tags:
|
4 |
-
- burmese
|
5 |
-
- burma
|
6 |
-
- myanmar
|
7 |
-
- snake
|
8 |
-
- classifier
|
9 |
---
|
10 |
|
11 |
## Model description
|
12 |
|
13 |
-
|
14 |
-
We collect images all around Myanmar for training our model.
|
15 |
-
|
16 |
-
Current Version - **Alpha - 1.0.0**
|
17 |
-
|
18 |
-
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.
|
19 |
-
|
20 |
-
At the moment, we support
|
21 |
-
- Trimeresurus_sp (Asian Palm Pit vipers) - မြွေစိမ်းမြီးခြောက်
|
22 |
-
- Rhadophis helleri (Heller Red necked keelback) - လည်ပင်းနီမြွေ
|
23 |
-
- Lycodon aulicus (Wolf Snake) - မြွေဝံပုလွေ
|
24 |
-
- Fowlea piscator (Checkered Keelback) - ရေမြွေဗျောက်မ
|
25 |
-
- Daboia siamensis (Eastern Russell's viper) - မြွေပွေး
|
26 |
-
- Chrysopelea ornata (Golden Tree Snake) - ထန်းမြွေ
|
27 |
-
- Bungarus fasciatus (Banded Krait) - ငန်းတော်ကြား
|
28 |
-
- Ophiophagus hannah(King Cobra) - တောကြီးမြွေဟောက်
|
29 |
-
- Laticauda colubrina (Sea Snake) - ဂျက်မြွေ
|
30 |
-
- Naja kaouthia (Cobra) - မြွေဟောက်
|
31 |
-
|
32 |
-
|
33 |
-
Here is sample code to use burmese_snake_classifier
|
34 |
-
|
35 |
-
```python
|
36 |
-
import numpy as np
|
37 |
-
import tensorflow as tf
|
38 |
-
from huggingface_hub import from_pretrained_keras
|
39 |
-
|
40 |
-
pretrained_model = from_pretrained_keras('jojo-ai-mst/burmese_snake_classifier')
|
41 |
-
|
42 |
-
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)']
|
43 |
-
|
44 |
-
def softmax_stable(x):
|
45 |
-
return(np.exp(x - np.max(x)) / np.exp(x - np.max(x)).sum())
|
46 |
-
|
47 |
-
def predict_img(input_img):
|
48 |
-
img_array = np.expand_dims(input_img, 0)
|
49 |
-
predictions = pretrained_model.predict(img_array)
|
50 |
-
score = tf.nn.softmax(predictions[0])
|
51 |
-
|
52 |
-
result = "This image most likely belongs to {} with a {:.2f} percent confidence.".format(class_names[np.argmax(score)], 100 * np.max(score))
|
53 |
-
|
54 |
-
return result
|
55 |
-
|
56 |
-
```
|
57 |
|
58 |
## Intended uses & limitations
|
59 |
|
60 |
-
|
61 |
-
Project that modifies, extends, derives from this model must mention the original model **jojo-ai-mst/burmese_snake_classifier**.
|
62 |
-
Commercial use needs to be requested to the model contributor **jojo-ai-mst**.
|
63 |
-
|
64 |
-
We strongly alert that every **snake bite** case should go to professional medical staffs.
|
65 |
|
66 |
## Training and evaluation data
|
67 |
|
|
|
1 |
---
|
2 |
library_name: keras
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
4 |
|
5 |
## Model description
|
6 |
|
7 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
## Intended uses & limitations
|
10 |
|
11 |
+
More information needed
|
|
|
|
|
|
|
|
|
12 |
|
13 |
## Training and evaluation data
|
14 |
|
fingerprint.pb
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 54
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e7f55ca70dc6a1aee5632b9fc2c09499bc3f83db703fe3f682dd96bb46bec27f
|
3 |
size 54
|
saved_model.pb
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3190ad296548745c67b9e9ecebf63c3f51b5896516858a7d89df15e5a6817a8b
|
3 |
+
size 1321956
|
variables/variables.data-00000-of-00001
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 252115372
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:88b59fb33ebb383195091a641a9b947c10a6454ca463a6517bda3e9b2e60ef96
|
3 |
size 252115372
|
variables/variables.index
CHANGED
Binary files a/variables/variables.index and b/variables/variables.index differ
|
|