pamixsun commited on
Commit
7c3ac1c
1 Parent(s): 71e375b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -4
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
- from transformers import AutoImageProcessor, Swinv2ForImageClassification
50
  import torch
51
- from datasets import load_dataset
52
 
53
- dataset = load_dataset("huggingface/cats-image")
54
- image = dataset["test"]["image"][0]
 
 
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")