| license: mit | |
| tags: | |
| - medical | |
| - brain-disease | |
| - image-classification | |
| - multiplesclerosis | |
| # Multiplesclerosis Detection Model | |
| This model detects multiplesclerosis from brain MRI scans. | |
| ## Model Details | |
| - **Architecture**: VIT | |
| - **Task**: Image Classification | |
| - **Classes**: 4 | |
| - **Input Size**: 224x224 | |
| ## Labels | |
| - 0: Control-Axial | |
| - 1: Control-Sagittal | |
| - 2: MS-Axial | |
| - 3: MS-Sagittal | |
| ## Usage | |
| ```python | |
| from transformers import AutoFeatureExtractor, AutoModelForImageClassification | |
| from PIL import Image | |
| model_name = "dhineshkmar/multiplesclerosis" | |
| 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 multiplesclerosis detection. | |