Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- medical
|
| 5 |
+
- brain-disease
|
| 6 |
+
- image-classification
|
| 7 |
+
- stroke
|
| 8 |
---
|
| 9 |
+
|
| 10 |
+
# Stroke Detection Model
|
| 11 |
+
|
| 12 |
+
This model detects stroke from brain MRI scans.
|
| 13 |
+
|
| 14 |
+
## Model Details
|
| 15 |
+
- **Architecture**: CONVNEXT
|
| 16 |
+
- **Task**: Image Classification
|
| 17 |
+
- **Classes**: 2
|
| 18 |
+
- **Input Size**: 224x224
|
| 19 |
+
|
| 20 |
+
## Labels
|
| 21 |
+
- 0: Normal
|
| 22 |
+
- 1: Stroke
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
|
| 26 |
+
```python
|
| 27 |
+
from transformers import AutoFeatureExtractor, AutoModelForImageClassification
|
| 28 |
+
from PIL import Image
|
| 29 |
+
|
| 30 |
+
model_name = "dhineshkmar/stroke"
|
| 31 |
+
feature_extractor = AutoFeatureExtractor.from_pretrained(model_name)
|
| 32 |
+
model = AutoModelForImageClassification.from_pretrained(model_name)
|
| 33 |
+
|
| 34 |
+
image = Image.open("brain_scan.jpg")
|
| 35 |
+
inputs = feature_extractor(images=image, return_tensors="pt")
|
| 36 |
+
outputs = model(**inputs)
|
| 37 |
+
predicted_class = outputs.logits.argmax(-1).item()
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## Training
|
| 41 |
+
Trained on brain MRI scan dataset for stroke detection.
|