abdo1176 commited on
Commit
2a5e903
·
verified ·
1 Parent(s): c1dda46

Initial model upload with Keras, SavedModel, H5, weights, and configs

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ model.keras filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - tensorflow
7
+ - keras
8
+ - computer-vision
9
+ - medical-imaging
10
+ - brain-tumor
11
+ - mobilevit
12
+ - image-classification
13
+ datasets:
14
+ - brain-tumor-mri
15
+ metrics:
16
+ - accuracy
17
+ model-index:
18
+ - name: MobileViT Brain Tumor Classifier
19
+ results:
20
+ - task:
21
+ type: image-classification
22
+ name: Brain Tumor Classification
23
+ dataset:
24
+ type: brain-tumor-mri
25
+ name: Brain Tumor MRI Images
26
+ metrics:
27
+ - type: accuracy
28
+ value: 0.9850
29
+ name: Accuracy
30
+ ---
31
+
32
+ # MobileViT Brain Tumor Classifier
33
+
34
+ This MobileViT model classifies brain MRI scans into:
35
+
36
+ - Healthy
37
+ - Tumor
38
+
39
+ Accuracy: **98.5%**
40
+
41
+ ⚠️ **Note**: For research/educational purposes only. Not for clinical use.
42
+
43
+ ## Model Files
44
+
45
+ - `model.keras`: Native Keras format (recommended)
46
+ - `model.h5`: Legacy H5 format
47
+ - `saved_model/`: TensorFlow SavedModel format
48
+ - `model.weights.h5`: Model weights only
49
+ - `model_config.json`: Model architecture configuration
50
+ - `class_names.json`: Class label mappings
51
+
52
+ ## Usage
53
+
54
+ ```python
55
+ import tensorflow as tf
56
+ from huggingface_hub import hf_hub_download
57
+
58
+ # Download and load model
59
+ model_path = hf_hub_download(repo_id="abdo1176/brain-model-test", filename="model.keras")
60
+ model = tf.keras.models.load_model(model_path)
61
+
62
+ # Or load weights only
63
+ weights_path = hf_hub_download(repo_id="abdo1176/brain-model-test", filename="model.weights.h5")
64
+ # model.load_weights(weights_path)
65
+ ```
class_names.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ [
2
+ "Healthy",
3
+ "Tumor"
4
+ ]
config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "mobilevit",
3
+ "architecture": "MobileViT-XXS",
4
+ "num_classes": 2,
5
+ "input_shape": [
6
+ 224,
7
+ 224,
8
+ 3
9
+ ],
10
+ "class_names": [
11
+ "Healthy",
12
+ "Tumor"
13
+ ],
14
+ "framework": "tensorflow",
15
+ "task": "image-classification",
16
+ "dataset": "brain-tumor-mri"
17
+ }
model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63fc6ce3faed97a95e2ca3043d3eef222fd9452a3190c95eaee93ba25d5de7bd
3
+ size 10353600
model.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a38b40e89b2997d6a66b08a2ec573f71d4bc4d02ba8bddab7ef8003b6dc0f96
3
+ size 10358792
model.weights.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:915db4c2e15259f53e886d386a4ef618c2129645a008234bb04ac830da3b641c
3
+ size 10172048
model_config.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessing_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_size": [
3
+ 224,
4
+ 224
5
+ ],
6
+ "normalization": "0-1",
7
+ "channels": 3,
8
+ "format": "RGB"
9
+ }
saved_model/fingerprint.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8f5d26794596928f5102a45620708a307af73fc0aad5e8cc07c39fd0b0830fa3
3
+ size 79
saved_model/saved_model.pb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b37c672d98597e7dbf9cf4966eec2c05c09a994269a935a4ef456e7e5015cff7
3
+ size 2227645
saved_model/variables/variables.data-00000-of-00001 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f29b537d70c4829a0c7bd84248b0a43c4e165c2f36e8d0546164950d5e45f765
3
+ size 6453972
saved_model/variables/variables.index ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50b3e28734cdfefda8283f8f7a489527e457caa72ae66e79249d053dc3826165
3
+ size 36612