Update README.md
Browse files
README.md
CHANGED
@@ -29,4 +29,19 @@ dyed-resection-margins 0.97 0.95 0.96 64
|
|
29 |
weighted avg 0.93 0.93 0.93 480
|
30 |
```
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
> Disclaimer: This model was trained for research only
|
|
|
29 |
weighted avg 0.93 0.93 0.93 480
|
30 |
```
|
31 |
|
32 |
+
## How to use
|
33 |
+
|
34 |
+
```py
|
35 |
+
from transformers import ViTFeatureExtractor, ViTForImageClassification
|
36 |
+
from hugsvision.inference.VisionClassifierInference import VisionClassifierInference
|
37 |
+
|
38 |
+
path = "mrm8488/vit-base-patch16-224_finetuned-kvasirv2-colonoscopy"
|
39 |
+
|
40 |
+
|
41 |
+
classifier = VisionClassifierInference(
|
42 |
+
feature_extractor = ViTFeatureExtractor.from_pretrained(path),
|
43 |
+
model = ViTForImageClassification.from_pretrained(path),
|
44 |
+
)
|
45 |
+
```
|
46 |
+
|
47 |
> Disclaimer: This model was trained for research only
|