Update README.md
Browse files
README.md
CHANGED
@@ -46,12 +46,13 @@ Thus please make sure to feed only fundus image into the model to obtain reasona
|
|
46 |
Use the code below to get started with the model.
|
47 |
|
48 |
```python
|
49 |
-
|
50 |
import torch
|
51 |
-
from datasets import load_dataset
|
52 |
|
53 |
-
|
54 |
-
|
|
|
|
|
55 |
|
56 |
processor = AutoImageProcessor.from_pretrained("pamixsun/swinv2_tiny_for_glaucoma_classification")
|
57 |
model = Swinv2ForImageClassification.from_pretrained("pamixsun/swinv2_tiny_for_glaucoma_classification")
|
|
|
46 |
Use the code below to get started with the model.
|
47 |
|
48 |
```python
|
49 |
+
import cv2
|
50 |
import torch
|
|
|
51 |
|
52 |
+
from transformers import AutoImageProcessor, Swinv2ForImageClassification
|
53 |
+
|
54 |
+
image = cv2.imread('./example.jpg')
|
55 |
+
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
|
56 |
|
57 |
processor = AutoImageProcessor.from_pretrained("pamixsun/swinv2_tiny_for_glaucoma_classification")
|
58 |
model = Swinv2ForImageClassification.from_pretrained("pamixsun/swinv2_tiny_for_glaucoma_classification")
|