Update README.md
Browse files
README.md
CHANGED
@@ -22,8 +22,7 @@ This project is licensed under the MIT License.
|
|
22 |
|
23 |
|
24 |
<h1>How to use:</h1>
|
25 |
-
|
26 |
-
Import Librariese</br>
|
27 |
|
28 |
```ruby
|
29 |
!pip install huggingface_hub["tensorflow"]
|
@@ -35,7 +34,6 @@ from huggingface_hub import from_pretrained_keras
|
|
35 |
```ruby
|
36 |
#load model
|
37 |
model=from_pretrained_keras('Ajibola/PaViT')
|
38 |
-
|
39 |
#load image
|
40 |
image=cv2.imread('image_path')
|
41 |
image=cv2.resize(image, (224, 224)) #224 is the default image size
|
@@ -46,7 +44,7 @@ prediction=np.argmax(prediction, axis=-1) #Get Highest probability class
|
|
46 |
|
47 |
```
|
48 |
|
49 |
-
<
|
50 |
```ruby
|
51 |
model=PaViT.PaViT()
|
52 |
#Output means the unit default is 15 and activation 'sigmoid'
|
@@ -58,7 +56,6 @@ p_model.compile(...)
|
|
58 |
p_model.fit(...)
|
59 |
|
60 |
```
|
61 |
-
|
62 |
<h1>Prediction on Test data</h1>
|
63 |
<img src='https://huggingface.co/Ajibola/PaViT/blob/main/test.png' alt='evaluated predictions'>
|
64 |
|
|
|
22 |
|
23 |
|
24 |
<h1>How to use:</h1>
|
25 |
+
Import Libraries
|
|
|
26 |
|
27 |
```ruby
|
28 |
!pip install huggingface_hub["tensorflow"]
|
|
|
34 |
```ruby
|
35 |
#load model
|
36 |
model=from_pretrained_keras('Ajibola/PaViT')
|
|
|
37 |
#load image
|
38 |
image=cv2.imread('image_path')
|
39 |
image=cv2.resize(image, (224, 224)) #224 is the default image size
|
|
|
44 |
|
45 |
```
|
46 |
|
47 |
+
<h1>On Training<h1>
|
48 |
```ruby
|
49 |
model=PaViT.PaViT()
|
50 |
#Output means the unit default is 15 and activation 'sigmoid'
|
|
|
56 |
p_model.fit(...)
|
57 |
|
58 |
```
|
|
|
59 |
<h1>Prediction on Test data</h1>
|
60 |
<img src='https://huggingface.co/Ajibola/PaViT/blob/main/test.png' alt='evaluated predictions'>
|
61 |
|