File size: 903 Bytes
492658b
 
a3a0878
 
 
 
 
492658b
a3a0878
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---

license: mit
tags:
- medical
- brain-disease
- image-classification
- stroke
---


# Stroke Detection Model

This model detects stroke from brain MRI scans.

## Model Details
- **Architecture**: CONVNEXT
- **Task**: Image Classification
- **Classes**: 2
- **Input Size**: 224x224

## Labels
- 0: Normal
- 1: Stroke

## Usage

```python

from transformers import AutoFeatureExtractor, AutoModelForImageClassification

from PIL import Image



model_name = "dhineshkmar/stroke"

feature_extractor = AutoFeatureExtractor.from_pretrained(model_name)

model = AutoModelForImageClassification.from_pretrained(model_name)



image = Image.open("brain_scan.jpg")

inputs = feature_extractor(images=image, return_tensors="pt")

outputs = model(**inputs)

predicted_class = outputs.logits.argmax(-1).item()

```

## Training
Trained on brain MRI scan dataset for stroke detection.